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

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