source: trunk/MagicSoft/Mars/datacenter/db/magicdefs.php@ 7527

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