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