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 | "fDataRate" => "Img.<br>Rate<br>[Hz]",
|
---|
186 | "fMaxHumidity" => "Max<br>Hum<br>[%]",
|
---|
187 | "fEvents" => "DataEvents",
|
---|
188 | "fPositionSignal" => "ArrTime",
|
---|
189 | "fPositionFWHM" => "ArrTimeFWHM",
|
---|
190 | "fHeightSignal" => "Signal",
|
---|
191 | "fHeightFWHM" => "SignalFWHM",
|
---|
192 | "fHasSignal" => "HasSignal",
|
---|
193 | "fHasPedestal" => "HasPedestal",
|
---|
194 | "fPositionAsym" => "ArrTimeAsym",
|
---|
195 | "fHeightAsym" => "SignalAsym",
|
---|
196 | "fEventsInterlaced" => "CalEvents",
|
---|
197 | "fPositionSignalInterlaced" => "ArrTimeCal",
|
---|
198 | "fPositionFWHMInterlaced" => "ArrTimeFWHMCal",
|
---|
199 | "fHeightSignalInterlaced" => "SignalCal",
|
---|
200 | "fHeightFWHMInterlaced" => "SignalFWHMCal",
|
---|
201 | "fHasSignalInterlaced" => "HasSignalCal",
|
---|
202 | "fHasPedestalInterlaced" => "HasPedestalCal",
|
---|
203 | "fPositionAsymInterlaced" => "ArrTimeAsymCal",
|
---|
204 | "fHeightAsymInterlaced" => "SignalAsymCal",
|
---|
205 | "fExcessEvents" => "Exc<br>Evts",
|
---|
206 | "fBackgroundEvents" => "Bg<br>Evts",
|
---|
207 | "fSignalEvents" => "Sign<br>Evts",
|
---|
208 | "fSignificance" => "Sign",
|
---|
209 | "fScaleFactor" => "Scale",
|
---|
210 | "fDataSetNumber" => "Data<br>Set#",
|
---|
211 | "fWobble" => "Wobble",
|
---|
212 | "fComment" => "Comment",
|
---|
213 | "fExcessEvents*60/fEffOnTime" => "Exc<br>Rate",
|
---|
214 | "fBackgroundEvents*60/fEffOnTime" => "Bg<br>Rate",
|
---|
215 | "fSignalEvents*60/fEffOnTime" => "Sign<br>Rate",
|
---|
216 | "Round(fSignificance/Sqrt(fEffOnTime/3600),2)" => "Signf<br>Rate",
|
---|
217 | "SUM(fRunTime)/3600" => "Time [h]",
|
---|
218 | "SUM(fNumEvents)" => "Evts",
|
---|
219 | "Min(fZenithDistanceMin)" => "ZDMin",
|
---|
220 | "Max(fZenithDistanceMax)" => "ZDMax",
|
---|
221 | "Min(fZenithDistance)" => "ZdMin",
|
---|
222 | "Max(fZenithDistance)" => "ZdMax",
|
---|
223 | "COUNT(*)" => "Sequence",
|
---|
224 | "fArrTimeLimit" => "ArrTRms",
|
---|
225 | "fPedRmsInLimit" => "PedRms",
|
---|
226 | "fMuonRateLimit" => "MuonRate",
|
---|
227 | "fPSFLimit" => "PSF",
|
---|
228 | "fImgRateLimit" => "ImgRate",
|
---|
229 | "fUnsInLimit" => "Unsuit.In",
|
---|
230 | "fZdMinLimit" => "ZdMin",
|
---|
231 | "fZdMaxLimit" => "ZdMax",
|
---|
232 | );
|
---|
233 |
|
---|
234 |
|
---|
235 | $rightalign = array
|
---|
236 | (
|
---|
237 | $alias["fRawFileKEY"] => "1",
|
---|
238 | $alias["fFormatVersion"] => "1",
|
---|
239 | $alias["fRunNumber"] => "1",
|
---|
240 | $alias["fZenithDistance"] => "1",
|
---|
241 | $alias["fAzimuth"] => "1",
|
---|
242 | $alias["fMeanTriggerRate"] => "1",
|
---|
243 | $alias["fDaqTriggerRate"] => "1",
|
---|
244 | $alias["fDaqStoreRate"] => "1",
|
---|
245 | $alias["fL2RatePresc"] => "1",
|
---|
246 | $alias["fL2RateUnpresc"] => "1",
|
---|
247 | $alias["fSequenceFirst"] => "1",
|
---|
248 | $alias["fNumEvents"] => "1",
|
---|
249 | $alias["fRunTime/60"] => "1",
|
---|
250 | $alias["fSequenceLast"] => "1",
|
---|
251 | $alias["fZenithDistanceMin"] => "1",
|
---|
252 | $alias["fZenithDistanceMax"] => "1",
|
---|
253 | $alias["fAzimuthMin"] => "1",
|
---|
254 | $alias["fAzimuthMax"] => "1",
|
---|
255 | $alias["fUnsuitableOuter"] => "1",
|
---|
256 | $alias["fUnreliableOuter"] => "1",
|
---|
257 | $alias["fUnsuitableInner"] => "1",
|
---|
258 | $alias["fUnreliableInner"] => "1",
|
---|
259 | $alias["fIsolatedOuter"] => "1",
|
---|
260 | $alias["fIsolatedInner"] => "1",
|
---|
261 | $alias["fMeanPedRmsOuter"] => "1",
|
---|
262 | $alias["fMeanPedRmsInner"] => "1",
|
---|
263 | $alias["fArrTimeMeanInner"] => "1",
|
---|
264 | $alias["fArrTimeMeanOuter"] => "1",
|
---|
265 | $alias["fArrTimeRmsInner"] => "1",
|
---|
266 | $alias["fArrTimeRmsOuter"] => "1",
|
---|
267 | $alias["fConvFactorInner"] => "1",
|
---|
268 | $alias["fConvFactorOuter"] => "1",
|
---|
269 | $alias["fIsolatedMaxCluster"] => "1",
|
---|
270 | $alias["fMeanNumberIslands"] => "1",
|
---|
271 | $alias["fPSF"] => "1",
|
---|
272 | $alias["fRatio"] => "1",
|
---|
273 | $alias["fMuonNumber"] => "1",
|
---|
274 | $alias["fEffOnTime"] => "1",
|
---|
275 | $alias["fEffOnTime/3600"] => "1",
|
---|
276 | $alias["fMuonRate"] => "1",
|
---|
277 | $alias["fDataRate"] => "1",
|
---|
278 | $alias["fMaxHumidity"] => "1",
|
---|
279 | $alias["fDate"] => "1",
|
---|
280 | $alias["fCaCoFileFound"] => "1",
|
---|
281 | $alias["fTest"] => "1",
|
---|
282 | $alias["fSourceKEY"] => "1",
|
---|
283 | $alias["fEvents"] => "1",
|
---|
284 | $alias["fPositionSignal"] => "1",
|
---|
285 | $alias["fPositionFWHM"] => "1",
|
---|
286 | $alias["fHeightSignal"] => "1",
|
---|
287 | $alias["fHeightFWHM"] => "1",
|
---|
288 | $alias["fHasSignal"] => "1",
|
---|
289 | $alias["fHasPedestal"] => "1",
|
---|
290 | $alias["fPositionAsym"] => "1",
|
---|
291 | $alias["fHeightAsym"] => "1",
|
---|
292 | $alias["fEventsInterlaced"] => "1",
|
---|
293 | $alias["fPositionSignalInterlaced"] => "1",
|
---|
294 | $alias["fPositionFWHMInterlaced"] => "1",
|
---|
295 | $alias["fHeightSignalInterlaced"] => "1",
|
---|
296 | $alias["fHeightFWHMInterlaced"] => "1",
|
---|
297 | $alias["fHasSignalInterlaced"] => "1",
|
---|
298 | $alias["fHasPedestalInterlaced"] => "1",
|
---|
299 | $alias["fPositionAsymInterlaced"] => "1",
|
---|
300 | $alias["fHeightAsymInterlaced"] => "1",
|
---|
301 | "Time" => "1",
|
---|
302 | // "Time [h]" => "1",
|
---|
303 | "ZDMin" => "1",
|
---|
304 | "ZDMax" => "1",
|
---|
305 | // "Evts#" => "1",
|
---|
306 | // "Runs#" => "1"
|
---|
307 | "Runs" => "1",
|
---|
308 | "Evts" => "1",
|
---|
309 | );
|
---|
310 |
|
---|
311 | function GetCheck($fromtable, $val)
|
---|
312 | {
|
---|
313 | $checks = array
|
---|
314 | (
|
---|
315 | "fRunTypeName" => $fromtable . ".fRunTypeKEY",
|
---|
316 | "fProjectName" => $fromtable . ".fProjectKEY",
|
---|
317 | "fSourceName" => $fromtable . ".fSourceKEY",
|
---|
318 | "fMagicNumberName" => $fromtable . ".fMagicNumberKEY",
|
---|
319 | "fL1TriggerTableName" => $fromtable . ".fL1TriggerTableKEY",
|
---|
320 | "fL2TriggerTableName" => $fromtable . ".fL2TriggerTableKEY",
|
---|
321 | "fHvSettingsName" => $fromtable . ".fHvSettingsKEY",
|
---|
322 | "fCalibrationScriptName" => $fromtable . ".fCalibrationScriptKEY",
|
---|
323 | "fExcludedFDAName" => $fromtable . ".fExcludedFDAKEY",
|
---|
324 | "fManuallyChangedName" => $fromtable . ".fManuallyChangedKEY",
|
---|
325 | "fDiscriminatorThresholdTableName" => $fromtable . ".fDiscriminatorThresholdTableKEY",
|
---|
326 | "fTriggerDelayTableName" => $fromtable . ".fTriggerDelayTableKEY",
|
---|
327 | "fTestFlagName" => $fromtable . ".fTestFlagKEY",
|
---|
328 | "fLightConditionsName" => $fromtable . ".fLightConditionsKEY",
|
---|
329 | );
|
---|
330 |
|
---|
331 | $check="";
|
---|
332 | if (!empty($checks[$val]))
|
---|
333 | $check=$checks[$val];
|
---|
334 | return $check;
|
---|
335 | }
|
---|
336 |
|
---|
337 |
|
---|
338 | function GetTable($fromtable, $val)
|
---|
339 | {
|
---|
340 | $tables = array
|
---|
341 | (
|
---|
342 | "fSequenceFirst" => $fromtable . ".fSequenceFirst",
|
---|
343 | "fSequenceLast" => $fromtable . ".fSequenceLast",
|
---|
344 | "fNumEvents" => $fromtable . ".fNumEvents",
|
---|
345 | "fRunStart" => $fromtable . ".fRunStart",
|
---|
346 | "fLastUpdate" => $fromtable . ".fLastUpdate",
|
---|
347 | "fRunTime" => $fromtable . ".fRunTime",
|
---|
348 | "fRunTime/60" => $fromtable . ".fRunTime/60",
|
---|
349 | "fAzimuthMin" => $fromtable . ".fAzimuthMin",
|
---|
350 | "fAzimuthMax" => $fromtable . ".fAzimuthMax",
|
---|
351 | "fZenithDistanceMin" => $fromtable . ".fZenithDistanceMin",
|
---|
352 | "fZenithDistanceMax" => $fromtable . ".fZenithDistanceMax",
|
---|
353 | "fRunNumber" => "RunData.fRunNumber",
|
---|
354 | "fRunStop" => "RunData.fRunStop",
|
---|
355 | "fAzimuth" => "RunData.fAzimuth",
|
---|
356 | "fZenithDistance" => "RunData.fZenithDistance",
|
---|
357 | "fFormatVersion" => "RunData.fFormatVersion",
|
---|
358 | "fRunTypeName" => "RunType.fRunTypeName",
|
---|
359 | "fDaqStoreRate" => "RunData.fDaqStoreRate",
|
---|
360 | "fDaqTriggerRate" => "RunData.fDaqTriggerRate",
|
---|
361 | "fMeanTriggerRate" => "RunData.fMeanTriggerRate",
|
---|
362 | "fL2RatePresc" => "RunData.fL2RatePresc",
|
---|
363 | "fL2RateUnpresc" => "RunData.fL2RateUnpresc",
|
---|
364 | "fMagicNumberName" => "MagicNumber.fMagicNumberName",
|
---|
365 | "fExcludedFDAName" => "ExcludedFDA.fExcludedFDAName",
|
---|
366 | "fProjectName" => "Project.fProjectName",
|
---|
367 | "fSourceName" => "Source.fSourceName",
|
---|
368 | "fL1TriggerTableName" => "L1TriggerTable.fL1TriggerTableName",
|
---|
369 | "fL2TriggerTableName" => "L2TriggerTable.fL2TriggerTableName",
|
---|
370 | "fHvSettingsName" => "HvSettings.fHvSettingsName",
|
---|
371 | "fManuallyChangedName" => "ManuallyChanged.fManuallyChangedName",
|
---|
372 | "fTriggerDelayTableName" => "TriggerDelayTable.fTriggerDelayTableName",
|
---|
373 | "fDiscriminatorThresholdTableName" => "DiscriminatorThresholdTable.fDiscriminatorThesholdTableName",
|
---|
374 | "fCalibrationScriptName" => "CalibrationScript.fCalibrationScriptName",
|
---|
375 | "fTestFlagName" => "TestFlag.fTestFlagName",
|
---|
376 | "fLightConditionsName" => "LightConditions.fLightConditionsName",
|
---|
377 | "fRawFileAvail" => "RunProcessStatus.fRawFileAvail",
|
---|
378 | "fCCFileAvail" => "RunProcessStatus.fCCFileAvail",
|
---|
379 | "fCaCoFileAvail" => "RunProcessStatus.fCaCoFileAvail",
|
---|
380 | "fCaCoFileFound" => "RunProcessStatus.fCaCoFileFound",
|
---|
381 | "fTimingCorrection" => "RunProcessStatus.fTimingCorrection",
|
---|
382 | // "fFillDotRaw" => "RunProcessStatus.fFillDotRaw",
|
---|
383 | "fSequenceFileWritten" => "SequenceProcessStatus.fSequenceFileWritten",
|
---|
384 | "fAllFilesAvail" => "SequenceProcessStatus.fAllFilesAvail",
|
---|
385 | "fCallisto" => "SequenceProcessStatus.fCallisto",
|
---|
386 | "fFillCallisto" => "SequenceProcessStatus.fFillCallisto",
|
---|
387 | "fStar" => "SequenceProcessStatus.fStar",
|
---|
388 | "fFillStar" => "SequenceProcessStatus.fFillStar",
|
---|
389 | "fUnsuitableInner" => "Calibration.fUnsuitableInner",
|
---|
390 | "fUnsuitableOuter" => "Calibration.fUnsuitableOuter",
|
---|
391 | "fUnreliableInner" => "Calibration.fUnreliableInner",
|
---|
392 | "fUnreliableOuter" => "Calibration.fUnreliableOuter",
|
---|
393 | "fIsolatedInner" => "Calibration.fIsolatedInner",
|
---|
394 | "fIsolatedOuter" => "Calibration.fIsolatedOuter",
|
---|
395 | "fIsolatedMaxCluster" => "Calibration.fIsolatedMaxCluster",
|
---|
396 | "fLastUpdate" => "Calibration.fLastUpdate",
|
---|
397 | "fMeanPedRmsInner" => "Calibration.fMeanPedRmsInner",
|
---|
398 | "fMeanPedRmsOuter" => "Calibration.fMeanPedRmsOuter",
|
---|
399 | "fArrTimeMeanInner" => "Calibration.fArrTimeMeanInner",
|
---|
400 | "fArrTimeMeanOuter" => "Calibration.fArrTimeMeanOuter",
|
---|
401 | "fArrTimeRmsInner" => "Calibration.fArrTimeRmsInner",
|
---|
402 | "fArrTimeRmsOuter" => "Calibration.fArrTimeRmsOuter",
|
---|
403 | "fConvFactorInner" => "Calibration.fConvFactorInner",
|
---|
404 | "fConvFactorOuter" => "Calibration.fConvFactorOuter",
|
---|
405 | "fMeanNumberIslands" => "Star.fMeanNumberIslands",
|
---|
406 | "fPSF" => "Star.fPSF",
|
---|
407 | "fRatio" => "Star.fRatio",
|
---|
408 | "fMuonNumber" => "Star.fMuonNumber",
|
---|
409 | "fEffOnTime" => "fEffOnTime",
|
---|
410 | "fEffOnTime/3600" => "fEffOnTime/3600",
|
---|
411 | // "fEffOnTime" => $fromtable . ".fEffOnTime",
|
---|
412 | "fMuonRate" => "Star.fMuonRate",
|
---|
413 | "fDataRate" => "Star.fDataRate",
|
---|
414 | "fMaxHumidity" => "Star.fMaxHumidity",
|
---|
415 | "fDataSetNumber" => $fromtable . ".fDataSetNumber",
|
---|
416 | "fDataSetInserted" => "DataSetProcessStatus.fDataSetInserted",
|
---|
417 | "fStarFilesAvail" => "DataSetProcessStatus.fStarFilesAvail",
|
---|
418 | "fGanymed" => "DataSetProcessStatus.fGanymed",
|
---|
419 | "fFillGanymed" => "DataSetProcessStatus.fFillGanymed",
|
---|
420 | "fWobble" => "DataSets.fWobble",
|
---|
421 | "fComment" => "DataSets.fComment",
|
---|
422 | "fEvents" => "DataCheck.fEvents",
|
---|
423 | "fPositionSignal" => "DataCheck.fPositionSignal",
|
---|
424 | "fPositionFWHM" => "DataCheck.fPositionFWHM",
|
---|
425 | "fHeightSignal" => "DataCheck.fHeightSignal",
|
---|
426 | "fHeightFWHM" => "DataCheck.fHeightFWHM",
|
---|
427 | "fHasSignal" => "DataCheck.fHasSignal",
|
---|
428 | "fHasPedestal" => "DataCheck.fHasPedestal",
|
---|
429 | "fPositionAsym" => "DataCheck.fPositionAsym",
|
---|
430 | "fHeightAsym" => "DataCheck.fHeightAsym",
|
---|
431 | "fEventsInterlaced" => "DataCheck.fEventsInterlaced",
|
---|
432 | "fPositionSignalInterlaced" => "DataCheck.fPositionSignalInterlaced",
|
---|
433 | "fPositionFWHMInterlaced" => "DataCheck.fPositionFWHMInterlaced",
|
---|
434 | "fHeightSignalInterlaced" => "DataCheck.fHeightSignalInterlaced",
|
---|
435 | "fHeightFWHMInterlaced" => "DataCheck.fHeightFWHMInterlaced",
|
---|
436 | "fHasSignalInterlaced" => "DataCheck.fHasSignalInterlaced",
|
---|
437 | "fHasPedestalInterlaced" => "DataCheck.fHasPedestalInterlaced",
|
---|
438 | "fPositionAsymInterlaced" => "DataCheck.fPositionAsymInterlaced",
|
---|
439 | "fHeightAsymInterlaced" => "DataCheck.fHeightAsymInterlaced",
|
---|
440 | "fExcessEvents" => "Ganymed.fExcessEvents",
|
---|
441 | "fBackgroundEvents" => "Ganymed.fBackgroundEvents",
|
---|
442 | "fSignalEvents" => "Ganymed.fSignalEvents",
|
---|
443 | "fSignificance" => "Ganymed.fSignificance",
|
---|
444 | "fScaleFactor" => "Ganymed.fScaleFactor",
|
---|
445 | "fExcessEvents*60/fEffOnTime" => "fExcessEvents*60/fEffOnTime",
|
---|
446 | "fBackgroundEvents*60/fEffOnTime" => "fBackgroundEvents*60/fEffOnTime",
|
---|
447 | "fSignalEvents*60/fEffOnTime" => "fSignalEvents*60/fEffOnTime",
|
---|
448 | "Round(fSignificance/Sqrt(fEffOnTime/3600),2)" => "Round(fSignificance/Sqrt(fEffOnTime/3600),2)",
|
---|
449 | "SUM(fRunTime)/3600" => "'Time [h]'",
|
---|
450 | "SUM(fNumEvents)" => "'Evts'",
|
---|
451 | "Min(fZenithDistanceMin)" => "'ZDMin'",
|
---|
452 | "Max(fZenithDistanceMax)" => "'ZDMax'",
|
---|
453 | "Min(fZenithDistance)" => "'ZdMin'",
|
---|
454 | "Max(fZenithDistance)" => "'ZdMax'",
|
---|
455 | // "COUNT(*)" => "'Sequ'",
|
---|
456 | );
|
---|
457 |
|
---|
458 | $table="";
|
---|
459 | if (!empty($tables[$val]))
|
---|
460 | $table=$tables[$val];
|
---|
461 | return $table;
|
---|
462 | }
|
---|
463 |
|
---|
464 |
|
---|
465 | function GetJoin($fromtable, $val)
|
---|
466 | {
|
---|
467 | $joins = array
|
---|
468 | (
|
---|
469 | "fRunTypeName" => " LEFT JOIN RunType ON " . $fromtable . ".fRunTypeKEY=RunType.fRunTypeKEY ",
|
---|
470 | "fProjectName" => " LEFT JOIN Project ON " . $fromtable . ".fProjectKEY=Project.fProjectKEY ",
|
---|
471 | "fSourceName" => " LEFT JOIN Source ON " . $fromtable . ".fSourceKEY=Source.fSourceKEY ",
|
---|
472 | "fMagicNumberName" => " LEFT JOIN MagicNumber ON " . $fromtable . ".fMagicNumberKEY=MagicNumber.fMagicNumberKEY ",
|
---|
473 | "fL1TriggerTableName" => " LEFT JOIN L1TriggerTable ON " . $fromtable . ".fL1TriggerTableKEY=L1TriggerTable.fL1TriggerTableKEY",
|
---|
474 | "fL2TriggerTableName" => " LEFT JOIN L2TriggerTable ON " . $fromtable . ".fL2TriggerTableKEY=L2TriggerTable.fL2TriggerTableKEY",
|
---|
475 | "fHvSettingsName" => " LEFT JOIN HvSettings ON " . $fromtable . ".fHvSettingsKEY=HvSettings.fHvSettingsKEY",
|
---|
476 | "fCalibrationScriptName" => " LEFT JOIN CalibrationScript ON " . $fromtable . ".fCalibrationScriptKEY=CalibrationScript.fCalibrationScriptKEY",
|
---|
477 | "fExcludedFDAName" => " LEFT JOIN ExcludedFDA ON " . $fromtable . ".fExcludedFDAKEY=ExcludedFDA.fExcludedFDAKEY",
|
---|
478 | "fManuallyChangedName" => " LEFT JOIN ManuallyChanged ON " . $fromtable . ".fManuallyChangedKEY=ManuallyChanged.fManuallyChangedKEY ",
|
---|
479 | "fDiscriminatorThresholdTableName" => " LEFT JOIN DiscriminatorThresholdTable ON " . $fromtable . ".fDiscriminatorThresholdTableKEY=DiscriminatorThresholdTable.fDiscriminatorThresholdTableKEY ",
|
---|
480 | "fTriggerDelayTableName" => " LEFT JOIN TriggerDelayTable ON " . $fromtable . ".fTriggerDelayTableKEY=TriggerDelayTable.fTriggerDelayTableKEY ",
|
---|
481 | "fTestFlagName" => " LEFT JOIN TestFlag ON " . $fromtable . ".fTestFlagKEY=TestFlag.fTestFlagKEY",
|
---|
482 | "fLightConditionsName" => " LEFT JOIN LightConditions ON " . $fromtable . ".fLightConditionsKEY=LightConditions.fLightConditionsKEY",
|
---|
483 | );
|
---|
484 |
|
---|
485 |
|
---|
486 | $join="";
|
---|
487 | if (!empty($joins[$val]))
|
---|
488 | $join=$joins[$val];
|
---|
489 | return $join;
|
---|
490 | }
|
---|
491 |
|
---|
492 |
|
---|
493 | ?>
|
---|