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

Last change on this file since 7521 was 7521, checked in by Daniela Dorner, 19 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 30.0 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 "fEMin" => "Emin",
237 "fEMax" => "Emax",
238 );
239
240
241$rightalign = array
242 (
243 $alias["fRawFileKEY"] => "1",
244 $alias["fFormatVersion"] => "1",
245 $alias["fRunNumber"] => "1",
246 $alias["fZenithDistance"] => "1",
247 $alias["fAzimuth"] => "1",
248 $alias["fMeanTriggerRate"] => "1",
249 $alias["fDaqTriggerRate"] => "1",
250 $alias["fDaqStoreRate"] => "1",
251 $alias["fL2RatePresc"] => "1",
252 $alias["fL2RateUnpresc"] => "1",
253 $alias["fSequenceFirst"] => "1",
254 $alias["fNumEvents"] => "1",
255 $alias["fRunTime/60"] => "1",
256 $alias["fSequenceLast"] => "1",
257 $alias["fZenithDistanceMin"] => "1",
258 $alias["fZenithDistanceMax"] => "1",
259 $alias["fAzimuthMin"] => "1",
260 $alias["fAzimuthMax"] => "1",
261 $alias["fUnsuitableOuter"] => "1",
262 $alias["fUnreliableOuter"] => "1",
263 $alias["fUnsuitableInner"] => "1",
264 $alias["fUnreliableInner"] => "1",
265 $alias["fIsolatedOuter"] => "1",
266 $alias["fIsolatedInner"] => "1",
267 $alias["fMeanPedRmsOuter"] => "1",
268 $alias["fMeanPedRmsInner"] => "1",
269 $alias["fArrTimeMeanInner"] => "1",
270 $alias["fArrTimeMeanOuter"] => "1",
271 $alias["fArrTimeRmsInner"] => "1",
272 $alias["fArrTimeRmsOuter"] => "1",
273 $alias["fMeanSignalInner"] => "1",
274 $alias["fMeanSignalOuter"] => "1",
275 $alias["fPulsePosMean"] => "1",
276 $alias["fConvFactorInner"] => "1",
277 $alias["fConvFactorOuter"] => "1",
278 $alias["fIsolatedMaxCluster"] => "1",
279 $alias["fMeanNumberIslands"] => "1",
280 $alias["fPSF"] => "1",
281 $alias["fRatio"] => "1",
282 $alias["fMuonNumber"] => "1",
283 $alias["fEffOnTime"] => "1",
284 $alias["fEffOnTime/3600"] => "1",
285 $alias["fMuonRate"] => "1",
286 $alias["fInhomogeneity"] => "1",
287 $alias["fDataRate"] => "1",
288 $alias["fMaxHumidity"] => "1",
289 $alias["fDate"] => "1",
290 $alias["fCaCoFileFound"] => "1",
291 $alias["fTest"] => "1",
292 $alias["fSourceKEY"] => "1",
293 $alias["fEvents"] => "1",
294 $alias["fPositionSignal"] => "1",
295 $alias["fPositionFWHM"] => "1",
296 $alias["fHeightSignal"] => "1",
297 $alias["fHeightFWHM"] => "1",
298 $alias["fHasSignal"] => "1",
299 $alias["fHasPedestal"] => "1",
300 $alias["fPositionAsym"] => "1",
301 $alias["fHeightAsym"] => "1",
302 $alias["fEventsInterlaced"] => "1",
303 $alias["fPositionSignalInterlaced"] => "1",
304 $alias["fPositionFWHMInterlaced"] => "1",
305 $alias["fHeightSignalInterlaced"] => "1",
306 $alias["fHeightFWHMInterlaced"] => "1",
307 $alias["fHasSignalInterlaced"] => "1",
308 $alias["fHasPedestalInterlaced"] => "1",
309 $alias["fPositionAsymInterlaced"] => "1",
310 $alias["fHeightAsymInterlaced"] => "1",
311 "Time" => "1",
312// "Time [h]" => "1",
313 "ZDMin" => "1",
314 "ZDMax" => "1",
315// "Evts#" => "1",
316// "Runs#" => "1"
317 "Runs" => "1",
318 "Evts" => "1",
319);
320
321function GetCheck($fromtable, $val)
322{
323 $checks = array
324 (
325 "fRunTypeName" => $fromtable . ".fRunTypeKEY",
326 "fProjectName" => $fromtable . ".fProjectKEY",
327 "fSourceName" => $fromtable . ".fSourceKEY",
328 "fMagicNumberName" => $fromtable . ".fMagicNumberKEY",
329 "fL1TriggerTableName" => $fromtable . ".fL1TriggerTableKEY",
330 "fL2TriggerTableName" => $fromtable . ".fL2TriggerTableKEY",
331 "fHvSettingsName" => $fromtable . ".fHvSettingsKEY",
332 "fCalibrationScriptName" => $fromtable . ".fCalibrationScriptKEY",
333 "fExcludedFDAName" => $fromtable . ".fExcludedFDAKEY",
334 "fManuallyChangedName" => $fromtable . ".fManuallyChangedKEY",
335 "fDiscriminatorThresholdTableName" => $fromtable . ".fDiscriminatorThresholdTableKEY",
336 "fTriggerDelayTableName" => $fromtable . ".fTriggerDelayTableKEY",
337 "fTestFlagName" => $fromtable . ".fTestFlagKEY",
338 "fLightConditionsName" => $fromtable . ".fLightConditionsKEY",
339 );
340
341 $check="";
342 if (!empty($checks[$val]))
343 $check=$checks[$val];
344 return $check;
345}
346
347
348function GetTable($fromtable, $val)
349{
350 $tables = array
351 (
352 "fSequenceFirst" => $fromtable . ".fSequenceFirst",
353 "fSequenceLast" => $fromtable . ".fSequenceLast",
354 "fNumEvents" => $fromtable . ".fNumEvents",
355 "fRunStart" => $fromtable . ".fRunStart",
356 "fLastUpdate" => $fromtable . ".fLastUpdate",
357 "fRunTime" => $fromtable . ".fRunTime",
358 "fRunTime/60" => $fromtable . ".fRunTime/60",
359 "fAzimuthMin" => $fromtable . ".fAzimuthMin",
360 "fAzimuthMax" => $fromtable . ".fAzimuthMax",
361 "fZenithDistanceMin" => $fromtable . ".fZenithDistanceMin",
362 "fZenithDistanceMax" => $fromtable . ".fZenithDistanceMax",
363 "fRunNumber" => "RunData.fRunNumber",
364 "fRunStop" => "RunData.fRunStop",
365 "fAzimuth" => "RunData.fAzimuth",
366 "fZenithDistance" => "RunData.fZenithDistance",
367 "fFormatVersion" => "RunData.fFormatVersion",
368 "fRunTypeName" => "RunType.fRunTypeName",
369 "fDaqStoreRate" => "RunData.fDaqStoreRate",
370 "fDaqTriggerRate" => "RunData.fDaqTriggerRate",
371 "fMeanTriggerRate" => "RunData.fMeanTriggerRate",
372 "fL2RatePresc" => "RunData.fL2RatePresc",
373 "fL2RateUnpresc" => "RunData.fL2RateUnpresc",
374 "fMagicNumberName" => "MagicNumber.fMagicNumberName",
375 "fExcludedFDAName" => "ExcludedFDA.fExcludedFDAName",
376 "fProjectName" => "Project.fProjectName",
377 "fSourceName" => "Source.fSourceName",
378 "fL1TriggerTableName" => "L1TriggerTable.fL1TriggerTableName",
379 "fL2TriggerTableName" => "L2TriggerTable.fL2TriggerTableName",
380 "fHvSettingsName" => "HvSettings.fHvSettingsName",
381 "fManuallyChangedName" => "ManuallyChanged.fManuallyChangedName",
382 "fTriggerDelayTableName" => "TriggerDelayTable.fTriggerDelayTableName",
383 "fDiscriminatorThresholdTableName" => "DiscriminatorThresholdTable.fDiscriminatorThesholdTableName",
384 "fCalibrationScriptName" => "CalibrationScript.fCalibrationScriptName",
385 "fTestFlagName" => "TestFlag.fTestFlagName",
386 "fLightConditionsName" => "LightConditions.fLightConditionsName",
387 "fRawFileAvail" => "RunProcessStatus.fRawFileAvail",
388 "fCCFileAvail" => "RunProcessStatus.fCCFileAvail",
389 "fCaCoFileAvail" => "RunProcessStatus.fCaCoFileAvail",
390 "fCaCoFileFound" => "RunProcessStatus.fCaCoFileFound",
391 "fTimingCorrection" => "RunProcessStatus.fTimingCorrection",
392// "fFillDotRaw" => "RunProcessStatus.fFillDotRaw",
393 "fSequenceFileWritten" => "SequenceProcessStatus.fSequenceFileWritten",
394 "fAllFilesAvail" => "SequenceProcessStatus.fAllFilesAvail",
395 "fCallisto" => "SequenceProcessStatus.fCallisto",
396 "fFillCallisto" => "SequenceProcessStatus.fFillCallisto",
397 "fStar" => "SequenceProcessStatus.fStar",
398 "fFillStar" => "SequenceProcessStatus.fFillStar",
399 "fUnsuitableInner" => "Calibration.fUnsuitableInner",
400 "fUnsuitableOuter" => "Calibration.fUnsuitableOuter",
401 "fUnreliableInner" => "Calibration.fUnreliableInner",
402 "fUnreliableOuter" => "Calibration.fUnreliableOuter",
403 "fIsolatedInner" => "Calibration.fIsolatedInner",
404 "fIsolatedOuter" => "Calibration.fIsolatedOuter",
405 "fIsolatedMaxCluster" => "Calibration.fIsolatedMaxCluster",
406 "fLastUpdate" => "Calibration.fLastUpdate",
407 "fMeanPedRmsInner" => "Calibration.fMeanPedRmsInner",
408 "fMeanPedRmsOuter" => "Calibration.fMeanPedRmsOuter",
409 "fArrTimeMeanInner" => "Calibration.fArrTimeMeanInner",
410 "fArrTimeMeanOuter" => "Calibration.fArrTimeMeanOuter",
411 "fArrTimeRmsInner" => "Calibration.fArrTimeRmsInner",
412 "fArrTimeRmsOuter" => "Calibration.fArrTimeRmsOuter",
413 "fMeanSignalInner" => "Calibration.fMeanSignalInner",
414 "fMeanSignalOuter" => "Calibration.fMeanSignalOuter",
415 "fPulsePosMean" => "Calibration.fPulsePosMean",
416 "fConvFactorInner" => "Calibration.fConvFactorInner",
417 "fConvFactorOuter" => "Calibration.fConvFactorOuter",
418 "fMeanNumberIslands" => "Star.fMeanNumberIslands",
419 "fPSF" => "Star.fPSF",
420 "fRatio" => "Star.fRatio",
421 "fMuonNumber" => "Star.fMuonNumber",
422 "fEffOnTime" => "fEffOnTime",
423 "fEffOnTime/3600" => "fEffOnTime/3600",
424// "fEffOnTime" => $fromtable . ".fEffOnTime",
425 "fMuonRate" => "Star.fMuonRate",
426 "fInhomogeneity" => "Star.fInhomogeneity",
427 "fDataRate" => "Star.fDataRate",
428 "fMaxHumidity" => "Star.fMaxHumidity",
429 "fDataSetNumber" => $fromtable . ".fDataSetNumber",
430 "fDataSetInserted" => "DataSetProcessStatus.fDataSetInserted",
431 "fStarFilesAvail" => "DataSetProcessStatus.fStarFilesAvail",
432 "fGanymed" => "DataSetProcessStatus.fGanymed",
433 "fFillGanymed" => "DataSetProcessStatus.fFillGanymed",
434 "fWobble" => "DataSets.fWobble",
435 "fComment" => "DataSets.fComment",
436 "fEvents" => "DataCheck.fEvents",
437 "fPositionSignal" => "DataCheck.fPositionSignal",
438 "fPositionFWHM" => "DataCheck.fPositionFWHM",
439 "fHeightSignal" => "DataCheck.fHeightSignal",
440 "fHeightFWHM" => "DataCheck.fHeightFWHM",
441 "fHasSignal" => "DataCheck.fHasSignal",
442 "fHasPedestal" => "DataCheck.fHasPedestal",
443 "fPositionAsym" => "DataCheck.fPositionAsym",
444 "fHeightAsym" => "DataCheck.fHeightAsym",
445 "fEventsInterlaced" => "DataCheck.fEventsInterlaced",
446 "fPositionSignalInterlaced" => "DataCheck.fPositionSignalInterlaced",
447 "fPositionFWHMInterlaced" => "DataCheck.fPositionFWHMInterlaced",
448 "fHeightSignalInterlaced" => "DataCheck.fHeightSignalInterlaced",
449 "fHeightFWHMInterlaced" => "DataCheck.fHeightFWHMInterlaced",
450 "fHasSignalInterlaced" => "DataCheck.fHasSignalInterlaced",
451 "fHasPedestalInterlaced" => "DataCheck.fHasPedestalInterlaced",
452 "fPositionAsymInterlaced" => "DataCheck.fPositionAsymInterlaced",
453 "fHeightAsymInterlaced" => "DataCheck.fHeightAsymInterlaced",
454 "fExcessEvents" => "Ganymed.fExcessEvents",
455 "fBackgroundEvents" => "Ganymed.fBackgroundEvents",
456 "fSignalEvents" => "Ganymed.fSignalEvents",
457 "fSignificance" => "Ganymed.fSignificance",
458 "fScaleFactor" => "Ganymed.fScaleFactor",
459 "fExcessEvents*60/fEffOnTime" => "fExcessEvents*60/fEffOnTime",
460 "fBackgroundEvents*60/fEffOnTime" => "fBackgroundEvents*60/fEffOnTime",
461 "fSignalEvents*60/fEffOnTime" => "fSignalEvents*60/fEffOnTime",
462 "Round(fSignificance/Sqrt(fEffOnTime/3600),2)" => "Round(fSignificance/Sqrt(fEffOnTime/3600),2)",
463 "SUM(fRunTime)/3600" => "'Time [h]'",
464 "SUM(fNumEvents)" => "'Evts'",
465 "Min(fZenithDistanceMin)" => "'ZDMin'",
466 "Max(fZenithDistanceMax)" => "'ZDMax'",
467 "Min(fZenithDistance)" => "'ZdMin'",
468 "Max(fZenithDistance)" => "'ZdMax'",
469// "COUNT(*)" => "'Sequ'",
470 );
471
472 $table="";
473 if (!empty($tables[$val]))
474 $table=$tables[$val];
475 return $table;
476}
477
478
479function GetJoin($fromtable, $val)
480{
481 $joins = array
482 (
483 "fRunTypeName" => " LEFT JOIN RunType ON " . $fromtable . ".fRunTypeKEY=RunType.fRunTypeKEY ",
484 "fProjectName" => " LEFT JOIN Project ON " . $fromtable . ".fProjectKEY=Project.fProjectKEY ",
485 "fSourceName" => " LEFT JOIN Source ON " . $fromtable . ".fSourceKEY=Source.fSourceKEY ",
486 "fMagicNumberName" => " LEFT JOIN MagicNumber ON " . $fromtable . ".fMagicNumberKEY=MagicNumber.fMagicNumberKEY ",
487 "fL1TriggerTableName" => " LEFT JOIN L1TriggerTable ON " . $fromtable . ".fL1TriggerTableKEY=L1TriggerTable.fL1TriggerTableKEY",
488 "fL2TriggerTableName" => " LEFT JOIN L2TriggerTable ON " . $fromtable . ".fL2TriggerTableKEY=L2TriggerTable.fL2TriggerTableKEY",
489 "fHvSettingsName" => " LEFT JOIN HvSettings ON " . $fromtable . ".fHvSettingsKEY=HvSettings.fHvSettingsKEY",
490 "fCalibrationScriptName" => " LEFT JOIN CalibrationScript ON " . $fromtable . ".fCalibrationScriptKEY=CalibrationScript.fCalibrationScriptKEY",
491 "fExcludedFDAName" => " LEFT JOIN ExcludedFDA ON " . $fromtable . ".fExcludedFDAKEY=ExcludedFDA.fExcludedFDAKEY",
492 "fManuallyChangedName" => " LEFT JOIN ManuallyChanged ON " . $fromtable . ".fManuallyChangedKEY=ManuallyChanged.fManuallyChangedKEY ",
493 "fDiscriminatorThresholdTableName" => " LEFT JOIN DiscriminatorThresholdTable ON " . $fromtable . ".fDiscriminatorThresholdTableKEY=DiscriminatorThresholdTable.fDiscriminatorThresholdTableKEY ",
494 "fTriggerDelayTableName" => " LEFT JOIN TriggerDelayTable ON " . $fromtable . ".fTriggerDelayTableKEY=TriggerDelayTable.fTriggerDelayTableKEY ",
495 "fTestFlagName" => " LEFT JOIN TestFlag ON " . $fromtable . ".fTestFlagKEY=TestFlag.fTestFlagKEY",
496 "fLightConditionsName" => " LEFT JOIN LightConditions ON " . $fromtable . ".fLightConditionsKEY=LightConditions.fLightConditionsKEY",
497 );
498
499
500 $join="";
501 if (!empty($joins[$val]))
502 $join=$joins[$val];
503 return $join;
504}
505
506
507?>
Note: See TracBrowser for help on using the repository browser.