source: trunk/MagicSoft/Mars/datacenter/db/menu.php@ 8249

Last change on this file since 8249 was 8249, checked in by Daniela Dorner, 18 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 34.4 KB
Line 
1<?php
2
3function PrintRunInfoMenu()
4{
5 printf(" <div id='info' style='display:none'>");
6 printf(" <table>\n");
7 printf(" <tr>\n");
8
9 CheckBox("fRunStart", "Run start time");
10 CheckBox("fL2RatePresc", "L2 presc Rate");
11 CheckBox("fDaqStoreRate", "DAQ Storage Rate");
12 CheckBox("fAzimuth", "Azimuth");
13
14 printf(" </tr><tr>\n");
15
16 CheckBox("fRunStop", "Run stop time");
17 CheckBox("fL2RateUnpresc", "L2 unpresc Rate");
18 CheckBox("fDaqTriggerRate", "DAQ Trigger Rate");
19 CheckBox("fZenithDistance", "Zenith distance");
20
21 printf(" </tr><tr>\n");
22
23 // CheckBox("fFormatVersion", "File format");
24 CheckBox("fNumEvents", "Num of events");
25 CheckBox("fMeanTriggerRate", "Mean Trigger rate");
26 CheckBox("fSequenceFirst", "Sequence Number");
27 CheckBox("fTest", "incl. TestSources");
28
29 printf(" </tr>\n");
30 printf(" </table>\n");
31 printf(" </div><p>\n");
32}
33
34function PrintRunStatMenu()
35{
36 printf(" <div id=\"stat\" style='display:none'>\n");
37 printf(" <table>\n");
38 printf(" <tr><td>\n");
39
40 PrintStatusMenu("fCCFileAvail", "CC File available");
41 printf(" </td><td>\n");
42 PrintStatusMenu("fCaCoFileAvail", "Caco File available");
43 printf(" </td><td>\n");
44 PrintStatusMenu("fRawFileAvail", "Rawfile available");
45
46 printf(" </td></tr><tr><td>\n");
47
48 PrintStatusMenu("fTimingCorrection", "Timing Correction");
49 printf(" </td><td>\n");
50 PrintStatusMenu("fCaCoFileFound", "Caco File");
51 printf(" </td><td>\n");
52 PrintStatusMenu("fDataCheckDone", "DataCheck");
53
54 printf(" </td></tr></table>\n");
55 printf(" <p>\n");
56 printf(" </div><p>\n");
57}
58
59function PrintRunInfo2Menu($host,$user,$pw,$db)
60{
61 printf(" <div id='info2' style='display:none'>");
62 printf(" <table>\n");
63 printf(" <tr><td>\n");
64 PrintPullDown($host, $user, $pw, $db, "RunType", "fRunTypeName", "fRunTypeKEY", "Run type");
65 printf(" </td><td>\n");
66 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name");
67 printf(" </td><td>\n");
68 PrintPullDown($host, $user, $pw, $db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings");
69 printf(" </td><td>\n");
70 PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");
71 printf(" </td></tr><tr><td>\n");
72 PrintPullDown($host, $user, $pw, $db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag");
73 printf(" </td><td>\n");
74 PrintPullDown($host, $user, $pw, $db, "Project", "fProjectName", "fProjectKEY", "Project Name");
75 printf(" </td><td>\n");
76 PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
77 printf(" </td><td>\n");
78 PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");
79 printf(" </td></tr><tr><td>\n");
80 PrintPullDown($host, $user, $pw, $db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");
81 printf(" </td><td>\n");
82 PrintPullDown($host, $user, $pw, $db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions");
83 printf(" </td><td>\n");
84 PrintPullDown($host, $user, $pw, $db, "CalibrationScript", "fCalibrationScriptName", "fCalibrationScriptKEY", "Cal Script");
85 printf(" </td><td>\n");
86 PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table");
87 printf(" </td></tr><tr><td>\n");
88 PrintPullDown($host, $user, $pw, $db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");
89 printf(" </td><td>\n");
90 PrintPullDown($host, $user, $pw, $db, "ObservationMode", "fObservationModeName", "fObservationModeKEY", "Obs. Mode");
91 printf(" </td></tr></table>\n");
92 printf(" </div><p>\n");
93}
94
95function PrintSequInfoMenu()
96{
97 printf(" <div id='info' style='display:none'>");
98 printf(" <table>\n");
99
100 printf("<tr><td align='center'>\n");
101 printf(" <tr>\n");
102
103 CheckBox("fRunStart", "Start time");
104 CheckBox("fRunStop", "Stop time");
105 CheckBox("fNumEvents", "Num of events");
106 CheckBox("fRunTime/60", "Duration");
107
108 printf(" </tr><tr>\n");
109
110 CheckBox("fZenithDistanceMin", "Zenith distance min");
111 CheckBox("fZenithDistanceMax", "Zenith distance max");
112 CheckBox("fAzimuthMin", "Azimuth min");
113 CheckBox("fAzimuthMax", "Azimuth max");
114
115 printf(" </tr><tr>\n");
116
117 CheckBox("fSequenceLast", "Last run");
118
119 printf(" </tr><tr>\n");
120
121 CheckBox("fLinks", "Links");
122 CheckBox("fTest", "incl. TestSources");
123 CheckBox("fOff", "incl. offsources");
124 CheckBox("fOnlyOff", "only offsources");
125
126 printf(" </tr></table>\n");
127 printf(" </div><p>\n");
128}
129
130function PrintSequInfo2Menu($host,$user,$pw,$db)
131{
132 printf(" <div id='info2' style='display:none'>\n");
133 printf(" <table>\n");
134 printf(" <tr><td>\n");
135 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name");
136 printf(" </td><td>\n");
137 PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1Trigger Table");
138 printf(" </td><td>\n");
139 PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2Trigger Table");
140 printf(" </td><td>\n");
141 PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table");
142 printf(" </td></tr><tr><td>\n");
143 PrintPullDown($host, $user, $pw, $db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions");
144 printf(" </td><td>\n");
145 PrintPullDown($host, $user, $pw, $db, "Project", "fProjectName", "fProjectKEY", "Project Name");
146 printf(" </td><td>\n");
147 PrintPullDown($host, $user, $pw, $db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings");
148 printf(" </td><td>\n");
149 PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
150 printf(" </td></tr><tr><td>\n");
151 PrintPullDown($host, $user, $pw, $db, "ObservationMode", "fObservationModeName", "fObservationModeKEY", "Obs. Mode");
152 printf(" </td><td>\n");
153// PrintPullDown($host, $user, $pw, $db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed");
154// printf(" </td><td>\n");
155 PrintPullDown($host, $user, $pw, $db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag");
156 printf(" </td></tr>\n");
157 printf(" </table>\n");
158 printf(" </div><p>\n");
159}
160
161function PrintLimitsMenu($limitsmean, $limitsmin, $limitsmax, $alias, $old)
162{
163 printf("<div id='limits' style='display:none'>\n");
164 printf(" <table>\n");
165 printf(" <tr><th colspan='3'>Limits</th></tr>\n");
166 printf(" <tr><td valign='top'>\n");
167
168 printf(" <table>\n");
169 printf(" <tr><th>Name </th><th> Mean </th><th> Rms </th></tr>\n");
170
171 foreach($limitsmean as $key => $element)
172 {
173 printf("<tr><td>%s</td>\n", $alias[$key]);
174 $mean=$key . "Mean";
175 $limitmean=$_GET[$mean];
176 printf("<td><input name=\"%sMean\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limitmean);
177 $rms2=$key . "Rms";
178 $limitrms=$_GET[$rms2];
179 printf("<td><input name=\"%sRms\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limitrms);
180 printf("</tr>\n");
181 }
182
183 if (empty($old))
184 {
185 printf(" </table>\n");
186 printf(" </td>\n");
187 printf(" <td valign='top'>\n");
188 printf(" <table>\n");
189 }
190
191 printf(" <tr><th>Name </th><th> Min </th><th> Min2 </th></tr>\n");
192 foreach($limitsmin as $key => $element)
193 {
194 printf("<tr><td>%s</td>\n", $alias[$key]);
195 $level1=$key . "1";
196 $limit1=$_GET[$level1];
197 printf("<td><input name=\"%s1\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limit1);
198 $level2=$key . "2";
199 $limit2=$_GET[$level2];
200 printf("<td><input name=\"%s2\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limit2);
201 printf("</tr>\n");
202 }
203
204 if (empty($old))
205 {
206 printf(" </table>\n");
207 printf(" </td>\n");
208 printf(" <td valign='top'>\n");
209 printf(" <table>\n");
210 }
211
212 printf(" <tr><th>Name </th><th> Max </th><th> Max2 </th></tr>\n");
213 foreach($limitsmax as $key => $element)
214 {
215 printf("<tr><td>%s</td>\n", $alias[$key]);
216 $level1=$key . "1";
217 $limit1=$_GET[$level1];
218 printf("<td><input name=\"%s1\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limit1);
219 $level2=$key . "2";
220 $limit2=$_GET[$level2];
221 printf("<td><input name=\"%s2\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limit2);
222 printf("</tr>\n");
223 }
224 printf(" </table>\n");
225
226 printf(" </td></tr></table>\n");
227 printf("<p>\n");
228 printf("</div>\n");
229}
230
231function PrintSequStatMenu()
232{
233 printf(" <div id='stat' style='display:none'>\n");
234 printf(" <table><tr><td>\n");
235
236 PrintStatusMenu("fAllFilesAvail", "Files avail");
237 printf(" </td><td>\n");
238 PrintStatusMenu("fCallisto", "Callisto");
239 printf(" </td><td>\n");
240 PrintStatusMenu("fStar", "Star");
241 printf(" </td></tr><tr><td>\n");
242 PrintStatusMenu("fSequenceFileWritten", "Sequfile");
243 printf(" </td><td>\n");
244 PrintStatusMenu("fFillCallisto", "Fillcallisto");
245 printf(" </td><td>\n");
246 PrintStatusMenu("fFillStar", "Fillstar");
247
248 printf("</td></tr> </table>\n");
249 printf(" </div><p>\n");
250}
251
252function PrintFailMenu()
253{
254 printf(" <div id='fail' style='display:none'>\n");
255 printf(" <table>\n");
256 printf(" <tr>\n");
257
258 CheckBox("fStartTime", "ProcessTime");
259 CheckBox("fFailedTime", "FailTime");
260 CheckBox("fReturnCode", "RetCode");
261 CheckBox("fFailedCode", "FailCode");
262 CheckBox("fFailedCodeAdd", "FailCodeAdd");
263
264 printf(" </tr>\n");
265 printf(" </table>\n");
266 printf(" </div><p>\n");
267}
268
269function PrintCalMenu()
270{
271 printf(" <div id='cal' style='display:none'>\n");
272 printf(" <table>\n");
273 printf(" <tr>\n");
274
275 CheckBox("fUnsuitableInner", "Unsuitable inner");
276 CheckBox("fUnsuitableOuter", "Unsuitable outer");
277 CheckBox("fUnreliableInner", "Unreliable inner");
278 CheckBox("fUnreliableOuter", "Unreliable outer");
279
280 printf(" </tr><tr>\n");
281
282 CheckBox("fIsolatedInner", "Isolated inner");
283 CheckBox("fIsolatedOuter", "Isolated outer");
284 CheckBox("fIsolatedMaxCluster", "IsolatedMaxCluster");
285
286 printf(" </tr><tr>\n");
287
288 CheckBox("fArrTimeMeanInner", "ArrTimeMean inner ");
289 CheckBox("fArrTimeMeanOuter", "ArrTimeMean outer ");
290 CheckBox("fArrTimeRmsInner", "ArrTimeRms inner ");
291 CheckBox("fArrTimeRmsOuter", "ArrTimeRms outer ");
292
293 printf(" </tr><tr>\n");
294
295 CheckBox("fMeanPedRmsInner", "MeanPedRms inner");
296 CheckBox("fMeanPedRmsOuter", "MeanPedRms outer");
297 CheckBox("fMeanSignalInner", "MeanSignal inner");
298 CheckBox("fMeanSignalOuter", "MeanSignal outer");
299
300 printf(" </tr><tr>\n");
301
302 CheckBox("fConvFactorInner", "Conv inner ");
303 CheckBox("fConvFactorOuter", "Conv outer ");
304 CheckBox("fPulsePosMean", "Mean PulsePos");
305
306 printf(" </tr></table>\n");
307 printf(" </div><p>\n");
308}
309
310function PrintStarMenu()
311{
312 printf(" <div id='star' style='display:none'>\n");
313 printf(" <table>\n");
314 printf(" <tr>\n");
315
316 CheckBox("fDataRate", "CleanedEvtRate");
317 CheckBox("fMeanNumberIslands", "MeanNumIslands");
318 CheckBox("fMaxHumidity", "MaxHumidity");
319 CheckBox("fInhomogeneity", "Inhomogeneity");
320
321 printf(" </tr><tr>\n");
322
323 CheckBox("fMuonRate", "MuonRate");
324 CheckBox("fMuonNumber", "MuonNumber");
325 CheckBox("fRatio", "Ratio");
326 CheckBox("fPSF", "PSF");
327
328 printf(" </tr><tr>\n");
329
330 CheckBox("fEffOnTime", "EffOnTime");
331 CheckBox("fEffOnTime/fRunTime", "RelOnTime");
332 CheckBox("fBrightnessMed", "SkyBrightnessMed");
333 CheckBox("fBrightnessRMS", "SkyBrightnessRMS");
334
335 printf(" </tr><tr>\n");
336
337 CheckBox("fNumStarsMed", "# id. Stars");
338 CheckBox("fNumStarsRMS", "RMS id. Stars");
339 CheckBox("fNumStarsCorMed", "# cor. Stars");
340 CheckBox("fNumStarsCorRMS", "RMS cor. Stars");
341
342 printf(" </tr>\n");
343 printf(" </table>\n");
344 printf(" </div><p>\n");
345}
346
347function PrintDataSetInfoMenu($host,$user,$pw,$db)
348{
349 printf(" <div id=\"info\" style='display:none'>");
350 printf(" <table>\n");
351 printf(" <tr>\n");
352
353 CheckBox("fComment", "Comment");
354 CheckBox("fScaleFactor", "Scale");
355 CheckBox("fEffOnTime/3600", "EffOnTime");
356 CheckBox("fLinks", "Links");
357
358 printf(" </tr><tr>\n");
359
360 CheckBox("fExcessEvents", "ExcEvts");
361 CheckBox("fBackgroundEvents", "BgEvts");
362 CheckBox("fSignalEvents", "SignEvts");
363 CheckBox("fSignificance", "Sign");
364
365 printf(" </tr><tr>\n");
366
367 CheckBox("fExcessEvents*60/fEffOnTime", "ExcRate");
368 CheckBox("fBackgroundEvents*60/fEffOnTime", "BgRate");
369 CheckBox("fSignalEvents*60/fEffOnTime", "SignRate");
370 CheckBox("Round(fSignificance/Sqrt(fEffOnTime/3600),2)", "SignfRate");
371
372 printf(" </tr>\n");
373 printf(" </table>\n");
374 printf(" </div><p>\n");
375}
376
377function PrintDataSetStatMenu($host,$user,$pw,$db)
378{
379 printf(" <div id=\"stat\" style='display:none'>\n");
380 printf(" <table>\n");
381 printf(" <tr>\n");
382
383 printf(" <td>\n");
384 PrintStatusMenu("fDataSetInserted", "DataSet Inserted");
385 printf(" </td><td>\n");
386 PrintStatusMenu("fStarFilesAvail", "FilesAvail");
387 printf(" </td><td>\n");
388 PrintStatusMenu("fGanymed", "Ganymed");
389 printf(" </td><td>\n");
390 PrintStatusMenu("fFillGanymed", "FillGanymed");
391 printf(" </tr>\n");
392 printf(" </table>\n");
393 printf(" </div><p>\n");
394}
395
396function PrintRunRangeMenu($host,$user,$pw,$db)
397{
398 if (empty($_GET["fRunMin"]))
399 $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db);
400 else
401 $min = $_GET["fRunMin"];
402
403 if (empty($_GET["fRunMax"]))
404 $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db);
405 else
406 $max = $_GET["fRunMax"];
407
408 printf("Runs&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min);
409 printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
410}
411
412function PrintSequRangeMenu($host,$user,$pw,$db)
413{
414 if (empty($_GET["fRunMin"]))
415 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
416 else
417 $min = $_GET["fRunMin"];
418
419 if (empty($_GET["fRunMax"]))
420 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
421 else
422 $max = $_GET["fRunMax"];
423
424 printf("Sequences&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min);
425 printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
426}
427
428function PrintDataSetRangeMenu($host,$user,$pw,$db)
429{
430 if (empty($_GET["fRunMin"]))
431 $min = GetMin("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
432 else
433 $min = $_GET["fRunMin"];
434
435 if (empty($_GET["fRunMax"]))
436 $max = GetMax("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
437 else
438 $max = $_GET["fRunMax"];
439
440 printf("DataSets&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min);
441 printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
442}
443
444function PrintZdRangeMenu($host,$user,$pw,$db)
445{
446 if (empty($_GET["fZDMin"]))
447 $zdmin = GetMin("fZenithDistanceMin", "Sequences", $host, $user, $pw, $db);
448 else
449 $zdmin = $_GET["fZDMin"];
450
451 if (empty($_GET["fZDMax"]))
452 $zdmax = GetMax("fZenithDistanceMax", "Sequences", $host, $user, $pw, $db);
453 else
454 $zdmax = $_GET["fZDMax"];
455
456 printf("ZenithDistance&nbsp;from&nbsp;<input name=\"fZDMin\" type=\"text\" size=\"2\" maxlength=\"2\" value=\"%s\">\n", $zdmin);
457 printf("to&nbsp;<input name=\"fZDMax\" type=\"text\" size=\"2\" maxlength=\"2\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $zdmax);
458}
459
460function PrintNightRangeMenu($host,$user,$pw,$db)
461{
462 if (empty($_GET["fStartDate"]))
463 $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);
464 else
465 $timemin = $_GET["fStartDate"];
466
467 if (empty($_GET["fStopDate"]))
468 $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db);
469 else
470 $timemax = $_GET["fStopDate"];
471
472 printf("Night&nbsp;(yyyy-mm-dd)&nbsp;from&nbsp;<input name=\"fStartDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">\n", $timemin);
473 printf("to&nbsp;<input name=\"fStopDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">&nbsp;&nbsp;&nbsp;&nbsp;\n", $timemax);
474}
475
476function PrintStarRangeMenu($host,$user,$pw,$db)
477{
478 if (empty($_GET["fStarStart"]))
479 $starmin = GetMin("fStar", "SequenceProcessStatus", $host, $user, $pw, $db);
480 else
481 $starmin = $_GET["fStarStart"];
482
483 if (empty($_GET["fStarStop"]))
484 $starmax = GetMax("fStar", "SequenceProcessStatus", $host, $user, $pw, $db);
485 else
486 $starmax = $_GET["fStarStop"];
487
488 printf("<p>StarDone&nbsp;(yyyy-mm-dd)&nbsp;from&nbsp;<input name=\"fStarStart\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">\n", $starmin);
489 printf("to&nbsp;<input name=\"fStarStop\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">&nbsp;&nbsp;&nbsp;&nbsp;\n", $starmax);
490}
491
492function PrintSourceMenu($host,$user,$pw,$db)
493{
494 printf("Source&nbsp;(<A HREF=\"regexp.html\">regexp</A>)&nbsp;<input name=\"fSourceN\" type=\"text\" size=\"15\" maxlength=\"15\" value=\"");
495 if (!empty($_GET["fSourceN"]))
496 printf("%s", $_GET["fSourceN"]);
497 printf("\">&nbsp;&nbsp;&nbsp;\n");
498}
499function PrintSequMenu($host,$user,$pw,$db)
500{
501 printf("Sequ#&nbsp;<input name=\"fSequenceNo\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"");
502 if (!empty($_GET["fSequenceNo"]))
503 printf("%s", $_GET["fSequenceNo"]);
504 printf("\">&nbsp;&nbsp;&nbsp;\n");
505}
506
507function PrintNumResPullDown()
508{
509 printf(" Results:\n");
510 printf(" <select name=\"fNumResults\">\n");
511
512 $numres = array("10", "20", "50", "100", "200", "500", "1000", "2000");
513 foreach ($numres as $element)
514 {
515 if ($element==$_GET["fNumResults"])
516 printf("<option value=\"%s\" selected>%3s</option>\n", $element, $element);
517 else
518 printf("<option value=\"%s\">%3s</option>\n", $element, $element);
519 }
520 printf(" </select>\n");
521 printf(" &nbsp;&nbsp;&nbsp;\n");
522}
523
524function PrintButtons($page)
525{
526 printf("<input class='Width' type='submit' value='Query Table'>&nbsp;&nbsp;&nbsp;\n");
527 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"%s\"'>&nbsp;&nbsp;&nbsp;\n", $page);
528// printf("<p>");
529 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
530 printf("<input class='Width' type='button' value='Get .txt' onClick='self.location.href=\"%s&amp;fSendTxt=1\"'>&nbsp;&nbsp;&nbsp;\n", htmlspecialchars($_SERVER["REQUEST_URI"]));
531 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
532 {
533 printf("<input class='Width' type='button' value='Print' onClick='self.location.href=\"%s&amp;fPrintTable=1\"'>&nbsp;&nbsp;&nbsp;\n", htmlspecialchars($_SERVER["REQUEST_URI"]));
534 printf("MySqlQuery: <img id='showquerybutton' src='../plus.png' alt='+' onClick='showhide(\"showquery\")'>\n");
535 }
536}
537
538function InitFailInfo($_GET, $first)
539{
540 if (empty($_GET["fStartTime"]))
541 $_GET["fStartTime"]="Off";
542
543 if (empty($_GET["fFailedTime"]))
544 $_GET["fFailedTime"]="Off";
545
546 if (empty($_GET["fReturnCode"]))
547 $_GET["fReturnCode"]="Off";
548
549 if (empty($_GET["fFailedCode"]))
550 $_GET["fFailedCode"]="Off";
551
552 if (empty($_GET["fFailedCodeAdd"]))
553 $_GET["fFailedCodeAdd"]="Off";
554}
555
556function InitInfo($_GET, $first)
557{
558 if (empty($_GET["fNumResults"]))
559 $_GET["fNumResults"]="20";
560
561 if (empty($_GET["fNumEvents"]))
562 $_GET["fNumEvents"]="Off";
563
564 if (empty($_GET["fRunStart"]))
565 $_GET["fRunStart"]="Off";
566
567 if (empty($_GET["fRunStop"]))
568 $_GET["fRunStop"]="Off";
569
570 if (empty($_GET["fTest"]))
571 $_GET["fTest"]="Off";
572
573 if (empty($_GET["fSourceName"]))
574 $_GET["fSourceName"]="Off";
575
576 if (empty($_GET["fProjectName"]))
577 $_GET["fProjectName"]="Off";
578
579 if (empty($_GET["fL1TriggerTableName"]))
580 $_GET["fL1TriggerTableName"]="Off";
581
582 if (empty($_GET["fL2TriggerTableName"]))
583 $_GET["fL2TriggerTableName"]="Off";
584
585 if (empty($_GET["fHvSettingsName"]))
586 $_GET["fHvSettingsName"]="Off";
587
588 if (empty($_GET["fDiscriminatorThresholdTableName"]))
589 $_GET["fDiscriminatorThresholdTableName"]="Off";
590
591 if (empty($_GET["fTriggerDelayTableName"]))
592 $_GET["fTriggerDelayTableName"]="Off";
593
594 if (empty($_GET["fLightConditionsName"]))
595 $_GET["fLightConditionsName"]="Off";
596
597 if (empty($_GET["fTestFlagName"]))
598 $_GET["fTestFlagName"]="Off";
599}
600
601function InitRunStatus($_GET, $first)
602{
603 if (empty($_GET["fDataCheckDone"]))
604 $_GET["fDataCheckDone"]="Off";
605
606 if (empty($_GET["fDataCheckDoneStatus"]))
607 $_GET["fDataCheckDoneStatus"]="0";
608
609 if (empty($_GET["fCCFileAvail"]))
610 $_GET["fCCFileAvail"]="Off";
611
612 if (empty($_GET["fCCFileAvailStatus"]))
613 $_GET["fCCFileAvailStatus"]="0";
614
615 if (empty($_GET["fCaCoFileAvail"]))
616 $_GET["fCaCoFileAvail"]=$first?"On":"";
617
618 if (empty($_GET["fCaCoFileAvailStatus"]))
619 $_GET["fCaCoFileAvailStatus"]="0";
620
621 if (empty($_GET["fCaCoFileFound"]))
622 $_GET["fCaCoFileFound"]="Off";
623
624 if (empty($_GET["fCaCoFileFoundStatus"]))
625 $_GET["fCaCoFileFoundStatus"]="0";
626
627 if (empty($_GET["fRawFileAvail"]))
628 $_GET["fRawFileAvail"]="Off";
629
630 if (empty($_GET["fRawFileAvailStatus"]))
631 $_GET["fRawFileAvailStatus"]="0";
632
633 if (empty($_GET["fTimingCorrection"]))
634 $_GET["fTimingCorrection"]="Off";
635
636 if (empty($_GET["fTimingCorrectionStatus"]))
637 $_GET["fTimingCorrectionStatus"]="0";
638}
639
640function InitRunInfo($_GET, $first)
641{
642 InitRunStatus($_GET, $first);
643 InitInfo($_GET, $first);
644 InitFailInfo($_GET, $first);
645
646 if (empty($_GET["fFormatVersion"]))
647 $_GET["fFormatVersion"]="Off";
648
649 if (empty($_GET["fAzimuth"]))
650 $_GET["fAzimuth"]="Off";
651
652 if (empty($_GET["fZenithDistance"]))
653 $_GET["fZenithDistance"]="Off";
654
655 if (empty($_GET["fRunTypeName"]))
656 $_GET["fRunTypeName"]="Off";
657
658 if (empty($_GET["fExcludedFDAName"]))
659 $_GET["fExcludedFDAName"]="Off";
660
661 if (empty($_GET["fMagicNumberName"]))
662 $_GET["fMagicNumberName"]="Off";
663
664 if (empty($_GET["fObservationModeName"]))
665 $_GET["fObservationModeName"]="Off";
666
667 if (empty($_GET["fMeanTriggerRate"]))
668 $_GET["fMeanTriggerRate"]="Off";
669
670 if (empty($_GET["fCalibrationScriptName"]))
671 $_GET["fCalibrationScriptName"]="Off";
672
673 if (empty($_GET["fTestFlagName"]))
674 $_GET["fTestFlagName"]="Off";
675
676 if (empty($_GET["fDaqStoreRate"]))
677 $_GET["fDaqStoreRate"]="Off";
678
679 if (empty($_GET["fDaqTriggerRate"]))
680 $_GET["fDaqTriggerRate"]="Off";
681
682 if (empty($_GET["fL2RatePresc"]))
683 $_GET["fL2RatePresc"]="Off";
684
685 if (empty($_GET["fL2RateUnpresc"]))
686 $_GET["fL2RateUnpresc"]="Off";
687
688 if (empty($_GET["fSequenceFirst"]))
689 $_GET["fSequenceFirst"]="Off";
690
691 if (empty($_GET["fSequenceNo"]))
692 $_GET["fSequenceNo"]="";
693}
694
695function InitSequStatus($_GET, $first)
696{
697 if (empty($_GET["fSequenceFileWritten"]))
698 $_GET["fSequenceFileWritten"]="Off";
699
700 if (empty($_GET["fSequenceFileWrittenStatus"]))
701 $_GET["fSequenceFileWrittenStatus"]="0";
702
703 if (empty($_GET["fAllFilesAvail"]))
704 $_GET["fAllFilesAvail"]="Off";
705
706 if (empty($_GET["fAllFilesAvailStatus"]))
707 $_GET["fAllFilesAvailStatus"]="0";
708
709 if (empty($_GET["fCallisto"]))
710 $_GET["fCallisto"]="Off";
711
712 if (empty($_GET["fCallistoStatus"]))
713 $_GET["fCallistoStatus"]="0";
714
715 if (empty($_GET["fFillCallisto"]))
716 $_GET["fFillCallisto"]="Off";
717
718 if (empty($_GET["fFillCallistoStatus"]))
719 $_GET["fFillCallistoStatus"]="0";
720
721 if (empty($_GET["fStar"]))
722 $_GET["fStar"]="Off";
723
724 if (empty($_GET["fStarStatus"]))
725 $_GET["fStarStatus"]="0";
726
727 if (empty($_GET["fFillStar"]))
728 $_GET["fFillStar"]="Off";
729
730 if (empty($_GET["fFillStarStatus"]))
731 $_GET["fFillStarStatus"]="0";
732}
733
734function InitStarInfo($_GET, $first)
735{
736 if (empty($_GET["fMeanNumberIslands"]))
737 $_GET["fMeanNumberIslands"]="Off";
738
739 if (empty($_GET["fPSF"]))
740 $_GET["fPSF"]="Off";
741
742 if (empty($_GET["fRatio"]))
743 $_GET["fRatio"]="Off";
744
745 if (empty($_GET["fMuonNumber"]))
746 $_GET["fMuonNumber"]="Off";
747
748 if (empty($_GET["fEffOnTime"]))
749 $_GET["fEffOnTime"]="Off";
750
751 if (empty($_GET["fEffOnTime/fRunTime"]))
752 $_GET["fEffOnTime/fRunTime"]="Off";
753
754 if (empty($_GET["fMuonRate"]))
755 $_GET["fMuonRate"]="Off";
756
757 if (empty($_GET["fInhomogeneity"]))
758 $_GET["fInhomogeneity"]="Off";
759
760 if (empty($_GET["fDataRate"]))
761 $_GET["fDataRate"]="Off";
762
763 if (empty($_GET["fMaxHumidity"]))
764 $_GET["fMaxHumidity"]="Off";
765
766 if (empty($_GET["fBrightnessMed"]))
767 $_GET["fBrightnessMed"]="Off";
768
769 if (empty($_GET["fBrightnessRMS"]))
770 $_GET["fBrightnessRMS"]="Off";
771
772 if (empty($_GET["fNumStarsMed"]))
773 $_GET["fNumStarsMed"]="Off";
774
775 if (empty($_GET["fNumStarsRMS"]))
776 $_GET["fNumStarsRMS"]="Off";
777
778 if (empty($_GET["fNumStarsCorMed"]))
779 $_GET["fNumStarsCorMed"]="Off";
780
781 if (empty($_GET["fNumStarsCorRMS"]))
782 $_GET["fNumStarsCorRMS"]="Off";
783}
784
785function InitCalInfo($_GET, $first)
786{
787 if (empty($_GET["fUnreliableInner"]))
788 $_GET["fUnreliableInner"]="Off";
789
790 if (empty($_GET["fUnsuitableOuter"]))
791 $_GET["fUnsuitableOuter"]="Off";
792
793 if (empty($_GET["fUnreliableOuter"]))
794 $_GET["fUnreliableOuter"]="Off";
795
796 if (empty($_GET["fUnsuitableInner"]))
797 $_GET["fUnsuitableInner"]="Off";
798
799 if (empty($_GET["fIsolatedInner"]))
800 $_GET["fIsolatedInner"]="Off";
801
802 if (empty($_GET["fIsolatedOuter"]))
803 $_GET["fIsolatedOuter"]="Off";
804
805 if (empty($_GET["fMeanPedRmsInner"]))
806 $_GET["fMeanPedRmsInner"]="Off";
807
808 if (empty($_GET["fMeanPedRmsOuter"]))
809 $_GET["fMeanPedRmsOuter"]="Off";
810
811 if (empty($_GET["fIsolatedMaxCluster"]))
812 $_GET["fIsolatedMaxCluster"]="Off";
813
814 if (empty($_GET["fArrTimeMeanInner"]))
815 $_GET["fArrTimeMeanInner"]="Off";
816
817 if (empty($_GET["fArrTimeMeanOuter"]))
818 $_GET["fArrTimeMeanOuter"]="Off";
819
820 if (empty($_GET["fArrTimeRmsInner"]))
821 $_GET["fArrTimeRmsInner"]="Off";
822
823 if (empty($_GET["fArrTimeRmsOuter"]))
824 $_GET["fArrTimeRmsOuter"]="Off";
825
826 if (empty($_GET["fMeanSignalInner"]))
827 $_GET["fMeanSignalInner"]=$first?"Off":"";
828
829 if (empty($_GET["fMeanSignalOuter"]))
830 $_GET["fMeanSignalOuter"]=$first?"Off":"";
831
832 if (empty($_GET["fPulsePosMean"]))
833 $_GET["fPulsePosMean"]=$first?"Off":"";
834
835 if (empty($_GET["fConvFactorInner"]))
836 $_GET["fConvFactorInner"]="Off";
837
838 if (empty($_GET["fConvFactorOuter"]))
839 $_GET["fConvFactorOuter"]="Off";
840}
841
842function InitSequInfo($_GET, $first)
843{
844 InitInfo($_GET, $first);
845 InitSequStatus($_GET, $first);
846 InitFailInfo($_GET, $first);
847 InitCalInfo($_GET, $first);
848 InitStarInfo($_GET, $first);
849
850 if (empty($_GET["fRunTime/60"]))
851 $_GET["fRunTime/60"]="Off";
852
853 if (empty($_GET["fSequenceLast"]))
854 $_GET["fSequenceLast"]="Off";
855
856 if (empty($_GET["fAzimuthMin"]))
857 $_GET["fAzimuthMin"]="Off";
858
859 if (empty($_GET["fAzimuthMax"]))
860 $_GET["fAzimuthMax"]="Off";
861
862 if (empty($_GET["fZenithDistanceMin"]))
863 $_GET["fZenithDistanceMin"]="Off";
864
865 if (empty($_GET["fZenithDistanceMax"]))
866 $_GET["fZenithDistanceMax"]="Off";
867
868 if (empty($_GET["fObservationModeName"]))
869 $_GET["fObservationModeName"]="Off";
870
871// if (empty($_GET["fManuallyChangedName"]))
872// $_GET["fManuallyChangedName"]="Off";
873}
874
875function InitDataSetStatus($_GET, $first)
876{
877 if (empty($_GET["fDataSetInserted"]))
878 $_GET["fDataSetInserted"]="Off";
879
880 if (empty($_GET["fDataSetInsertedStatus"]))
881 $_GET["fDataSetInsertedStatus"]="0";
882
883 if (empty($_GET["fStarFilesAvail"]))
884 $_GET["fStarFilesAvail"]="Off";
885
886 if (empty($_GET["fStarFilesAvailStatus"]))
887 $_GET["fStarFilesAvailStatus"]="0";
888
889 if (empty($_GET["fGanymed"]))
890 $_GET["fGanymed"]=$first?"On":"";
891
892 if (empty($_GET["fGanymedStatus"]))
893 $_GET["fGanymedStatus"]="0";
894
895 if (empty($_GET["fFillGanymed"]))
896 $_GET["fFillGanymed"]="Off";
897
898 if (empty($_GET["fFillGanymedStatus"]))
899 $_GET["fFillGanymedStatus"]="0";
900}
901
902function InitDataSetInfo($_GET, $first)
903{
904 InitDataSetStatus($_GET, $first);
905 InitFailInfo($_GET, $first);
906
907 if (empty($_GET["fNumResults"]))
908 $_GET["fNumResults"]="50";
909
910 if (empty($_GET["fSourceName"]))
911 $_GET["fSourceName"]="Off";
912
913 if (empty($_GET["fComment"]))
914 $_GET["fComment"]="Off";
915
916 if (empty($_GET["fExcessEvents"]))
917 $_GET["fExcessEvents"]="Off";
918
919 if (empty($_GET["fExcessEvents*60/fEffOnTime"]))
920 $_GET["fExcessEvents*60/fEffOnTime"]="Off";
921
922 if (empty($_GET["fBackgroundEvents*60/fEffOnTime"]))
923 $_GET["fBackgroundEvents*60/fEffOnTime"]="Off";
924
925 if (empty($_GET["fBackgroundEvents"]))
926 $_GET["fBackgroundEvents"]="Off";
927
928 if (empty($_GET["fSignalEvents"]))
929 $_GET["fSignalEvents"]="Off";
930
931 if (empty($_GET["fSignalEvents*60/fEffOnTime"]))
932 $_GET["fSignalEvents*60/fEffOnTime"]="Off";
933
934 if (empty($_GET["fSignificance"]))
935 $_GET["fSignificance"]="Off";
936
937 if (empty($_GET["Round(fSignificance/Sqrt(fEffOnTime/3600),2)"]))
938 $_GET["Round(fSignificance/Sqrt(fEffOnTime/3600),2)"]="Off";
939
940 if (empty($_GET["fScaleFactor"]))
941 $_GET["fScaleFactor"]="Off";
942
943 if (empty($_GET["fEffOnTime/3600"]))
944 $_GET["fEffOnTime/3600"]="Off";
945}
946
947function InitFindOffData($_GET, $first)
948{
949 InitSequInfo($_GET, $first);
950
951 if (empty($_GET["fArrTimeLimitMean"]))
952 $_GET["fArrTimeLimitMean"]="";
953
954 if (empty($_GET["fArrTimeLimitRms"]))
955 $_GET["fArrTimeLimitRms"]="";
956
957 if (empty($_GET["fPedRmsInLimitMean"]))
958 $_GET["fPedRmsInLimitMean"]="";
959
960 if (empty($_GET["fPedRmsInLimitRms"]))
961 $_GET["fPedRmsInLimitRms"]="";
962
963 if (empty($_GET["fMuonRateLimitMean"]))
964 $_GET["fMuonRateLimitMean"]="";
965
966 if (empty($_GET["fMuonRateLimitRms"]))
967 $_GET["fMuonRateLimitRms"]="";
968
969 if (empty($_GET["fImgRateLimitMean"]))
970 $_GET["fImgRateLimitMean"]="";
971
972 if (empty($_GET["fImgRateLimitRms"]))
973 $_GET["fImgRateLimitRms"]="";
974
975 if (empty($_GET["fPSFLimitMean"]))
976 $_GET["fPSFLimitMean"]="";
977
978 if (empty($_GET["fPSFLimitRms"]))
979 $_GET["fPSFLimitRms"]="";
980
981 if (empty($_GET["fUnsInLimit1"]))
982 $_GET["fUnsInLimit1"]="";
983
984 if (empty($_GET["fUnsInLimit2"]))
985 $_GET["fUnsInLimit2"]="";
986
987 if (empty($_GET["fIsoInLimit1"]))
988 $_GET["fIsoInLimit1"]="";
989
990 if (empty($_GET["fIsoInLimit2"]))
991 $_GET["fIsoInLimit2"]="";
992
993 if (empty($_GET["fIMCLimit1"]))
994 $_GET["fIMCLimit1"]="";
995
996 if (empty($_GET["fIMCLimit2"]))
997 $_GET["fIMCLimit2"]="";
998
999 if (empty($_GET["fZdMinLimit1"]))
1000 $_GET["fZdMinLimit1"]="";
1001
1002 if (empty($_GET["fZdMinLimit2"]))
1003 $_GET["fZdMinLimit2"]="";
1004
1005 if (empty($_GET["fZdMaxLimit1"]))
1006 $_GET["fZdMaxLimit1"]="";
1007
1008 if (empty($_GET["fZdMaxLimit2"]))
1009 $_GET["fZdMaxLimit2"]="";
1010
1011 if (empty($_GET["fMuonCalLimitMean"]))
1012 $_GET["fMuonCalLimitMean"]="";
1013
1014 if (empty($_GET["fMuonCalLimitRms"]))
1015 $_GET["fMuonCalLimitRms"]="";
1016
1017 if (empty($_GET["fInhomLimitMean"]))
1018 $_GET["fInhomLimitMean"]="";
1019
1020 if (empty($_GET["fInhomLimitRms"]))
1021 $_GET["fInhomLimitRms"]="";
1022
1023 if (empty($_GET["fNumIslLimitMean"]))
1024 $_GET["fNumIslLimitMean"]="";
1025
1026 if (empty($_GET["fNumIslLimitRms"]))
1027 $_GET["fNumIslLimitRms"]="";
1028
1029 if (empty($_GET["fSkyBrightLimitMean"]))
1030 $_GET["fSkyBrightLimitMean"]="";
1031
1032 if (empty($_GET["fSkyBrightLimitRms"]))
1033 $_GET["fSkyBrightLimitRms"]="";
1034
1035 if (empty($_GET["fNumStarsLimit1"]))
1036 $_GET["fNumStarsLimit1"]="";
1037
1038 if (empty($_GET["fNumStarsLimit2"]))
1039 $_GET["fNumStarsLimit2"]="";
1040
1041 if (empty($_GET["fNumStarsCorLimit1"]))
1042 $_GET["fNumStarsCorLimit1"]="";
1043
1044 if (empty($_GET["fNumStarsCorLimit2"]))
1045 $_GET["fNumStarsCorLimit2"]="";
1046
1047 if (empty($_GET["fMuonNumLimit1"]))
1048 $_GET["fMuonNumLimit1"]="";
1049
1050 if (empty($_GET["fMuonNumLimit2"]))
1051 $_GET["fMuonNumLimit2"]="";
1052
1053 if (empty($_GET["fRelTimeMinLimit1"]))
1054 $_GET["fRelTimeMinLimit1"]="";
1055
1056 if (empty($_GET["fRelTimeMinLimit2"]))
1057 $_GET["fRelTimeMinLimit2"]="";
1058
1059 if (empty($_GET["fRelTimeMaxLimit1"]))
1060 $_GET["fRelTimeMaxLimit1"]="";
1061
1062 if (empty($_GET["fRelTimeMaxLimit2"]))
1063 $_GET["fRelTimeMaxLimit2"]="";
1064
1065 if (empty($_GET["fRunTimeLimit1"]))
1066 $_GET["fRunTimeLimit1"]="";
1067
1068 if (empty($_GET["fRunTimeLimit2"]))
1069 $_GET["fRunTimeLimit2"]="";
1070
1071 if (empty($_GET["fPulsePosLimit1"]))
1072 $_GET["fPulsePosLimit1"]="";
1073
1074 if (empty($_GET["fPulsePosLimit2"]))
1075 $_GET["fPulsePosLimit2"]="";
1076
1077 if (empty($_GET["fMaxHumLimit1"]))
1078 $_GET["fMaxHumLimit1"]="";
1079
1080 if (empty($_GET["fMaxHumLimit2"]))
1081 $_GET["fMaxHumLimit2"]="";
1082
1083}
1084
1085
1086?>
Note: See TracBrowser for help on using the repository browser.