source: tags/Mars-V2.1.1/datacenter/db/magicdefs.php

Last change on this file was 9052, checked in by Daniela Dorner, 16 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 43.3 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 "fDataSetFileWritten" => "fDataSetInserted",
22 "fStarFilesAvail" => "fDataSetFileWritten",
23 "fGanymed" => "fStarFilesAvail",
24 "fFillGanymed" => "fGanymed",
25 );
26
27
28$limitsmean = array
29 (
30 "fPedRmsInLimit" => "fMeanPedRmsInner",
31// "fArrTRmsLimit" => "fArrTimeRmsInner",
32 "fMuonRateLimit" => "fMuonRate",
33 "fMuonCalLimit" => "fRatio",
34 "fPSFLimit" => "fPSF",
35 "fInhomLimit" => "fInhomogeneity",
36 "fNumIslLimit" => "fMeanNumberIslands",
37 "fImgRateLimit" => "fDataRate",
38 "fSkyBrightLimit" => "fBrightnessMed",
39 );
40
41$limitsmin = array
42 (
43 "fZdMinLimit" => "fZenithDistanceMin",
44 "fNumStarsLimit" => "fNumStarsMed",
45 "fNumStarsCorLimit" => "fNumStarsCorMed",
46 "fMuonNumLimit" => "fMuonNumber",
47// "fArrTimeLimit" => "fArrTimeInner",
48 "fPulsePosLimit" => "fMeanPulsePosInner",
49 "fRunTimeLimit" => "fRunTime/60",
50 "fRelTimeMinLimit" => "fEffOnTime/fRunTime",
51 );
52
53$limitsmax = array
54 (
55 "fZdMaxLimit" => "fZenithDistanceMax",
56 "fUnsInLimit" => "fUnsuitableInner",
57 "fIsoInLimit" => "fIsolatedInner",
58 "fIMCLimit" => "fIsolatedMaxCluster",
59 "fMaxHumLimit" => "fMaxHumidity",
60 "fRelTimeMaxLimit" => "fEffOnTime/fRunTime",
61 );
62
63$checkwhere = array
64 (
65 "fRunTypeName" => CheckWhere("fRunTypeKEY", $_GET),
66 "fProjectName" => CheckWhere("fProjectKEY", $_GET),
67 "fSourceName" => CheckWhere("fSourceKEY", $_GET),
68 "fMagicNumberName" => CheckWhere("fMagicNumberKEY", $_GET),
69 "fL1TriggerTableName" => CheckWhere("fL1TriggerTableKEY", $_GET),
70 "fL2TriggerTableName" => CheckWhere("fL2TriggerTableKEY", $_GET),
71 "fHvSettingsName" => CheckWhere("fHvSettingsKEY", $_GET),
72 "fCalibrationScriptName" => CheckWhere("fCalibrationScriptKEY", $_GET),
73 "fExcludedFDAName" => CheckWhere("fExcludedFDAKEY", $_GET),
74 "fManuallyChangedName" => CheckWhere("fManuallyChangedKEY", $_GET),
75 "fObservationModeName" => CheckWhere("fObservationModeKEY", $_GET),
76 "fDiscriminatorThresholdTableName" => CheckWhere("fDiscriminatorThresholdTableKEY", $_GET),
77 "fTriggerDelayTableName" => CheckWhere("fTriggerDelayTableKEY", $_GET),
78 "fTestFlagName" => CheckWhere("fTestFlagKEY", $_GET),
79 "fLightConditionsName" => CheckWhere("fLightConditionsKEY", $_GET),
80 "fParticleTypeName" => CheckWhere("fParticleTypeKEY", $_GET),
81 "fFitsFileName" => CheckWhere("fFitsFileKEY", $_GET),
82 "fObjectName" => CheckWhere("fObjectKEY", $_GET),
83 "fStatusName" => CheckWhere("fStatusKEY", $_GET),
84 "fTelescopeName" => CheckWhere("fTelescopeKEY", $_GET),
85 "fBandName" => CheckWhere("fBandKEY", $_GET),
86 "fUserName" => CheckWhere("fUserKEY", $_GET),
87 );
88
89$checkgroup = array
90 (
91 "fRunTypeName" => CheckGroup("fRunTypeKEY", $_GET),
92 "fProjectName" => CheckGroup("fProjectKEY", $_GET),
93 "fSourceName" => CheckGroup("fSourceKEY", $_GET),
94 "fMagicNumberName" => CheckGroup("fMagicNumberKEY", $_GET),
95 "fL1TriggerTableName" => CheckGroup("fL1TriggerTableKEY", $_GET),
96 "fL2TriggerTableName" => CheckGroup("fL2TriggerTableKEY", $_GET),
97 "fHvSettingsName" => CheckGroup("fHvSettingsKEY", $_GET),
98 "fCalibrationScriptName" => CheckGroup("fCalibrationScriptKEY", $_GET),
99 "fExcludedFDAName" => CheckGroup("fExcludedFDAKEY", $_GET),
100 "fManuallyChangedName" => CheckGroup("fManuallyChangedKEY", $_GET),
101 "fObservationModeName" => CheckGroup("fObservationModeKEY", $_GET),
102 "fDiscriminatorThresholdTableName" => CheckGroup("fDiscriminatorThresholdTableKEY", $_GET),
103 "fTriggerDelayTableName" => CheckGroup("fTriggerDelayTableKEY", $_GET),
104 "fTestFlagName" => CheckGroup("fTestFlagKEY", $_GET),
105 "fLightConditionsName" => CheckGroup("fLightConditionsKEY", $_GET),
106 "fParticleTypeName" => CheckGroup("fParticleTypeKEY", $_GET),
107 "fFitsFileName" => CheckGroup("fFitsFileKEY", $_GET),
108 "fObjectName" => CheckGroup("fObjectKEY", $_GET),
109 "fStatusName" => CheckGroup("fStatusKEY", $_GET),
110 "fBandName" => CheckGroup("fBandKEY", $_GET),
111 "fUserName" => CheckGroup("fUserKEY", $_GET),
112 "fTelescopeName" => CheckGroup("fTelescopeKEY", $_GET),
113 );
114
115
116$checkstatusgroup = array
117 (
118 "fCCFilled" => CheckStatusGroup("fCCFilledStatus", $_GET),
119 "fExclusionsDone" => CheckStatusGroup("fExclusionsDoneStatus", $_GET),
120 "fSequenceEntriesBuilt" => CheckStatusGroup("fSequenceEntriesBuiltStatus",$_GET),
121 "fCCFileAvail" => CheckStatusGroup("fCCFileAvailStatus", $_GET),
122 "fCaCoFileAvail" => CheckStatusGroup("fCaCoFileAvailStatus", $_GET),
123 "fCaCoFileFound" => CheckStatusGroup("fCaCoFileFoundStatus", $_GET),
124 "fRawFileAvail" => CheckStatusGroup("fRawFileAvailStatus", $_GET),
125 "fTimingCorrection" => CheckStatusGroup("fTimingCorrectionStatus", $_GET),
126 "fDataCheckDone" => CheckStatusGroup("fDataCheckDoneStatus", $_GET),
127// "fFillDotRaw" => CheckStatusGroup("fFillDotRawStatus", $_GET),
128 "fSequenceFileWritten" => CheckStatusGroup("fSequenceFileWrittenStatus", $_GET),
129 "fAllFilesAvail" => CheckStatusGroup("fAllFilesAvailStatus", $_GET),
130 "fCallisto" => CheckStatusGroup("fCallistoStatus", $_GET),
131 "fFillCallisto" => CheckStatusGroup("fFillCallistoStatus", $_GET),
132 "fStar" => CheckStatusGroup("fStarStatus", $_GET),
133 "fFillStar" => CheckStatusGroup("fFillStarStatus", $_GET),
134 "fDataSetInserted" => CheckStatusGroup("fDataSetInsertedStatus", $_GET),
135 "fDataSetFileWritten" => CheckStatusGroup("fDataSetFileWrittenStatus", $_GET),
136 "fStarFilesAvail" => CheckStatusGroup("fStarFilesAvailStatus", $_GET),
137 "fGanymed" => CheckStatusGroup("fGanymedStatus", $_GET),
138 "fFillGanymed" => CheckStatusGroup("fFillGanymedStatus", $_GET),
139 );
140
141
142$checkenumgroup = array
143 (
144 "fHasSignal" => CheckEnumGroup("fHasSignalEnum", $_GET),
145 "fHasPedestal" => CheckEnumGroup("fHasPedestalEnum", $_GET),
146 "fHasSignalInterlaced" => CheckEnumGroup("fHasSignalInterlacedEnum", $_GET),
147 "fHasPedestalInterlaced" => CheckEnumGroup("fHasPedestalInterlacedEnum", $_GET),
148 );
149
150
151
152$alias = array
153 (
154 "fRawFileKEY" => "Idx",
155 "fMagicNumberName" => "Magic#",
156 "fFormatVersion" => "F-Ver",
157 "fLastUpdate" => "LastUpd",
158 "fRunNumber" => "Run#",
159 "fRunTypeName" => "RunType",
160 "fMeanTriggerRate" => "Rate<br>[Hz]",
161 "fDaqTriggerRate" => "Daq<br>TRate<br>[Hz]",
162 "fDaqStoreRate" => "Daq<br>SRate<br>[Hz]",
163 "fL2RatePresc" => "L2<br>pRate<br>[Hz]",
164 "fL2RateUnpresc" => "L2<br>upRate<br>[Hz]",
165 "fManuallyChangedName" => "Manually<br>Changed",
166 "fObservationModeName" => "Obs.<br>Mode",
167 "fLastUpdate" => "LastUpd",
168 "fSequenceFirst" => "Sequ",
169 "fProjectName" => "Project",
170 "fSourceName" => "Source",
171 "fNumEvents" => "#Evts",
172 "fRunTime/60" => "Up<br>Time<br>[min]",
173 "fRunStart" => "Start",
174 "fRunStop" => "Stop",
175// "fRunStart" => "StartTime",
176 "fSequenceLast" => "Last<br>Run",
177 "fL1TriggerTableName" => "L1Trig<br>Table",
178 "fL2TriggerTableName" => "L2Trig<br>Table",
179 "fHvSettingsName" => "HV Settings",
180 "fCalibrationScriptName" => "Cal Script",
181 "fTestFlagName" => "Testflag",
182 "fLightConditionsName" => "Lightcond",
183 "fTriggerDelayTableName" => "TrigDelay",
184 "fDiscriminatorThresholdTableName" => "DT",
185 "fExcludedFDAName" => "Exclusion",
186 "fZenithDistance" => "Zd",
187 "fAzimuth" => "Az",
188 "fZenithDistanceMin" => "Zd<br>Min",
189 "fZenithDistanceMax" => "Zd<br>Max",
190 "fAzimuthMin" => "Az<br>Min",
191 "fAzimuthMax" => "Az<br>Max",
192 "fTest" => "Test",
193 "fSourceKEY" => "KEY",
194 "fDate" => "Date",
195 "fCCFilled" => "CCFilled",
196 "fExclusionsDone" => "Exclusions",
197 "fSequenceEntriesBuilt" => "Sequences",
198 "fCCFileAvail" => "CCFile",
199 "fCaCoFileAvail" => "CaCoFile",
200 "fCaCoFileFound" => "CaCoRun",
201 "fRawFileAvail" => "RawFile",
202 "fTimingCorrection" => "TimingCorr",
203 "fDataCheckDone" => "Datacheck",
204// "fFillDotRaw" => "Filldotraw",
205 "fSequenceFileWritten" => "SequFile",
206 "fAllFilesAvail" => "FilesAvail",
207 "fCallisto" => "Callisto",
208 "fStar" => "Star",
209 "fFillCallisto" => "FillCal",
210 "fFillStar" => "FillStar",
211 "fDataSetInserted" => "DataSet",
212 "fDataSetFileWritten" => "DataSetFile",
213 "fStarFilesAvail" => "FilesAvail",
214 "fGanymed" => "Ganymed",
215 "fFillGanymed" => "FillGanymed",
216 "fUnsuitableOuter" => "Un<br>suit.<br>Out",
217 "fUnreliableOuter" => "Un<br>rel.<br>Out",
218 "fUnreliableInner" => "Un<br>rel.<br>In",
219 "fUnsuitableInner" => "Un<br>suit.<br>In",
220 "fUnsuitable50" => "Un<br>suit.<br>50",
221 "fUnsuitable01" => "Un<br>suit.<br>01",
222 "fUnsuitableMax" => "Un<br>suit.<br>Max",
223 "fDeadMax" => "Dead<br>Max",
224 "fRateTrigEvts" => "Rate Trig.<br>Evts [Hz]",
225 "fRateSumEvts" => "Rate Sum<br>Evts [Hz]",
226 "fRatePedEvts" => "Rate Ped<br>Evts [Hz]",
227 "fRatePedTrigEvts" => "Rate Ped.Trig.<br>Evts [Hz]",
228 "fRateCalEvts" => "Rate Cal.<br>Evts [Hz]",
229 "fRateNullEvts" => "Rate Null<br>Evts [Hz]",
230 "fRateUnknownEvts" => "Rate Unknown<br>Evts [Hz]",
231 "fRatioCalEvents" => "Ratio Cal.<br>Events",
232 "fPulsePosCalib" => "Pulse Pos.<br>Calib",
233 "fIsolatedOuter" => "Isol.<br>Out",
234 "fIsolatedInner" => "Isol.<br>In",
235 "fMeanPedRmsOuter" => "Ped<br>Rms<br>Out",
236 "fMeanPedRmsInner" => "Ped<br>Rms<br>In",
237 "fArrTimeMeanInner" => "Arr<br>Time<br>In",
238 "fArrTimeMeanOuter" => "Arr<br>Time<br>Out",
239 "fArrTimeRmsInner" => "Rms<br>ArrT<br>In",
240 "fArrTimeRmsOuter" => "Rms<br>ArrT<br>Out",
241 "fMeanSignalInner" => "Sign<br>In",
242 "fMeanSignalOuter" => "Sign<br>Out",
243 "fMeanPulsePosInner" => "Pulse<br>PosIn",
244 "fPulsePosMean" => "Puls<br>Pos",
245 "fConvFactorInner" => "Conv<br>In",
246 "fConvFactorOuter" => "Conv<br>Out",
247 // "fConvFactorInner" => "Conv Inner<BR>[ph/FADC]",
248 // "fConvFactorOuter" => "Conv Outer<BR>[ph/FADC]",
249 "fIsolatedMaxCluster" => "Isol.<br>Max<br>Cl",
250 "fMeanNumberIslands" => "Mean<br>Num<br>Isl",
251 "fPSF" => "PSF<br>[mm]",
252 "fRatio" => "Ratio<br>[%]",
253 "fMuonNumber" => "#<br>Muons",
254 "fEffOnTime" => "EffOn<br>Time<br>[s]",
255 "fEffOnTime/fRunTime" => "RelOn<br>Time",
256 "fEffOnTime/3600" => "EffOn<br>Time<br>[h]",
257 "fMuonRate" => "Muon<br>Rate<br>[Hz]",
258 "fInhomogeneity" => "Inhom",
259 "fDataRate" => "Img.<br>Rate<br>[Hz]",
260 "fSparkRate" => "Spark<br>Rate<br>[Hz]",
261 "fMaxHumidity" => "Max<br>Hum<br>[%]",
262 "fBrightnessMed" => "Sky<br>Brightn.<br>Med",
263 "fBrightnessRMS" => "Sky<br>Brightn.<br>RMS",
264 "fNumStarsMed" => "#<br>id.<br>stars",
265 "fNumStarsRMS" => "RMS<br>id.<br>stars",
266 "fNumStarsCorMed" => "#<br>cor.<br>stars",
267 "fNumStarsCorRMS" => "RMS<br>cor.<br>stars",
268 "fAvgWindSpeed" => "Avg. wind<br>speed [m/s]",
269 "fAvgTemperature" => "Avg. temp.<br>[deg]",
270 "fAvgHumidity" => "Avg. hum.<br>[%]",
271 "fAvgTempSky" => "Avg. sky<br>temp [deg]",
272 "fAvgCloudiness" => "Avg. cloud.<br>[%]",
273 "fRmsCloudiness" => "RMS cloud.<br>[%]",
274 "fEvents" => "DataEvents",
275 "fPositionSignal" => "ArrTime",
276 "fPositionFWHM" => "ArrTimeFWHM",
277 "fHeightSignal" => "Signal",
278 "fHeightFWHM" => "SignalFWHM",
279 "fHasSignal" => "HasSignal",
280 "fHasPedestal" => "HasPedestal",
281 "fPositionAsym" => "ArrTimeAsym",
282 "fHeightAsym" => "SignalAsym",
283 "fEventsInterlaced" => "CalEvents",
284 "fPositionSignalInterlaced" => "ArrTimeCal",
285 "fPositionFWHMInterlaced" => "ArrTimeFWHMCal",
286 "fHeightSignalInterlaced" => "SignalCal",
287 "fHeightFWHMInterlaced" => "SignalFWHMCal",
288 "fHasSignalInterlaced" => "HasSignalCal",
289 "fHasPedestalInterlaced" => "HasPedestalCal",
290 "fPositionAsymInterlaced" => "ArrTimeAsymCal",
291 "fHeightAsymInterlaced" => "SignalAsymCal",
292 "fExcessEvents" => "Exc<br>Evts",
293 "fBackgroundEvents" => "Bg<br>Evts",
294 "fSignalEvents" => "Sign<br>Evts",
295 "fSignificance" => "Sign",
296 "fScaleFactor" => "Scale",
297 "fDataSetNumber" => "Data<br>Set#",
298 "fComment" => "Comment",
299 "fUserName" => "User",
300 "fRunTime" => "Up<br>Time<br>[min]",
301 "fDataSetName" => "Name",
302 "fExcessEvents*60/fEffOnTime" => "Exc<br>Rate",
303 "fBackgroundEvents*60/fEffOnTime" => "Bg<br>Rate",
304 "fSignalEvents*60/fEffOnTime" => "Sign<br>Rate",
305 "Round(fSignificance/Sqrt(fEffOnTime/3600),2)" => "Signf<br>Rate",
306 "SUM(fRunTime)/3600" => "Time [h]",
307 "SUM(fNumEvents)" => "Evts",
308 "Min(fZenithDistanceMin)" => "ZDMin",
309 "Max(fZenithDistanceMax)" => "ZDMax",
310 "Min(fZenithDistance)" => "ZdMin",
311 "Max(fZenithDistance)" => "ZdMax",
312// "fArrTimeLimit" => "ArrTRms",
313// "fArrTimeLimit" => "ArrTime",
314 "fPulsePosLimit" => "PulsePos",
315 "fRunTimeLimit" => "UpTime",
316 "fPedRmsInLimit" => "PedRms",
317 "fMuonRateLimit" => "MuonRate",
318 "fMuonNumLimit" => "# Muons",
319 "fMuonCalLimit" => "MuonCal",
320 "fPSFLimit" => "PSF",
321 "fInhomLimit" => "Inhom.",
322 "fNumIslLimit" => "# Islands",
323 "fImgRateLimit" => "ImgRate",
324 "fSkyBrightLimit" => "SkyBrightness",
325 "fNumStarsLimit" => "# id. Stars",
326 "fNumStarsCorLimit" => "# cor. Stars",
327 "fUnsInLimit" => "Unsuit.In",
328 "fIsoInLimit" => "Isol.In",
329 "fIMCLimit" => "IMC",
330 "fMaxHumLimit" => "Humidity",
331 "fZdMinLimit" => "ZdMin",
332 "fZdMaxLimit" => "ZdMax",
333 "fRelTimeMaxLimit" => "Rel.Ontime",
334 "fRelTimeMinLimit" => "Rel.Ontime",
335 "fEMin" => "Emin",
336 "fEMax" => "Emax",
337 "fParticleTypeName" => "Particle",
338 "fStartTime" => "Process",
339 "fFailedTime" => "Failed",
340 "fReturnCode" => "Ret<br>Code",
341 "fProgramId" => "Prgr<br>Id",
342 "fTimestamp" => "Time",
343 "fExposure" => "Exposure",
344 "fFitsFileName" => "FitsFile",
345 "fObjectName" => "Object",
346 "fSkyLevel" => "SkyLevel",
347 "fFWHM" => "FWHM",
348 "fApertureRadius" => "Ap.Rad.",
349 "fInstrumentalMag" => "Instr.Mag.",
350 "fInstrumentalMagErr" => "Instr.Mag.Err.",
351 "fStatusName" => "StatusCode",
352 "fTelescopeName" => "Telescope",
353 "fBandName" => "Band",
354// "COUNT(*)" => "# Runs",
355// "COUNT(*)" => "Sequence",
356 );
357
358
359$rightalign = array
360 (
361 $alias["fRawFileKEY"] => "1",
362 $alias["fFormatVersion"] => "1",
363 $alias["fRunNumber"] => "1",
364 $alias["fZenithDistance"] => "1",
365 $alias["fAzimuth"] => "1",
366 $alias["fMeanTriggerRate"] => "1",
367 $alias["fDaqTriggerRate"] => "1",
368 $alias["fDaqStoreRate"] => "1",
369 $alias["fL2RatePresc"] => "1",
370 $alias["fL2RateUnpresc"] => "1",
371 $alias["fSequenceFirst"] => "1",
372 $alias["fNumEvents"] => "1",
373 $alias["fRunTime/60"] => "1",
374 $alias["fSequenceLast"] => "1",
375 $alias["fZenithDistanceMin"] => "1",
376 $alias["fZenithDistanceMax"] => "1",
377 $alias["fAzimuthMin"] => "1",
378 $alias["fAzimuthMax"] => "1",
379 $alias["fUnsuitableOuter"] => "1",
380 $alias["fUnreliableOuter"] => "1",
381 $alias["fUnsuitableInner"] => "1",
382 $alias["fUnreliableInner"] => "1",
383 $alias["fUnsuitable50"] => "1",
384 $alias["fUnsuitable01"] => "1",
385 $alias["fUnsuitableMax"] => "1",
386 $alias["fDeadMax"] => "1",
387 $alias["fRateTrigEvts"] => "1",
388 $alias["fRateSumEvts"] => "1",
389 $alias["fRatePedEvts"] => "1",
390 $alias["fRatePedTrigEvts"] => "1",
391 $alias["fRateCalEvts"] => "1",
392 $alias["fRateNullEvts"] => "1",
393 $alias["fRateUnknownEvts"] => "1",
394 $alias["fRatioCalEvents"] => "1",
395 $alias["fPulsePosCalib"] => "1",
396 $alias["fIsolatedOuter"] => "1",
397 $alias["fIsolatedInner"] => "1",
398 $alias["fMeanPedRmsOuter"] => "1",
399 $alias["fMeanPedRmsInner"] => "1",
400 $alias["fArrTimeMeanInner"] => "1",
401 $alias["fArrTimeMeanOuter"] => "1",
402 $alias["fArrTimeRmsInner"] => "1",
403 $alias["fArrTimeRmsOuter"] => "1",
404 $alias["fMeanSignalInner"] => "1",
405 $alias["fMeanSignalOuter"] => "1",
406 $alias["fPulsePosMean"] => "1",
407 $alias["fConvFactorInner"] => "1",
408 $alias["fConvFactorOuter"] => "1",
409 $alias["fIsolatedMaxCluster"] => "1",
410 $alias["fMeanNumberIslands"] => "1",
411 $alias["fPSF"] => "1",
412 $alias["fRatio"] => "1",
413 $alias["fMuonNumber"] => "1",
414 $alias["fEffOnTime"] => "1",
415 $alias["fEffOnTime/fRunTime"] => "1",
416 $alias["fEffOnTime/3600"] => "1",
417 $alias["fMuonRate"] => "1",
418 $alias["fInhomogeneity"] => "1",
419 $alias["fDataRate"] => "1",
420 $alias["fSparkRate"] => "1",
421 $alias["fMaxHumidity"] => "1",
422 $alias["fBrightnessMed"] => "1",
423 $alias["fBrightnessRMS"] => "1",
424 $alias["fNumStarsMed"] => "1",
425 $alias["fNumStarsRMS"] => "1",
426 $alias["fNumStarsCorMed"] => "1",
427 $alias["fNumStarsCorRMS"] => "1",
428 $alias["fAvgWindSpeed"] => "1",
429 $alias["fAvgTemperature"] => "1",
430 $alias["fAvgHumidity"] => "1",
431 $alias["fAvgTempSky"] => "1",
432 $alias["fAvgCloudiness"] => "1",
433 $alias["fRmsCloudiness"] => "1",
434 $alias["fDate"] => "1",
435 $alias["fCaCoFileFound"] => "1",
436 $alias["fTest"] => "1",
437 $alias["fSourceKEY"] => "1",
438 $alias["fEvents"] => "1",
439 $alias["fPositionSignal"] => "1",
440 $alias["fPositionFWHM"] => "1",
441 $alias["fHeightSignal"] => "1",
442 $alias["fHeightFWHM"] => "1",
443 $alias["fHasSignal"] => "1",
444 $alias["fHasPedestal"] => "1",
445 $alias["fPositionAsym"] => "1",
446 $alias["fHeightAsym"] => "1",
447 $alias["fEventsInterlaced"] => "1",
448 $alias["fPositionSignalInterlaced"] => "1",
449 $alias["fPositionFWHMInterlaced"] => "1",
450 $alias["fHeightSignalInterlaced"] => "1",
451 $alias["fHeightFWHMInterlaced"] => "1",
452 $alias["fHasSignalInterlaced"] => "1",
453 $alias["fHasPedestalInterlaced"] => "1",
454 $alias["fPositionAsymInterlaced"] => "1",
455 $alias["fHeightAsymInterlaced"] => "1",
456 $alias["fReturnCode"] => "1",
457 $alias["fProgramId"] => "1",
458 "Time" => "1",
459// "Time [h]" => "1",
460 "ZDMin" => "1",
461 "ZDMax" => "1",
462// "Evts#" => "1",
463// "Runs#" => "1"
464 "Runs" => "1",
465 "Evts" => "1",
466);
467
468function GetCheck($fromtable, $val)
469{
470 $checks = array
471 (
472 "fRunTypeName" => $fromtable . ".fRunTypeKEY",
473 "fProjectName" => $fromtable . ".fProjectKEY",
474 "fSourceName" => $fromtable . ".fSourceKEY",
475 "fMagicNumberName" => $fromtable . ".fMagicNumberKEY",
476 "fL1TriggerTableName" => $fromtable . ".fL1TriggerTableKEY",
477 "fL2TriggerTableName" => $fromtable . ".fL2TriggerTableKEY",
478 "fHvSettingsName" => $fromtable . ".fHvSettingsKEY",
479 "fCalibrationScriptName" => $fromtable . ".fCalibrationScriptKEY",
480 "fExcludedFDAName" => $fromtable . ".fExcludedFDAKEY",
481 "fManuallyChangedName" => $fromtable . ".fManuallyChangedKEY",
482 "fObservationModeName" => $fromtable . ".fObservationModeKEY",
483 "fDiscriminatorThresholdTableName" => $fromtable . ".fDiscriminatorThresholdTableKEY",
484 "fTriggerDelayTableName" => $fromtable . ".fTriggerDelayTableKEY",
485 "fTestFlagName" => $fromtable . ".fTestFlagKEY",
486 "fLightConditionsName" => $fromtable . ".fLightConditionsKEY",
487 "fParticleTypeName" => $fromtable . ".fParticleTypeKEY",
488 "fFitsFileName" => $fromtable . ".fFitsFileKEY",
489 "fObjectName" => $fromtable . ".fObjectKEY",
490 "fStatusName" => $fromtable . ".fStatusKEY",
491 "fBandName" => $fromtable . ".fBandKEY",
492 "fUserName" => $fromtable . ".fUserKEY",
493 "fTelescopeName" => $fromtable . ".fTelescopeKEY",
494 );
495
496 $check="";
497 if (!empty($checks[$val]))
498 $check=$checks[$val];
499 return $check;
500}
501
502
503function GetTable($fromtable, $val)
504{
505 $tables = array
506 (
507 "fSequenceFirst" => $fromtable . ".fSequenceFirst",
508 "fSequenceLast" => $fromtable . ".fSequenceLast",
509 "fNumEvents" => $fromtable . ".fNumEvents",
510 "fRunStart" => $fromtable . ".fRunStart",
511 "fLastUpdate" => $fromtable . ".fLastUpdate",
512 "fRunTime" => $fromtable . ".fRunTime",
513 "fRunTime/60" => $fromtable . ".fRunTime/60",
514 "fAzimuthMin" => $fromtable . ".fAzimuthMin",
515 "fAzimuthMax" => $fromtable . ".fAzimuthMax",
516 "fZenithDistanceMin" => $fromtable . ".fZenithDistanceMin",
517 "fZenithDistanceMax" => $fromtable . ".fZenithDistanceMax",
518 "fRunNumber" => "RunData.fRunNumber",
519 "fRunStop" => "RunData.fRunStop",
520 "fAzimuth" => "RunData.fAzimuth",
521 "fZenithDistance" => "RunData.fZenithDistance",
522 "fFormatVersion" => "RunData.fFormatVersion",
523 "fRunTypeName" => "RunType.fRunTypeName",
524 "fDaqStoreRate" => "RunData.fDaqStoreRate",
525 "fDaqTriggerRate" => "RunData.fDaqTriggerRate",
526 "fMeanTriggerRate" => "RunData.fMeanTriggerRate",
527 "fL2RatePresc" => "RunData.fL2RatePresc",
528 "fL2RateUnpresc" => "RunData.fL2RateUnpresc",
529 "fMagicNumberName" => "MagicNumber.fMagicNumberName",
530 "fExcludedFDAName" => "ExcludedFDA.fExcludedFDAName",
531 "fProjectName" => "Project.fProjectName",
532 "fSourceName" => "Source.fSourceName",
533 "fL1TriggerTableName" => "L1TriggerTable.fL1TriggerTableName",
534 "fL2TriggerTableName" => "L2TriggerTable.fL2TriggerTableName",
535 "fHvSettingsName" => "HvSettings.fHvSettingsName",
536 "fManuallyChangedName" => "ManuallyChanged.fManuallyChangedName",
537 "fObservationModeName" => "ObservationMode.fObservationModeName",
538 "fTriggerDelayTableName" => "TriggerDelayTable.fTriggerDelayTableName",
539 "fDiscriminatorThresholdTableName" => "DiscriminatorThresholdTable.fDiscriminatorThesholdTableName",
540 "fCalibrationScriptName" => "CalibrationScript.fCalibrationScriptName",
541 "fTestFlagName" => "TestFlag.fTestFlagName",
542 "fLightConditionsName" => "LightConditions.fLightConditionsName",
543 "fRawFileAvail" => "RunProcessStatus.fRawFileAvail",
544 "fCCFileAvail" => "RunProcessStatus.fCCFileAvail",
545 "fCaCoFileAvail" => "RunProcessStatus.fCaCoFileAvail",
546 "fCaCoFileFound" => "RunProcessStatus.fCaCoFileFound",
547 "fTimingCorrection" => "RunProcessStatus.fTimingCorrection",
548// "fFillDotRaw" => "RunProcessStatus.fFillDotRaw",
549 "fSequenceFileWritten" => "SequenceProcessStatus.fSequenceFileWritten",
550 "fAllFilesAvail" => "SequenceProcessStatus.fAllFilesAvail",
551 "fCallisto" => "SequenceProcessStatus.fCallisto",
552 "fFillCallisto" => "SequenceProcessStatus.fFillCallisto",
553 "fStar" => "SequenceProcessStatus.fStar",
554 "fFillStar" => "SequenceProcessStatus.fFillStar",
555 "fUnsuitableInner" => "Calibration.fUnsuitableInner",
556 "fUnsuitableOuter" => "Calibration.fUnsuitableOuter",
557 "fUnsuitable50" => "Calibration.fUnsuitable50",
558 "fUnsuitable01" => "Calibration.fUnsuitable01",
559 "fUnsuitableMax" => "Calibration.fUnsuitableMax",
560 "fDeadMax" => "Calibration.fDeadMax",
561 "fRateTrigEvts" => "Calibration.fRateTrigEvts",
562 "fRateSumEvts" => "Calibration.fRateSumEvts",
563 "fRatePedEvts" => "Calibration.fRatePedEvts",
564 "fRatePedTrigEvts" => "Calibration.fRatePedTrigEvts",
565 "fRateCalEvts" => "Calibration.fRateCalEvts",
566 "fRateNullEvts" => "Calibration.fRateNullEvts",
567 "fRateUnknownEvts" => "Calibration.fRateUnknownEvts",
568 "fRatioCalEvents" => "Calibration.fRatioCalEvents",
569 "fPulsePosCalib" => "Calibration.fPulsePosCalib",
570 "fUnreliableInner" => "Calibration.fUnreliableInner",
571 "fUnreliableOuter" => "Calibration.fUnreliableOuter",
572 "fIsolatedInner" => "Calibration.fIsolatedInner",
573 "fIsolatedOuter" => "Calibration.fIsolatedOuter",
574 "fIsolatedMaxCluster" => "Calibration.fIsolatedMaxCluster",
575 "fLastUpdate" => "Calibration.fLastUpdate",
576 "fMeanPedRmsInner" => "Calibration.fMeanPedRmsInner",
577 "fMeanPedRmsOuter" => "Calibration.fMeanPedRmsOuter",
578 "fArrTimeMeanInner" => "Calibration.fArrTimeMeanInner",
579 "fArrTimeMeanOuter" => "Calibration.fArrTimeMeanOuter",
580 "fArrTimeRmsInner" => "Calibration.fArrTimeRmsInner",
581 "fArrTimeRmsOuter" => "Calibration.fArrTimeRmsOuter",
582 "fMeanSignalInner" => "Calibration.fMeanSignalInner",
583 "fMeanSignalOuter" => "Calibration.fMeanSignalOuter",
584 "fPulsePosMean" => "Calibration.fPulsePosMean",
585 "fConvFactorInner" => "Calibration.fConvFactorInner",
586 "fConvFactorOuter" => "Calibration.fConvFactorOuter",
587 "fMeanNumberIslands" => "Star.fMeanNumberIslands",
588 "fPSF" => "Star.fPSF",
589 "fRatio" => "Star.fRatio",
590 "fMuonNumber" => "Star.fMuonNumber",
591 "fEffOnTime" => "fEffOnTime",
592 "fEffOnTime/fRunTime" => "Sequences.fRunTime/Star.fEffOnTime",
593 "fEffOnTime/3600" => "fEffOnTime/3600",
594// "fEffOnTime" => $fromtable . ".fEffOnTime",
595 "fMuonRate" => "Star.fMuonRate",
596 "fInhomogeneity" => "Star.fInhomogeneity",
597 "fDataRate" => "Star.fDataRate",
598 "fSparkRate" => "Star.fSparkRate",
599 "fMaxHumidity" => "Star.fMaxHumidity",
600 "fBrightnessMed" => "Star.fBrightnessMed",
601 "fBrightnessRMS" => "Star.fBrightnessRMS",
602 "fNumStarsMed" => "Star.fNumStarsMed",
603 "fNumStarsRMS" => "Star.fNumStarsRMS",
604 "fNumStarsCorMed" => "Star.fNumStarsCorMed",
605 "fNumStarsCorRMS" => "Star.fNumStarsCorRMS",
606 "fAvgWindSpeed" => "Star.fAvgWindSpeed",
607 "fAvgTemperature" => "Star.fAvgTemperature",
608 "fAvgHumidity" => "Star.fAvgHumidity",
609 "fAvgTempSky" => "Star.fAvgTempSky",
610 "fAvgCloudiness" => "Star.fAvgCloudiness",
611 "fRmsCloudiness" => "Star.fRmsCloudiness",
612 "fDataSetNumber" => $fromtable . ".fDataSetNumber",
613 "fDataSetInserted" => "DataSetProcessStatus.fDataSetInserted",
614 "fDataSetFileWritten" => "DataSetProcessStatus.fDataSetFileWritten",
615 "fStarFilesAvail" => "DataSetProcessStatus.fStarFilesAvail",
616 "fGanymed" => "DataSetProcessStatus.fGanymed",
617 "fFillGanymed" => "DataSetProcessStatus.fFillGanymed",
618 "fComment" => "DataSets.fComment",
619 "fDataSetName" => "DataSets.fDataSetName",
620 "fEvents" => "DataCheck.fEvents",
621 "fPositionSignal" => "DataCheck.fPositionSignal",
622 "fPositionFWHM" => "DataCheck.fPositionFWHM",
623 "fHeightSignal" => "DataCheck.fHeightSignal",
624 "fHeightFWHM" => "DataCheck.fHeightFWHM",
625 "fHasSignal" => "DataCheck.fHasSignal",
626 "fHasPedestal" => "DataCheck.fHasPedestal",
627 "fPositionAsym" => "DataCheck.fPositionAsym",
628 "fHeightAsym" => "DataCheck.fHeightAsym",
629 "fEventsInterlaced" => "DataCheck.fEventsInterlaced",
630 "fPositionSignalInterlaced" => "DataCheck.fPositionSignalInterlaced",
631 "fPositionFWHMInterlaced" => "DataCheck.fPositionFWHMInterlaced",
632 "fHeightSignalInterlaced" => "DataCheck.fHeightSignalInterlaced",
633 "fHeightFWHMInterlaced" => "DataCheck.fHeightFWHMInterlaced",
634 "fHasSignalInterlaced" => "DataCheck.fHasSignalInterlaced",
635 "fHasPedestalInterlaced" => "DataCheck.fHasPedestalInterlaced",
636 "fPositionAsymInterlaced" => "DataCheck.fPositionAsymInterlaced",
637 "fHeightAsymInterlaced" => "DataCheck.fHeightAsymInterlaced",
638 "fExcessEvents" => "Ganymed.fExcessEvents",
639 "fBackgroundEvents" => "Ganymed.fBackgroundEvents",
640 "fSignalEvents" => "Ganymed.fSignalEvents",
641 "fSignificance" => "Ganymed.fSignificance",
642 "fScaleFactor" => "Ganymed.fScaleFactor",
643 "fExcessEvents*60/fEffOnTime" => "fExcessEvents*60/fEffOnTime",
644 "fBackgroundEvents*60/fEffOnTime" => "fBackgroundEvents*60/fEffOnTime",
645 "fSignalEvents*60/fEffOnTime" => "fSignalEvents*60/fEffOnTime",
646 "Round(fSignificance/Sqrt(fEffOnTime/3600),2)" => "Round(fSignificance/Sqrt(fEffOnTime/3600),2)",
647 "SUM(fRunTime)/3600" => "'Time [h]'",
648 "SUM(fNumEvents)" => "'Evts'",
649 "Min(fZenithDistanceMin)" => "'ZDMin'",
650 "Max(fZenithDistanceMax)" => "'ZDMax'",
651 "Min(fZenithDistance)" => "'ZdMin'",
652 "Max(fZenithDistance)" => "'ZdMax'",
653// "COUNT(*)" => "'Sequence'",
654 "fStartTime" => "fStartTime",
655 "fFailedTime" => "fFailedTime",
656 "fReturnCode" => "fReturnCode",
657 "fProgramId" => "fProgramId",
658 "fParticleTypeName" => "ParticleType.fParticleTypeName",
659 "fFitsFileName" => "FitsFile.fFitsFileName",
660 "fObjectName" => "Object.fObjectName",
661 "fStatusName" => "Status.fStatusName",
662 "fBandName" => "Band.fBandName",
663 "fTelescopeName" => "Telescope.fTelescopeName",
664 "fUserName" => "User.fUserName",
665 );
666
667 $table="";
668 if (!empty($tables[$val]))
669 $table=$tables[$val];
670 if ($val=="NumRuns")
671 $table="'# Runs'";
672 if ($val=="NumSequ")
673 $table="'# Sequ'";
674 if ($val=="NumDS")
675 $table="'# Datasets'";
676 if ($val=="NumDays")
677 $table="'# days'";
678 if (empty($table))
679 $table=$val;
680 return $table;
681}
682
683
684function GetJoin($fromtable, $val)
685{
686 $joins = array
687 (
688 "fRunTypeName" => " LEFT JOIN RunType ON " . $fromtable . ".fRunTypeKEY=RunType.fRunTypeKEY ",
689 "fProjectName" => " LEFT JOIN Project ON " . $fromtable . ".fProjectKEY=Project.fProjectKEY ",
690 "fSourceName" => " LEFT JOIN Source ON " . $fromtable . ".fSourceKEY=Source.fSourceKEY ",
691 "fMagicNumberName" => " LEFT JOIN MagicNumber ON " . $fromtable . ".fMagicNumberKEY=MagicNumber.fMagicNumberKEY ",
692 "fL1TriggerTableName" => " LEFT JOIN L1TriggerTable ON " . $fromtable . ".fL1TriggerTableKEY=L1TriggerTable.fL1TriggerTableKEY",
693 "fL2TriggerTableName" => " LEFT JOIN L2TriggerTable ON " . $fromtable . ".fL2TriggerTableKEY=L2TriggerTable.fL2TriggerTableKEY",
694 "fHvSettingsName" => " LEFT JOIN HvSettings ON " . $fromtable . ".fHvSettingsKEY=HvSettings.fHvSettingsKEY",
695 "fCalibrationScriptName" => " LEFT JOIN CalibrationScript ON " . $fromtable . ".fCalibrationScriptKEY=CalibrationScript.fCalibrationScriptKEY",
696 "fExcludedFDAName" => " LEFT JOIN ExcludedFDA ON " . $fromtable . ".fExcludedFDAKEY=ExcludedFDA.fExcludedFDAKEY",
697 "fManuallyChangedName" => " LEFT JOIN ManuallyChanged ON " . $fromtable . ".fManuallyChangedKEY=ManuallyChanged.fManuallyChangedKEY ",
698 "fObservationModeName" => " LEFT JOIN ObservationMode ON " . $fromtable . ".fObservationModeKEY=ObservationMode.fObservationModeKEY ",
699 "fDiscriminatorThresholdTableName" => " LEFT JOIN DiscriminatorThresholdTable ON " . $fromtable . ".fDiscriminatorThresholdTableKEY=DiscriminatorThresholdTable.fDiscriminatorThresholdTableKEY ",
700 "fTriggerDelayTableName" => " LEFT JOIN TriggerDelayTable ON " . $fromtable . ".fTriggerDelayTableKEY=TriggerDelayTable.fTriggerDelayTableKEY ",
701 "fTestFlagName" => " LEFT JOIN TestFlag ON " . $fromtable . ".fTestFlagKEY=TestFlag.fTestFlagKEY",
702 "fLightConditionsName" => " LEFT JOIN LightConditions ON " . $fromtable . ".fLightConditionsKEY=LightConditions.fLightConditionsKEY",
703 "fParticleTypeName" => " LEFT JOIN ParticleType ON " . $fromtable . ".fParticleTypeKEY=ParticleType.fParticleTypeKEY ",
704 "fFitsFileName" => " LEFT JOIN FitsFile ON " . $fromtable . ".fFitsFileKEY=FitsFile.fFitsFileKEY",
705 "fObjectName" => " LEFT JOIN Object ON " . $fromtable . ".fObjectKEY=Object.fObjectKEY ",
706 "fStatusName" => " LEFT JOIN Status ON " . $fromtable . ".fStatusKEY=Status.fStatusKEY ",
707 "fBandName" => " LEFT JOIN Band ON " . $fromtable . ".fBandKEY=Band.fBandKEY ",
708 "fUserName" => " LEFT JOIN User ON " . $fromtable . ".fUserKEY=User.fUserKEY ",
709 "fTelescopeName" => " LEFT JOIN Telescope ON " . $fromtable . ".fTelescopeKEY=Telescope.fTelescopeKEY ",
710 );
711
712
713 $join="";
714 if (!empty($joins[$val]))
715 $join=$joins[$val];
716 return $join;
717}
718
719
720?>
Note: See TracBrowser for help on using the repository browser.