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

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