1 | <?php
|
---|
2 |
|
---|
3 | $limits = array
|
---|
4 | (
|
---|
5 | "fPedRmsInLimit" => "fMeanPedRmsInner",
|
---|
6 | "fArrTimeLimit" => "fArrTimeRmsInner",
|
---|
7 | "fMuonRateLimit" => "fMuonRate",
|
---|
8 | "fPSFLimit" => "fPSF",
|
---|
9 | "fImgRateLimit" => "fDataRate",
|
---|
10 | "fUnsInLimit" => "fUnsuitableInner",
|
---|
11 | "fZdMinLimit" => "fZenithDistanceMin",
|
---|
12 | "fZdMaxLimit" => "fZenithDistanceMax",
|
---|
13 | );
|
---|
14 |
|
---|
15 | $rms = array
|
---|
16 | (
|
---|
17 | "fPedRmsInLimit" => "yes",
|
---|
18 | "fArrTimeLimit" => "yes",
|
---|
19 | "fMuonRateLimit" => "yes",
|
---|
20 | "fUnsInLimit" => "max",
|
---|
21 | "fPSFLimit" => "yes",
|
---|
22 | "fImgRateLimit" => "yes",
|
---|
23 | "fZdMinLimit" => "min",
|
---|
24 | "fZdMaxLimit" => "max",
|
---|
25 | );
|
---|
26 |
|
---|
27 | $checkwhere = array
|
---|
28 | (
|
---|
29 | "fRunTypeName" => CheckWhere("fRunTypeKEY", $_GET),
|
---|
30 | "fProjectName" => CheckWhere("fProjectKEY", $_GET),
|
---|
31 | "fSourceName" => CheckWhere("fSourceKEY", $_GET),
|
---|
32 | "fMagicNumberName" => CheckWhere("fMagicNumberKEY", $_GET),
|
---|
33 | "fL1TriggerTableName" => CheckWhere("fL1TriggerTableKEY", $_GET),
|
---|
34 | "fL2TriggerTableName" => CheckWhere("fL2TriggerTableKEY", $_GET),
|
---|
35 | "fHvSettingsName" => CheckWhere("fHvSettingsKEY", $_GET),
|
---|
36 | "fCalibrationScriptName" => CheckWhere("fCalibrationScriptKEY", $_GET),
|
---|
37 | "fExcludedFDAName" => CheckWhere("fExcludedFDAKEY", $_GET),
|
---|
38 | "fManuallyChangedName" => CheckWhere("fManuallyChangedKEY", $_GET),
|
---|
39 | "fDiscriminatorThresholdTableName" => CheckWhere("fDiscriminatorThresholdTableKEY", $_GET),
|
---|
40 | "fTriggerDelayTableName" => CheckWhere("fTriggerDelayTableKEY", $_GET),
|
---|
41 | "fTestFlagName" => CheckWhere("fTestFlagKEY", $_GET),
|
---|
42 | "fLightConditionsName" => CheckWhere("fLightConditionsKEY", $_GET),
|
---|
43 | );
|
---|
44 |
|
---|
45 | $checkgroup = array
|
---|
46 | (
|
---|
47 | "fRunTypeName" => CheckGroup("fRunTypeKEY", $_GET),
|
---|
48 | "fProjectName" => CheckGroup("fProjectKEY", $_GET),
|
---|
49 | "fSourceName" => CheckGroup("fSourceKEY", $_GET),
|
---|
50 | "fMagicNumberName" => CheckGroup("fMagicNumberKEY", $_GET),
|
---|
51 | "fL1TriggerTableName" => CheckGroup("fL1TriggerTableKEY", $_GET),
|
---|
52 | "fL2TriggerTableName" => CheckGroup("fL2TriggerTableKEY", $_GET),
|
---|
53 | "fHvSettingsName" => CheckGroup("fHvSettingsKEY", $_GET),
|
---|
54 | "fCalibrationScriptName" => CheckGroup("fCalibrationScriptKEY", $_GET),
|
---|
55 | "fExcludedFDAName" => CheckGroup("fExcludedFDAKEY", $_GET),
|
---|
56 | "fManuallyChangedName" => CheckGroup("fManuallyChangedKEY", $_GET),
|
---|
57 | "fDiscriminatorThresholdTableName" => CheckGroup("fDiscriminatorThresholdTableKEY", $_GET),
|
---|
58 | "fTriggerDelayTableName" => CheckGroup("fTriggerDelayTableKEY", $_GET),
|
---|
59 | "fTestFlagName" => CheckGroup("fTestFlagKEY", $_GET),
|
---|
60 | "fLightConditionsName" => CheckGroup("fLightConditionsKEY", $_GET),
|
---|
61 | );
|
---|
62 |
|
---|
63 |
|
---|
64 | $checkstatusgroup = array
|
---|
65 | (
|
---|
66 | "fCCFilled" => CheckStatusGroup("fCCFilledStatus", $_GET),
|
---|
67 | "fExclusionsDone" => CheckStatusGroup("fExclusionsDoneStatus", $_GET),
|
---|
68 | "fSequenceEntriesBuilt" => CheckStatusGroup("fSequenceEntriesBuiltStatus",$_GET),
|
---|
69 | "fCCFileAvail" => CheckStatusGroup("fCCFileAvailStatus", $_GET),
|
---|
70 | "fCaCoFileAvail" => CheckStatusGroup("fCaCoFileAvailStatus", $_GET),
|
---|
71 | "fCaCoFileFound" => CheckStatusGroup("fCaCoFileFoundStatus", $_GET),
|
---|
72 | "fRawFileAvail" => CheckStatusGroup("fRawFileAvailStatu", $_GET),
|
---|
73 | "fTimingCorrection" => CheckStatusGroup("fTimingCorrectionStatus", $_GET),
|
---|
74 | "fDataCheckDone" => CheckStatusGroup("fDataCheckDoneStatus", $_GET),
|
---|
75 | // "fFillDotRaw" => CheckStatusGroup("fFillDotRawStatus", $_GET),
|
---|
76 | "fSequenceFileWritten" => CheckStatusGroup("fSequenceFileWrittenStatus", $_GET),
|
---|
77 | "fAllFilesAvail" => CheckStatusGroup("fAllFilesAvailStatus", $_GET),
|
---|
78 | "fCallisto" => CheckStatusGroup("fCallistoStatus", $_GET),
|
---|
79 | "fFillCallisto" => CheckStatusGroup("fFillCallistoStatus", $_GET),
|
---|
80 | "fStar" => CheckStatusGroup("fStarStatus", $_GET),
|
---|
81 | "fFillStar" => CheckStatusGroup("fFillStarStatus", $_GET),
|
---|
82 | "fDataSetInserted" => CheckStatusGroup("fDataSetInsertedStatus", $_GET),
|
---|
83 | "fStarFilesAvail" => CheckStatusGroup("fStarFilesAvailStatus", $_GET),
|
---|
84 | "fGanymed" => CheckStatusGroup("fGanymedStatus", $_GET),
|
---|
85 | "fFillGanymed" => CheckStatusGroup("fFillGanymedStatus", $_GET),
|
---|
86 | );
|
---|
87 |
|
---|
88 |
|
---|
89 | $checkenumgroup = array
|
---|
90 | (
|
---|
91 | "fHasSignal" => CheckEnumGroup("fHasSignalEnum", $_GET),
|
---|
92 | "fHasPedestal" => CheckEnumGroup("fHasPedestalEnum", $_GET),
|
---|
93 | "fHasSignalInterlaced" => CheckEnumGroup("fHasSignalInterlacedEnum", $_GET),
|
---|
94 | "fHasPedestalInterlaced" => CheckEnumGroup("fHasPedestalInterlacedEnum", $_GET),
|
---|
95 | );
|
---|
96 |
|
---|
97 |
|
---|
98 |
|
---|
99 | $alias = array
|
---|
100 | (
|
---|
101 | "fRawFileKEY" => "Idx",
|
---|
102 | "fMagicNumberName" => "Magic#",
|
---|
103 | "fFormatVersion" => "F-Ver",
|
---|
104 | "fLastUpdate" => "LastUpd",
|
---|
105 | "fRunNumber" => "Run#",
|
---|
106 | "fRunTypeName" => "RunType",
|
---|
107 | "fMeanTriggerRate" => "Rate<br>[Hz]",
|
---|
108 | "fDaqTriggerRate" => "Daq<br>TRate<br>[Hz]",
|
---|
109 | "fDaqStoreRate" => "Daq<br>SRate<br>[Hz]",
|
---|
110 | "fL2RatePresc" => "L2<br>pRate<br>[Hz]",
|
---|
111 | "fL2RateUnpresc" => "L2<br>upRate<br>[Hz]",
|
---|
112 | "fManuallyChangedName" => "Manually<br>Changed",
|
---|
113 | "fLastUpdate" => "LastUpd",
|
---|
114 | "fSequenceFirst" => "Sequ",
|
---|
115 | "fProjectName" => "Project",
|
---|
116 | "fSourceName" => "Source",
|
---|
117 | "fNumEvents" => "#Evts",
|
---|
118 | "fRunTime/60" => "Up<br>Time<br>[min]",
|
---|
119 | "fRunStart" => "Start",
|
---|
120 | "fRunStop" => "Stop",
|
---|
121 | // "fRunStart" => "StartTime",
|
---|
122 | "fSequenceLast" => "Last<br>Run",
|
---|
123 | "fL1TriggerTableName" => "L1Trig<br>Table",
|
---|
124 | "fL2TriggerTableName" => "L2Trig<br>Table",
|
---|
125 | "fHvSettingsName" => "HV Settings",
|
---|
126 | "fCalibrationScriptName" => "Cal Script",
|
---|
127 | "fTestFlagName" => "Testflag",
|
---|
128 | "fLightConditionsName" => "Lightcond",
|
---|
129 | "fTriggerDelayTableName" => "TrigDelay",
|
---|
130 | "fDiscriminatorThresholdTableName" => "DT",
|
---|
131 | "fExcludedFDAName" => "Exclusion",
|
---|
132 | "fZenithDistance" => "Zd",
|
---|
133 | "fAzimuth" => "Az",
|
---|
134 | "fZenithDistanceMin" => "Zd<br>Min",
|
---|
135 | "fZenithDistanceMax" => "Zd<br>Max",
|
---|
136 | "fAzimuthMin" => "Az<br>Min",
|
---|
137 | "fAzimuthMax" => "Az<br>Max",
|
---|
138 | "fTest" => "Test",
|
---|
139 | "fSourceKEY" => "KEY",
|
---|
140 | "fDate" => "Date",
|
---|
141 | "fCCFilled" => "CCFilled",
|
---|
142 | "fExclusionsDone" => "Exclusions",
|
---|
143 | "fSequenceEntriesBuilt" => "Sequences",
|
---|
144 | "fCCFileAvail" => "CCFile",
|
---|
145 | "fCaCoFileAvail" => "CaCoFile",
|
---|
146 | "fCaCoFileFound" => "CaCoRun",
|
---|
147 | "fRawFileAvail" => "Rawfile",
|
---|
148 | "fTimingCorrection" => "TimingCorr",
|
---|
149 | "fDataCheckDone" => "Datacheck",
|
---|
150 | // "fFillDotRaw" => "Filldotraw",
|
---|
151 | "fSequenceFileWritten" => "SequFile",
|
---|
152 | "fAllFilesAvail" => "FilesAvail",
|
---|
153 | "fCallisto" => "Callisto",
|
---|
154 | "fStar" => "Star",
|
---|
155 | "fFillCallisto" => "FillCal",
|
---|
156 | "fFillStar" => "FillStar",
|
---|
157 | "fDataSetInserted" => "DataSet",
|
---|
158 | "fStarFilesAvail" => "FilesAvail",
|
---|
159 | "fGanymed" => "Ganymed",
|
---|
160 | "fFillGanymed" => "FillGanymed",
|
---|
161 | "fUnsuitableOuter" => "Un<br>suit.<br>Out",
|
---|
162 | "fUnreliableOuter" => "Un<br>rel.<br>Out",
|
---|
163 | "fUnreliableInner" => "Un<br>rel.<br>In",
|
---|
164 | "fUnsuitableInner" => "Un<br>suit.<br>In",
|
---|
165 | "fIsolatedOuter" => "Isol.<br>Out",
|
---|
166 | "fIsolatedInner" => "Isol.<br>In",
|
---|
167 | "fMeanPedRmsOuter" => "Ped<br>Rms<br>Out",
|
---|
168 | "fMeanPedRmsInner" => "Ped<br>Rms<br>In",
|
---|
169 | "fArrTimeMeanInner" => "Arr<br>Time<br>In",
|
---|
170 | "fArrTimeMeanOuter" => "Arr<br>Time<br>Out",
|
---|
171 | "fArrTimeRmsInner" => "Rms<br>ArrT<br>In",
|
---|
172 | "fArrTimeRmsOuter" => "Rms<br>ArrT<br>Out",
|
---|
173 | "fConvFactorInner" => "Conv<br>In",
|
---|
174 | "fConvFactorOuter" => "Conv<br>Out",
|
---|
175 | // "fConvFactorInner" => "Conv Inner<BR>[ph/FADC]",
|
---|
176 | // "fConvFactorOuter" => "Conv Outer<BR>[ph/FADC]",
|
---|
177 | "fIsolatedMaxCluster" => "Isol.<br>Max<br>Cl",
|
---|
178 | "fMeanNumberIslands" => "Mean<br>Num<br>Isl",
|
---|
179 | "fPSF" => "PSF<br>[mm]",
|
---|
180 | "fRatio" => "Ratio<br>[%]",
|
---|
181 | "fMuonNumber" => "#<br>Muons",
|
---|
182 | "fEffOnTime" => "EffOn<br>Time<br>[s]",
|
---|
183 | "fEffOnTime/3600" => "EffOn<br>Time<br>[h]",
|
---|
184 | "fMuonRate" => "Muon<br>Rate<br>[Hz]",
|
---|
185 | "fInhomogeneity" => "Inhom",
|
---|
186 | "fDataRate" => "Img.<br>Rate<br>[Hz]",
|
---|
187 | "fMaxHumidity" => "Max<br>Hum<br>[%]",
|
---|
188 | "fEvents" => "DataEvents",
|
---|
189 | "fPositionSignal" => "ArrTime",
|
---|
190 | "fPositionFWHM" => "ArrTimeFWHM",
|
---|
191 | "fHeightSignal" => "Signal",
|
---|
192 | "fHeightFWHM" => "SignalFWHM",
|
---|
193 | "fHasSignal" => "HasSignal",
|
---|
194 | "fHasPedestal" => "HasPedestal",
|
---|
195 | "fPositionAsym" => "ArrTimeAsym",
|
---|
196 | "fHeightAsym" => "SignalAsym",
|
---|
197 | "fEventsInterlaced" => "CalEvents",
|
---|
198 | "fPositionSignalInterlaced" => "ArrTimeCal",
|
---|
199 | "fPositionFWHMInterlaced" => "ArrTimeFWHMCal",
|
---|
200 | "fHeightSignalInterlaced" => "SignalCal",
|
---|
201 | "fHeightFWHMInterlaced" => "SignalFWHMCal",
|
---|
202 | "fHasSignalInterlaced" => "HasSignalCal",
|
---|
203 | "fHasPedestalInterlaced" => "HasPedestalCal",
|
---|
204 | "fPositionAsymInterlaced" => "ArrTimeAsymCal",
|
---|
205 | "fHeightAsymInterlaced" => "SignalAsymCal",
|
---|
206 | "fExcessEvents" => "Exc<br>Evts",
|
---|
207 | "fBackgroundEvents" => "Bg<br>Evts",
|
---|
208 | "fSignalEvents" => "Sign<br>Evts",
|
---|
209 | "fSignificance" => "Sign",
|
---|
210 | "fScaleFactor" => "Scale",
|
---|
211 | "fDataSetNumber" => "Data<br>Set#",
|
---|
212 | "fWobble" => "Wobble",
|
---|
213 | "fComment" => "Comment",
|
---|
214 | "fExcessEvents*60/fEffOnTime" => "Exc<br>Rate",
|
---|
215 | "fBackgroundEvents*60/fEffOnTime" => "Bg<br>Rate",
|
---|
216 | "fSignalEvents*60/fEffOnTime" => "Sign<br>Rate",
|
---|
217 | "Round(fSignificance/Sqrt(fEffOnTime/3600),2)" => "Signf<br>Rate",
|
---|
218 | "SUM(fRunTime)/3600" => "Time [h]",
|
---|
219 | "SUM(fNumEvents)" => "Evts",
|
---|
220 | "Min(fZenithDistanceMin)" => "ZDMin",
|
---|
221 | "Max(fZenithDistanceMax)" => "ZDMax",
|
---|
222 | "Min(fZenithDistance)" => "ZdMin",
|
---|
223 | "Max(fZenithDistance)" => "ZdMax",
|
---|
224 | "COUNT(*)" => "Sequence",
|
---|
225 | "fArrTimeLimit" => "ArrTRms",
|
---|
226 | "fPedRmsInLimit" => "PedRms",
|
---|
227 | "fMuonRateLimit" => "MuonRate",
|
---|
228 | "fPSFLimit" => "PSF",
|
---|
229 | "fImgRateLimit" => "ImgRate",
|
---|
230 | "fUnsInLimit" => "Unsuit.In",
|
---|
231 | "fZdMinLimit" => "ZdMin",
|
---|
232 | "fZdMaxLimit" => "ZdMax",
|
---|
233 | );
|
---|
234 |
|
---|
235 |
|
---|
236 | $rightalign = array
|
---|
237 | (
|
---|
238 | $alias["fRawFileKEY"] => "1",
|
---|
239 | $alias["fFormatVersion"] => "1",
|
---|
240 | $alias["fRunNumber"] => "1",
|
---|
241 | $alias["fZenithDistance"] => "1",
|
---|
242 | $alias["fAzimuth"] => "1",
|
---|
243 | $alias["fMeanTriggerRate"] => "1",
|
---|
244 | $alias["fDaqTriggerRate"] => "1",
|
---|
245 | $alias["fDaqStoreRate"] => "1",
|
---|
246 | $alias["fL2RatePresc"] => "1",
|
---|
247 | $alias["fL2RateUnpresc"] => "1",
|
---|
248 | $alias["fSequenceFirst"] => "1",
|
---|
249 | $alias["fNumEvents"] => "1",
|
---|
250 | $alias["fRunTime/60"] => "1",
|
---|
251 | $alias["fSequenceLast"] => "1",
|
---|
252 | $alias["fZenithDistanceMin"] => "1",
|
---|
253 | $alias["fZenithDistanceMax"] => "1",
|
---|
254 | $alias["fAzimuthMin"] => "1",
|
---|
255 | $alias["fAzimuthMax"] => "1",
|
---|
256 | $alias["fUnsuitableOuter"] => "1",
|
---|
257 | $alias["fUnreliableOuter"] => "1",
|
---|
258 | $alias["fUnsuitableInner"] => "1",
|
---|
259 | $alias["fUnreliableInner"] => "1",
|
---|
260 | $alias["fIsolatedOuter"] => "1",
|
---|
261 | $alias["fIsolatedInner"] => "1",
|
---|
262 | $alias["fMeanPedRmsOuter"] => "1",
|
---|
263 | $alias["fMeanPedRmsInner"] => "1",
|
---|
264 | $alias["fArrTimeMeanInner"] => "1",
|
---|
265 | $alias["fArrTimeMeanOuter"] => "1",
|
---|
266 | $alias["fArrTimeRmsInner"] => "1",
|
---|
267 | $alias["fArrTimeRmsOuter"] => "1",
|
---|
268 | $alias["fConvFactorInner"] => "1",
|
---|
269 | $alias["fConvFactorOuter"] => "1",
|
---|
270 | $alias["fIsolatedMaxCluster"] => "1",
|
---|
271 | $alias["fMeanNumberIslands"] => "1",
|
---|
272 | $alias["fPSF"] => "1",
|
---|
273 | $alias["fRatio"] => "1",
|
---|
274 | $alias["fMuonNumber"] => "1",
|
---|
275 | $alias["fEffOnTime"] => "1",
|
---|
276 | $alias["fEffOnTime/3600"] => "1",
|
---|
277 | $alias["fMuonRate"] => "1",
|
---|
278 | $alias["fInhomogeneity"] => "1",
|
---|
279 | $alias["fDataRate"] => "1",
|
---|
280 | $alias["fMaxHumidity"] => "1",
|
---|
281 | $alias["fDate"] => "1",
|
---|
282 | $alias["fCaCoFileFound"] => "1",
|
---|
283 | $alias["fTest"] => "1",
|
---|
284 | $alias["fSourceKEY"] => "1",
|
---|
285 | $alias["fEvents"] => "1",
|
---|
286 | $alias["fPositionSignal"] => "1",
|
---|
287 | $alias["fPositionFWHM"] => "1",
|
---|
288 | $alias["fHeightSignal"] => "1",
|
---|
289 | $alias["fHeightFWHM"] => "1",
|
---|
290 | $alias["fHasSignal"] => "1",
|
---|
291 | $alias["fHasPedestal"] => "1",
|
---|
292 | $alias["fPositionAsym"] => "1",
|
---|
293 | $alias["fHeightAsym"] => "1",
|
---|
294 | $alias["fEventsInterlaced"] => "1",
|
---|
295 | $alias["fPositionSignalInterlaced"] => "1",
|
---|
296 | $alias["fPositionFWHMInterlaced"] => "1",
|
---|
297 | $alias["fHeightSignalInterlaced"] => "1",
|
---|
298 | $alias["fHeightFWHMInterlaced"] => "1",
|
---|
299 | $alias["fHasSignalInterlaced"] => "1",
|
---|
300 | $alias["fHasPedestalInterlaced"] => "1",
|
---|
301 | $alias["fPositionAsymInterlaced"] => "1",
|
---|
302 | $alias["fHeightAsymInterlaced"] => "1",
|
---|
303 | "Time" => "1",
|
---|
304 | // "Time [h]" => "1",
|
---|
305 | "ZDMin" => "1",
|
---|
306 | "ZDMax" => "1",
|
---|
307 | // "Evts#" => "1",
|
---|
308 | // "Runs#" => "1"
|
---|
309 | "Runs" => "1",
|
---|
310 | "Evts" => "1",
|
---|
311 | );
|
---|
312 |
|
---|
313 | function GetCheck($fromtable, $val)
|
---|
314 | {
|
---|
315 | $checks = array
|
---|
316 | (
|
---|
317 | "fRunTypeName" => $fromtable . ".fRunTypeKEY",
|
---|
318 | "fProjectName" => $fromtable . ".fProjectKEY",
|
---|
319 | "fSourceName" => $fromtable . ".fSourceKEY",
|
---|
320 | "fMagicNumberName" => $fromtable . ".fMagicNumberKEY",
|
---|
321 | "fL1TriggerTableName" => $fromtable . ".fL1TriggerTableKEY",
|
---|
322 | "fL2TriggerTableName" => $fromtable . ".fL2TriggerTableKEY",
|
---|
323 | "fHvSettingsName" => $fromtable . ".fHvSettingsKEY",
|
---|
324 | "fCalibrationScriptName" => $fromtable . ".fCalibrationScriptKEY",
|
---|
325 | "fExcludedFDAName" => $fromtable . ".fExcludedFDAKEY",
|
---|
326 | "fManuallyChangedName" => $fromtable . ".fManuallyChangedKEY",
|
---|
327 | "fDiscriminatorThresholdTableName" => $fromtable . ".fDiscriminatorThresholdTableKEY",
|
---|
328 | "fTriggerDelayTableName" => $fromtable . ".fTriggerDelayTableKEY",
|
---|
329 | "fTestFlagName" => $fromtable . ".fTestFlagKEY",
|
---|
330 | "fLightConditionsName" => $fromtable . ".fLightConditionsKEY",
|
---|
331 | );
|
---|
332 |
|
---|
333 | $check="";
|
---|
334 | if (!empty($checks[$val]))
|
---|
335 | $check=$checks[$val];
|
---|
336 | return $check;
|
---|
337 | }
|
---|
338 |
|
---|
339 |
|
---|
340 | function GetTable($fromtable, $val)
|
---|
341 | {
|
---|
342 | $tables = array
|
---|
343 | (
|
---|
344 | "fSequenceFirst" => $fromtable . ".fSequenceFirst",
|
---|
345 | "fSequenceLast" => $fromtable . ".fSequenceLast",
|
---|
346 | "fNumEvents" => $fromtable . ".fNumEvents",
|
---|
347 | "fRunStart" => $fromtable . ".fRunStart",
|
---|
348 | "fLastUpdate" => $fromtable . ".fLastUpdate",
|
---|
349 | "fRunTime" => $fromtable . ".fRunTime",
|
---|
350 | "fRunTime/60" => $fromtable . ".fRunTime/60",
|
---|
351 | "fAzimuthMin" => $fromtable . ".fAzimuthMin",
|
---|
352 | "fAzimuthMax" => $fromtable . ".fAzimuthMax",
|
---|
353 | "fZenithDistanceMin" => $fromtable . ".fZenithDistanceMin",
|
---|
354 | "fZenithDistanceMax" => $fromtable . ".fZenithDistanceMax",
|
---|
355 | "fRunNumber" => "RunData.fRunNumber",
|
---|
356 | "fRunStop" => "RunData.fRunStop",
|
---|
357 | "fAzimuth" => "RunData.fAzimuth",
|
---|
358 | "fZenithDistance" => "RunData.fZenithDistance",
|
---|
359 | "fFormatVersion" => "RunData.fFormatVersion",
|
---|
360 | "fRunTypeName" => "RunType.fRunTypeName",
|
---|
361 | "fDaqStoreRate" => "RunData.fDaqStoreRate",
|
---|
362 | "fDaqTriggerRate" => "RunData.fDaqTriggerRate",
|
---|
363 | "fMeanTriggerRate" => "RunData.fMeanTriggerRate",
|
---|
364 | "fL2RatePresc" => "RunData.fL2RatePresc",
|
---|
365 | "fL2RateUnpresc" => "RunData.fL2RateUnpresc",
|
---|
366 | "fMagicNumberName" => "MagicNumber.fMagicNumberName",
|
---|
367 | "fExcludedFDAName" => "ExcludedFDA.fExcludedFDAName",
|
---|
368 | "fProjectName" => "Project.fProjectName",
|
---|
369 | "fSourceName" => "Source.fSourceName",
|
---|
370 | "fL1TriggerTableName" => "L1TriggerTable.fL1TriggerTableName",
|
---|
371 | "fL2TriggerTableName" => "L2TriggerTable.fL2TriggerTableName",
|
---|
372 | "fHvSettingsName" => "HvSettings.fHvSettingsName",
|
---|
373 | "fManuallyChangedName" => "ManuallyChanged.fManuallyChangedName",
|
---|
374 | "fTriggerDelayTableName" => "TriggerDelayTable.fTriggerDelayTableName",
|
---|
375 | "fDiscriminatorThresholdTableName" => "DiscriminatorThresholdTable.fDiscriminatorThesholdTableName",
|
---|
376 | "fCalibrationScriptName" => "CalibrationScript.fCalibrationScriptName",
|
---|
377 | "fTestFlagName" => "TestFlag.fTestFlagName",
|
---|
378 | "fLightConditionsName" => "LightConditions.fLightConditionsName",
|
---|
379 | "fRawFileAvail" => "RunProcessStatus.fRawFileAvail",
|
---|
380 | "fCCFileAvail" => "RunProcessStatus.fCCFileAvail",
|
---|
381 | "fCaCoFileAvail" => "RunProcessStatus.fCaCoFileAvail",
|
---|
382 | "fCaCoFileFound" => "RunProcessStatus.fCaCoFileFound",
|
---|
383 | "fTimingCorrection" => "RunProcessStatus.fTimingCorrection",
|
---|
384 | // "fFillDotRaw" => "RunProcessStatus.fFillDotRaw",
|
---|
385 | "fSequenceFileWritten" => "SequenceProcessStatus.fSequenceFileWritten",
|
---|
386 | "fAllFilesAvail" => "SequenceProcessStatus.fAllFilesAvail",
|
---|
387 | "fCallisto" => "SequenceProcessStatus.fCallisto",
|
---|
388 | "fFillCallisto" => "SequenceProcessStatus.fFillCallisto",
|
---|
389 | "fStar" => "SequenceProcessStatus.fStar",
|
---|
390 | "fFillStar" => "SequenceProcessStatus.fFillStar",
|
---|
391 | "fUnsuitableInner" => "Calibration.fUnsuitableInner",
|
---|
392 | "fUnsuitableOuter" => "Calibration.fUnsuitableOuter",
|
---|
393 | "fUnreliableInner" => "Calibration.fUnreliableInner",
|
---|
394 | "fUnreliableOuter" => "Calibration.fUnreliableOuter",
|
---|
395 | "fIsolatedInner" => "Calibration.fIsolatedInner",
|
---|
396 | "fIsolatedOuter" => "Calibration.fIsolatedOuter",
|
---|
397 | "fIsolatedMaxCluster" => "Calibration.fIsolatedMaxCluster",
|
---|
398 | "fLastUpdate" => "Calibration.fLastUpdate",
|
---|
399 | "fMeanPedRmsInner" => "Calibration.fMeanPedRmsInner",
|
---|
400 | "fMeanPedRmsOuter" => "Calibration.fMeanPedRmsOuter",
|
---|
401 | "fArrTimeMeanInner" => "Calibration.fArrTimeMeanInner",
|
---|
402 | "fArrTimeMeanOuter" => "Calibration.fArrTimeMeanOuter",
|
---|
403 | "fArrTimeRmsInner" => "Calibration.fArrTimeRmsInner",
|
---|
404 | "fArrTimeRmsOuter" => "Calibration.fArrTimeRmsOuter",
|
---|
405 | "fConvFactorInner" => "Calibration.fConvFactorInner",
|
---|
406 | "fConvFactorOuter" => "Calibration.fConvFactorOuter",
|
---|
407 | "fMeanNumberIslands" => "Star.fMeanNumberIslands",
|
---|
408 | "fPSF" => "Star.fPSF",
|
---|
409 | "fRatio" => "Star.fRatio",
|
---|
410 | "fMuonNumber" => "Star.fMuonNumber",
|
---|
411 | "fEffOnTime" => "fEffOnTime",
|
---|
412 | "fEffOnTime/3600" => "fEffOnTime/3600",
|
---|
413 | // "fEffOnTime" => $fromtable . ".fEffOnTime",
|
---|
414 | "fMuonRate" => "Star.fMuonRate",
|
---|
415 | "fInhomogeneity" => "Star.fInhomogeneity",
|
---|
416 | "fDataRate" => "Star.fDataRate",
|
---|
417 | "fMaxHumidity" => "Star.fMaxHumidity",
|
---|
418 | "fDataSetNumber" => $fromtable . ".fDataSetNumber",
|
---|
419 | "fDataSetInserted" => "DataSetProcessStatus.fDataSetInserted",
|
---|
420 | "fStarFilesAvail" => "DataSetProcessStatus.fStarFilesAvail",
|
---|
421 | "fGanymed" => "DataSetProcessStatus.fGanymed",
|
---|
422 | "fFillGanymed" => "DataSetProcessStatus.fFillGanymed",
|
---|
423 | "fWobble" => "DataSets.fWobble",
|
---|
424 | "fComment" => "DataSets.fComment",
|
---|
425 | "fEvents" => "DataCheck.fEvents",
|
---|
426 | "fPositionSignal" => "DataCheck.fPositionSignal",
|
---|
427 | "fPositionFWHM" => "DataCheck.fPositionFWHM",
|
---|
428 | "fHeightSignal" => "DataCheck.fHeightSignal",
|
---|
429 | "fHeightFWHM" => "DataCheck.fHeightFWHM",
|
---|
430 | "fHasSignal" => "DataCheck.fHasSignal",
|
---|
431 | "fHasPedestal" => "DataCheck.fHasPedestal",
|
---|
432 | "fPositionAsym" => "DataCheck.fPositionAsym",
|
---|
433 | "fHeightAsym" => "DataCheck.fHeightAsym",
|
---|
434 | "fEventsInterlaced" => "DataCheck.fEventsInterlaced",
|
---|
435 | "fPositionSignalInterlaced" => "DataCheck.fPositionSignalInterlaced",
|
---|
436 | "fPositionFWHMInterlaced" => "DataCheck.fPositionFWHMInterlaced",
|
---|
437 | "fHeightSignalInterlaced" => "DataCheck.fHeightSignalInterlaced",
|
---|
438 | "fHeightFWHMInterlaced" => "DataCheck.fHeightFWHMInterlaced",
|
---|
439 | "fHasSignalInterlaced" => "DataCheck.fHasSignalInterlaced",
|
---|
440 | "fHasPedestalInterlaced" => "DataCheck.fHasPedestalInterlaced",
|
---|
441 | "fPositionAsymInterlaced" => "DataCheck.fPositionAsymInterlaced",
|
---|
442 | "fHeightAsymInterlaced" => "DataCheck.fHeightAsymInterlaced",
|
---|
443 | "fExcessEvents" => "Ganymed.fExcessEvents",
|
---|
444 | "fBackgroundEvents" => "Ganymed.fBackgroundEvents",
|
---|
445 | "fSignalEvents" => "Ganymed.fSignalEvents",
|
---|
446 | "fSignificance" => "Ganymed.fSignificance",
|
---|
447 | "fScaleFactor" => "Ganymed.fScaleFactor",
|
---|
448 | "fExcessEvents*60/fEffOnTime" => "fExcessEvents*60/fEffOnTime",
|
---|
449 | "fBackgroundEvents*60/fEffOnTime" => "fBackgroundEvents*60/fEffOnTime",
|
---|
450 | "fSignalEvents*60/fEffOnTime" => "fSignalEvents*60/fEffOnTime",
|
---|
451 | "Round(fSignificance/Sqrt(fEffOnTime/3600),2)" => "Round(fSignificance/Sqrt(fEffOnTime/3600),2)",
|
---|
452 | "SUM(fRunTime)/3600" => "'Time [h]'",
|
---|
453 | "SUM(fNumEvents)" => "'Evts'",
|
---|
454 | "Min(fZenithDistanceMin)" => "'ZDMin'",
|
---|
455 | "Max(fZenithDistanceMax)" => "'ZDMax'",
|
---|
456 | "Min(fZenithDistance)" => "'ZdMin'",
|
---|
457 | "Max(fZenithDistance)" => "'ZdMax'",
|
---|
458 | // "COUNT(*)" => "'Sequ'",
|
---|
459 | );
|
---|
460 |
|
---|
461 | $table="";
|
---|
462 | if (!empty($tables[$val]))
|
---|
463 | $table=$tables[$val];
|
---|
464 | return $table;
|
---|
465 | }
|
---|
466 |
|
---|
467 |
|
---|
468 | function GetJoin($fromtable, $val)
|
---|
469 | {
|
---|
470 | $joins = array
|
---|
471 | (
|
---|
472 | "fRunTypeName" => " LEFT JOIN RunType ON " . $fromtable . ".fRunTypeKEY=RunType.fRunTypeKEY ",
|
---|
473 | "fProjectName" => " LEFT JOIN Project ON " . $fromtable . ".fProjectKEY=Project.fProjectKEY ",
|
---|
474 | "fSourceName" => " LEFT JOIN Source ON " . $fromtable . ".fSourceKEY=Source.fSourceKEY ",
|
---|
475 | "fMagicNumberName" => " LEFT JOIN MagicNumber ON " . $fromtable . ".fMagicNumberKEY=MagicNumber.fMagicNumberKEY ",
|
---|
476 | "fL1TriggerTableName" => " LEFT JOIN L1TriggerTable ON " . $fromtable . ".fL1TriggerTableKEY=L1TriggerTable.fL1TriggerTableKEY",
|
---|
477 | "fL2TriggerTableName" => " LEFT JOIN L2TriggerTable ON " . $fromtable . ".fL2TriggerTableKEY=L2TriggerTable.fL2TriggerTableKEY",
|
---|
478 | "fHvSettingsName" => " LEFT JOIN HvSettings ON " . $fromtable . ".fHvSettingsKEY=HvSettings.fHvSettingsKEY",
|
---|
479 | "fCalibrationScriptName" => " LEFT JOIN CalibrationScript ON " . $fromtable . ".fCalibrationScriptKEY=CalibrationScript.fCalibrationScriptKEY",
|
---|
480 | "fExcludedFDAName" => " LEFT JOIN ExcludedFDA ON " . $fromtable . ".fExcludedFDAKEY=ExcludedFDA.fExcludedFDAKEY",
|
---|
481 | "fManuallyChangedName" => " LEFT JOIN ManuallyChanged ON " . $fromtable . ".fManuallyChangedKEY=ManuallyChanged.fManuallyChangedKEY ",
|
---|
482 | "fDiscriminatorThresholdTableName" => " LEFT JOIN DiscriminatorThresholdTable ON " . $fromtable . ".fDiscriminatorThresholdTableKEY=DiscriminatorThresholdTable.fDiscriminatorThresholdTableKEY ",
|
---|
483 | "fTriggerDelayTableName" => " LEFT JOIN TriggerDelayTable ON " . $fromtable . ".fTriggerDelayTableKEY=TriggerDelayTable.fTriggerDelayTableKEY ",
|
---|
484 | "fTestFlagName" => " LEFT JOIN TestFlag ON " . $fromtable . ".fTestFlagKEY=TestFlag.fTestFlagKEY",
|
---|
485 | "fLightConditionsName" => " LEFT JOIN LightConditions ON " . $fromtable . ".fLightConditionsKEY=LightConditions.fLightConditionsKEY",
|
---|
486 | );
|
---|
487 |
|
---|
488 |
|
---|
489 | $join="";
|
---|
490 | if (!empty($joins[$val]))
|
---|
491 | $join=$joins[$val];
|
---|
492 | return $join;
|
---|
493 | }
|
---|
494 |
|
---|
495 |
|
---|
496 | ?>
|
---|