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

Last change on this file since 8180 was 8180, checked in by Daniela Dorner, 18 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 31.5 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", "StartTime");
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("fWobble", "Wobble");
354 CheckBox("fComment", "Comment");
355 CheckBox("fScaleFactor", "Scale");
356 CheckBox("fEffOnTime/3600", "EffOnTime");
357 CheckBox("fLinks", "Links");
358
359 printf(" </tr><tr>\n");
360
361 CheckBox("fExcessEvents", "ExcEvts");
362 CheckBox("fBackgroundEvents", "BgEvts");
363 CheckBox("fSignalEvents", "SignEvts");
364 CheckBox("fSignificance", "Sign");
365
366 printf(" </tr><tr>\n");
367
368 CheckBox("fExcessEvents*60/fEffOnTime", "ExcRate");
369 CheckBox("fBackgroundEvents*60/fEffOnTime", "BgRate");
370 CheckBox("fSignalEvents*60/fEffOnTime", "SignRate");
371 CheckBox("Round(fSignificance/Sqrt(fEffOnTime/3600),2)", "SignfRate");
372
373 printf(" </tr>\n");
374 printf(" </table>\n");
375 printf(" </div><p>\n");
376}
377
378function PrintDataSetStatMenu($host,$user,$pw,$db)
379{
380 printf(" <div id=\"stat\" style='display:none'>\n");
381 printf(" <table>\n");
382 printf(" <tr>\n");
383
384 printf(" <td>\n");
385 PrintStatusMenu("fDataSetInserted", "DataSet Inserted");
386 printf(" </td><td>\n");
387 PrintStatusMenu("fStarFilesAvail", "FilesAvail");
388 printf(" </td><td>\n");
389 PrintStatusMenu("fGanymed", "Ganymed");
390 printf(" </td><td>\n");
391 PrintStatusMenu("fFillGanymed", "FillGanymed");
392 printf(" </tr>\n");
393 printf(" </table>\n");
394 printf(" </div><p>\n");
395}
396
397function PrintRunRangeMenu($host,$user,$pw,$db)
398{
399 if (empty($_GET["fRunMin"]))
400 $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db);
401 else
402 $min = $_GET["fRunMin"];
403
404 if (empty($_GET["fRunMax"]))
405 $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db);
406 else
407 $max = $_GET["fRunMax"];
408
409 printf("Runs&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min);
410 printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
411}
412
413function PrintSequRangeMenu($host,$user,$pw,$db)
414{
415 if (empty($_GET["fRunMin"]))
416 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
417 else
418 $min = $_GET["fRunMin"];
419
420 if (empty($_GET["fRunMax"]))
421 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
422 else
423 $max = $_GET["fRunMax"];
424
425 printf("Sequences&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min);
426 printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
427}
428
429function PrintDataSetRangeMenu($host,$user,$pw,$db)
430{
431 if (empty($_GET["fRunMin"]))
432 $min = GetMin("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
433 else
434 $min = $_GET["fRunMin"];
435
436 if (empty($_GET["fRunMax"]))
437 $max = GetMax("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
438 else
439 $max = $_GET["fRunMax"];
440
441 printf("DataSets&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min);
442 printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
443}
444
445function PrintZdRangeMenu($host,$user,$pw,$db)
446{
447 if (empty($_GET["fZDMin"]))
448 $zdmin = GetMin("fZenithDistanceMin", "Sequences", $host, $user, $pw, $db);
449 else
450 $zdmin = $_GET["fZDMin"];
451
452 if (empty($_GET["fZDMax"]))
453 $zdmax = GetMax("fZenithDistanceMax", "Sequences", $host, $user, $pw, $db);
454 else
455 $zdmax = $_GET["fZDMax"];
456
457 printf("ZenithDistance&nbsp;from&nbsp;<input name=\"fZDMin\" type=\"text\" size=\"2\" maxlength=\"2\" value=\"%s\">\n", $zdmin);
458 printf("to&nbsp;<input name=\"fZDMax\" type=\"text\" size=\"2\" maxlength=\"2\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $zdmax);
459}
460
461function PrintNightRangeMenu($host,$user,$pw,$db)
462{
463 if (empty($_GET["fStartDate"]))
464 $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);
465 else
466 $timemin = $_GET["fStartDate"];
467
468 if (empty($_GET["fStopDate"]))
469 $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db);
470 else
471 $timemax = $_GET["fStopDate"];
472
473 printf("Night&nbsp;(yyyy-mm-dd)&nbsp;from&nbsp;<input name=\"fStartDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">\n", $timemin);
474 printf("to&nbsp;<input name=\"fStopDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">&nbsp;&nbsp;&nbsp;&nbsp;\n", $timemax);
475}
476
477function PrintStarRangeMenu($host,$user,$pw,$db)
478{
479 if (empty($_GET["fStarStart"]))
480 $starmin = GetMin("fStar", "SequenceProcessStatus", $host, $user, $pw, $db);
481 else
482 $starmin = $_GET["fStarStart"];
483
484 if (empty($_GET["fStarStop"]))
485 $starmax = GetMax("fStar", "SequenceProcessStatus", $host, $user, $pw, $db);
486 else
487 $starmax = $_GET["fStarStop"];
488
489 printf("<p>StarDone&nbsp;(yyyy-mm-dd)&nbsp;from&nbsp;<input name=\"fStarStart\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">\n", $starmin);
490 printf("to&nbsp;<input name=\"fStarStop\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">&nbsp;&nbsp;&nbsp;&nbsp;\n", $starmax);
491}
492
493function PrintSourceMenu($host,$user,$pw,$db)
494{
495 printf("Source&nbsp;(<A HREF=\"regexp.html\">regexp</A>)&nbsp;<input name=\"fSourceN\" type=\"text\" size=\"15\" maxlength=\"15\" value=\"");
496 if (!empty($_GET["fSourceN"]))
497 printf("%s", $_GET["fSourceN"]);
498 printf("\">&nbsp;&nbsp;&nbsp;\n");
499}
500function PrintSequMenu($host,$user,$pw,$db)
501{
502 printf("Sequ#&nbsp;<input name=\"fSequenceNo\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"");
503 if (!empty($_GET["fSequenceNo"]))
504 printf("%s", $_GET["fSequenceNo"]);
505 printf("\">&nbsp;&nbsp;&nbsp;\n");
506}
507
508function PrintNumResPullDown()
509{
510 printf(" Results:\n");
511 printf(" <select name=\"fNumResults\">\n");
512
513 $numres = array("10", "20", "50", "100", "200", "500", "1000", "2000");
514 foreach ($numres as $element)
515 {
516 if ($element==$_GET["fNumResults"])
517 printf("<option value=\"%s\" selected>%3s</option>\n", $element, $element);
518 else
519 printf("<option value=\"%s\">%3s</option>\n", $element, $element);
520 }
521 printf(" </select>\n");
522 printf(" &nbsp;&nbsp;&nbsp;\n");
523}
524
525function PrintButtons($page)
526{
527 printf("<input class='Width' type='submit' value='Query Table'>&nbsp;&nbsp;&nbsp;\n");
528 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"%s\"'>&nbsp;&nbsp;&nbsp;\n", $page);
529// printf("<p>");
530 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
531 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"]));
532 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
533 {
534 printf("<input class='Width' type='button' value='Print' onClick='self.location.href=\"%s&amp;fPrintTable=1\"'>&nbsp;&nbsp;&nbsp;\n", htmlspecialchars($_SERVER["REQUEST_URI"]));
535 printf("MySqlQuery: <img id='showquerybutton' src='../plus.png' alt='+' onClick='showhide(\"showquery\")'>\n");
536 }
537}
538
539function InitFailInfo($_GET)
540{
541 if (empty($_GET["fStartTime"]))
542 $_GET["fStartTime"]="Off";
543
544 if (empty($_GET["fFailedTime"]))
545 $_GET["fFailedTime"]="Off";
546
547 if (empty($_GET["fReturnCode"]))
548 $_GET["fReturnCode"]="Off";
549
550 if (empty($_GET["fFailedCode"]))
551 $_GET["fFailedCode"]="Off";
552
553 if (empty($_GET["fFailedCodeAdd"]))
554 $_GET["fFailedCodeAdd"]="Off";
555}
556
557function InitInfo($_GET)
558{
559 if (empty($_GET["fNumResults"]))
560 $_GET["fNumResults"]="20";
561
562 if (empty($_GET["fNumEvents"]))
563 $_GET["fNumEvents"]="Off";
564
565 if (empty($_GET["fRunStart"]))
566 $_GET["fRunStart"]="Off";
567
568 if (empty($_GET["fRunStop"]))
569 $_GET["fRunStop"]="Off";
570
571 if (empty($_GET["fTest"]))
572 $_GET["fTest"]="Off";
573
574 if (empty($_GET["fSourceName"]))
575 $_GET["fSourceName"]="Off";
576
577 if (empty($_GET["fProjectName"]))
578 $_GET["fProjectName"]="Off";
579
580 if (empty($_GET["fL1TriggerTableName"]))
581 $_GET["fL1TriggerTableName"]="Off";
582
583 if (empty($_GET["fL2TriggerTableName"]))
584 $_GET["fL2TriggerTableName"]="Off";
585
586 if (empty($_GET["fHvSettingsName"]))
587 $_GET["fHvSettingsName"]="Off";
588
589 if (empty($_GET["fDiscriminatorThresholdTableName"]))
590 $_GET["fDiscriminatorThresholdTableName"]="Off";
591
592 if (empty($_GET["fTriggerDelayTableName"]))
593 $_GET["fTriggerDelayTableName"]="Off";
594
595 if (empty($_GET["fLightConditionsName"]))
596 $_GET["fLightConditionsName"]="Off";
597
598 if (empty($_GET["fTestFlagName"]))
599 $_GET["fTestFlagName"]="Off";
600}
601
602function InitRunStatus($_GET)
603{
604 if (empty($_GET["fDataCheckDone"]))
605 $_GET["fDataCheckDone"]="Off";
606
607 if (empty($_GET["fDataCheckDoneStatus"]))
608 $_GET["fDataCheckDoneStatus"]="0";
609
610 if (empty($_GET["fCCFileAvail"]))
611 $_GET["fCCFileAvail"]="Off";
612
613 if (empty($_GET["fCCFileAvailStatus"]))
614 $_GET["fCCFileAvailStatus"]="0";
615
616 if (empty($_GET["fCaCoFileAvail"]))
617 $_GET["fCaCoFileAvail"]=$first?"On":"";
618
619 if (empty($_GET["fCaCoFileAvailStatus"]))
620 $_GET["fCaCoFileAvailStatus"]="0";
621
622 if (empty($_GET["fCaCoFileFound"]))
623 $_GET["fCaCoFileFound"]="Off";
624
625 if (empty($_GET["fCaCoFileFoundStatus"]))
626 $_GET["fCaCoFileFoundStatus"]="0";
627
628 if (empty($_GET["fRawFileAvail"]))
629 $_GET["fRawFileAvail"]="Off";
630
631 if (empty($_GET["fRawFileAvailStatus"]))
632 $_GET["fRawFileAvailStatus"]="0";
633
634 if (empty($_GET["fTimingCorrection"]))
635 $_GET["fTimingCorrection"]="Off";
636
637 if (empty($_GET["fTimingCorrectionStatus"]))
638 $_GET["fTimingCorrectionStatus"]="0";
639}
640
641function InitRunInfo($_GET)
642{
643 InitRunStatus($_GET);
644 InitInfo($_GET);
645 InitFailInfo($_GET);
646
647 if (empty($_GET["fFormatVersion"]))
648 $_GET["fFormatVersion"]="Off";
649
650 if (empty($_GET["fAzimuth"]))
651 $_GET["fAzimuth"]="Off";
652
653 if (empty($_GET["fZenithDistance"]))
654 $_GET["fZenithDistance"]="Off";
655
656 if (empty($_GET["fRunTypeName"]))
657 $_GET["fRunTypeName"]="Off";
658
659 if (empty($_GET["fExcludedFDAName"]))
660 $_GET["fExcludedFDAName"]="Off";
661
662 if (empty($_GET["fMagicNumberName"]))
663 $_GET["fMagicNumberName"]="Off";
664
665 if (empty($_GET["fObservationModeName"]))
666 $_GET["fObservationModeName"]="Off";
667
668 if (empty($_GET["fMeanTriggerRate"]))
669 $_GET["fMeanTriggerRate"]="Off";
670
671 if (empty($_GET["fCalibrationScriptName"]))
672 $_GET["fCalibrationScriptName"]="Off";
673
674 if (empty($_GET["fTestFlagName"]))
675 $_GET["fTestFlagName"]="Off";
676
677 if (empty($_GET["fDaqStoreRate"]))
678 $_GET["fDaqStoreRate"]="Off";
679
680 if (empty($_GET["fDaqTriggerRate"]))
681 $_GET["fDaqTriggerRate"]="Off";
682
683 if (empty($_GET["fL2RatePresc"]))
684 $_GET["fL2RatePresc"]="Off";
685
686 if (empty($_GET["fL2RateUnpresc"]))
687 $_GET["fL2RateUnpresc"]="Off";
688
689 if (empty($_GET["fSequenceFirst"]))
690 $_GET["fSequenceFirst"]="Off";
691
692 if (empty($_GET["fSequenceNo"]))
693 $_GET["fSequenceNo"]="";
694}
695
696function InitSequStatus($_GET)
697{
698 if (empty($_GET["fSequenceFileWritten"]))
699 $_GET["fSequenceFileWritten"]="Off";
700
701 if (empty($_GET["fSequenceFileWrittenStatus"]))
702 $_GET["fSequenceFileWrittenStatus"]="0";
703
704 if (empty($_GET["fAllFilesAvail"]))
705 $_GET["fAllFilesAvail"]="Off";
706
707 if (empty($_GET["fAllFilesAvailStatus"]))
708 $_GET["fAllFilesAvailStatus"]="0";
709
710 if (empty($_GET["fCallisto"]))
711 $_GET["fCallisto"]="Off";
712
713 if (empty($_GET["fCallistoStatus"]))
714 $_GET["fCallistoStatus"]="0";
715
716 if (empty($_GET["fFillCallisto"]))
717 $_GET["fFillCallisto"]="Off";
718
719 if (empty($_GET["fFillCallistoStatus"]))
720 $_GET["fFillCallistoStatus"]="0";
721
722 if (empty($_GET["fStar"]))
723 $_GET["fStar"]="Off";
724
725 if (empty($_GET["fStarStatus"]))
726 $_GET["fStarStatus"]="0";
727
728 if (empty($_GET["fFillStar"]))
729 $_GET["fFillStar"]="Off";
730
731 if (empty($_GET["fFillStarStatus"]))
732 $_GET["fFillStarStatus"]="0";
733}
734
735function InitStarInfo($_GET)
736{
737 if (empty($_GET["fMeanNumberIslands"]))
738 $_GET["fMeanNumberIslands"]="Off";
739
740 if (empty($_GET["fPSF"]))
741 $_GET["fPSF"]="Off";
742
743 if (empty($_GET["fRatio"]))
744 $_GET["fRatio"]="Off";
745
746 if (empty($_GET["fMuonNumber"]))
747 $_GET["fMuonNumber"]="Off";
748
749 if (empty($_GET["fEffOnTime"]))
750 $_GET["fEffOnTime"]="Off";
751
752 if (empty($_GET["fEffOnTime/fRunTime"]))
753 $_GET["fEffOnTime/fRunTime"]="Off";
754
755 if (empty($_GET["fMuonRate"]))
756 $_GET["fMuonRate"]="Off";
757
758 if (empty($_GET["fInhomogeneity"]))
759 $_GET["fInhomogeneity"]="Off";
760
761 if (empty($_GET["fDataRate"]))
762 $_GET["fDataRate"]="Off";
763
764 if (empty($_GET["fMaxHumidity"]))
765 $_GET["fMaxHumidity"]="Off";
766}
767
768function InitCalInfo($_GET)
769{
770 if (empty($_GET["fUnreliableInner"]))
771 $_GET["fUnreliableInner"]="Off";
772
773 if (empty($_GET["fUnsuitableOuter"]))
774 $_GET["fUnsuitableOuter"]="Off";
775
776 if (empty($_GET["fUnreliableOuter"]))
777 $_GET["fUnreliableOuter"]="Off";
778
779 if (empty($_GET["fUnsuitableInner"]))
780 $_GET["fUnsuitableInner"]="Off";
781
782 if (empty($_GET["fIsolatedInner"]))
783 $_GET["fIsolatedInner"]="Off";
784
785 if (empty($_GET["fIsolatedOuter"]))
786 $_GET["fIsolatedOuter"]="Off";
787
788 if (empty($_GET["fMeanPedRmsInner"]))
789 $_GET["fMeanPedRmsInner"]="Off";
790
791 if (empty($_GET["fMeanPedRmsOuter"]))
792 $_GET["fMeanPedRmsOuter"]="Off";
793
794 if (empty($_GET["fIsolatedMaxCluster"]))
795 $_GET["fIsolatedMaxCluster"]="Off";
796
797 if (empty($_GET["fArrTimeMeanInner"]))
798 $_GET["fArrTimeMeanInner"]="Off";
799
800 if (empty($_GET["fArrTimeMeanOuter"]))
801 $_GET["fArrTimeMeanOuter"]="Off";
802
803 if (empty($_GET["fArrTimeRmsInner"]))
804 $_GET["fArrTimeRmsInner"]="Off";
805
806 if (empty($_GET["fArrTimeRmsOuter"]))
807 $_GET["fArrTimeRmsOuter"]="Off";
808
809 if (empty($_GET["fMeanSignalInner"]))
810 $_GET["fMeanSignalInner"]=$first?"Off":"";
811
812 if (empty($_GET["fMeanSignalOuter"]))
813 $_GET["fMeanSignalOuter"]=$first?"Off":"";
814
815 if (empty($_GET["fPulsePosMean"]))
816 $_GET["fPulsePosMean"]=$first?"Off":"";
817
818 if (empty($_GET["fConvFactorInner"]))
819 $_GET["fConvFactorInner"]="Off";
820
821 if (empty($_GET["fConvFactorOuter"]))
822 $_GET["fConvFactorOuter"]="Off";
823}
824
825function InitSequInfo($_GET)
826{
827 InitInfo($_GET);
828 InitSequStatus($_GET);
829 InitFailInfo($_GET);
830 InitCalInfo($_GET);
831 InitStarInfo($_GET);
832
833 if (empty($_GET["fRunTime/60"]))
834 $_GET["fRunTime/60"]="Off";
835
836 if (empty($_GET["fSequenceLast"]))
837 $_GET["fSequenceLast"]="Off";
838
839 if (empty($_GET["fAzimuthMin"]))
840 $_GET["fAzimuthMin"]="Off";
841
842 if (empty($_GET["fAzimuthMax"]))
843 $_GET["fAzimuthMax"]="Off";
844
845 if (empty($_GET["fZenithDistanceMin"]))
846 $_GET["fZenithDistanceMin"]="Off";
847
848 if (empty($_GET["fZenithDistanceMax"]))
849 $_GET["fZenithDistanceMax"]="Off";
850
851 if (empty($_GET["fObservationModeName"]))
852 $_GET["fObservationModeName"]="Off";
853
854// if (empty($_GET["fManuallyChangedName"]))
855// $_GET["fManuallyChangedName"]="Off";
856}
857
858function InitDataSetStatus($_GET)
859{
860 if (empty($_GET["fDataSetInserted"]))
861 $_GET["fDataSetInserted"]="Off";
862
863 if (empty($_GET["fDataSetInsertedStatus"]))
864 $_GET["fDataSetInsertedStatus"]="0";
865
866 if (empty($_GET["fStarFilesAvail"]))
867 $_GET["fStarFilesAvail"]="Off";
868
869 if (empty($_GET["fStarFilesAvailStatus"]))
870 $_GET["fStarFilesAvailStatus"]="0";
871
872 if (empty($_GET["fGanymed"]))
873 $_GET["fGanymed"]=$first?"On":"";
874
875 if (empty($_GET["fGanymedStatus"]))
876 $_GET["fGanymedStatus"]="0";
877
878 if (empty($_GET["fFillGanymed"]))
879 $_GET["fFillGanymed"]="Off";
880
881 if (empty($_GET["fFillGanymedStatus"]))
882 $_GET["fFillGanymedStatus"]="0";
883}
884
885function InitDataSetInfo($_GET)
886{
887 InitDataSetStatus($_GET);
888 InitFailInfo($_GET);
889
890 if (empty($_GET["fNumResults"]))
891 $_GET["fNumResults"]="50";
892
893 if (empty($_GET["fSourceName"]))
894 $_GET["fSourceName"]="Off";
895
896 if (empty($_GET["fComment"]))
897 $_GET["fComment"]="Off";
898
899 if (empty($_GET["fWobble"]))
900 $_GET["fWobble"]="Off";
901
902 if (empty($_GET["fExcessEvents"]))
903 $_GET["fExcessEvents"]="Off";
904
905 if (empty($_GET["fExcessEvents*60/fEffOnTime"]))
906 $_GET["fExcessEvents*60/fEffOnTime"]="Off";
907
908 if (empty($_GET["fBackgroundEvents*60/fEffOnTime"]))
909 $_GET["fBackgroundEvents*60/fEffOnTime"]="Off";
910
911 if (empty($_GET["fBackgroundEvents"]))
912 $_GET["fBackgroundEvents"]="Off";
913
914 if (empty($_GET["fSignalEvents"]))
915 $_GET["fSignalEvents"]="Off";
916
917 if (empty($_GET["fSignalEvents*60/fEffOnTime"]))
918 $_GET["fSignalEvents*60/fEffOnTime"]="Off";
919
920 if (empty($_GET["fSignificance"]))
921 $_GET["fSignificance"]="Off";
922
923 if (empty($_GET["Round(fSignificance/Sqrt(fEffOnTime/3600),2)"]))
924 $_GET["Round(fSignificance/Sqrt(fEffOnTime/3600),2)"]="Off";
925
926 if (empty($_GET["fScaleFactor"]))
927 $_GET["fScaleFactor"]="Off";
928
929 if (empty($_GET["fEffOnTime/3600"]))
930 $_GET["fEffOnTime/3600"]="Off";
931}
932
933function InitFindOffData($_GET)
934{
935 InitSequInfo($_GET);
936
937 if (empty($_GET["fArrTimeLimitMean"]))
938 $_GET["fArrTimeLimitMean"]="";
939
940 if (empty($_GET["fArrTimeLimitRms"]))
941 $_GET["fArrTimeLimitRms"]="";
942
943 if (empty($_GET["fPedRmsInLimitMean"]))
944 $_GET["fPedRmsInLimitMean"]="";
945
946 if (empty($_GET["fPedRmsInLimitRms"]))
947 $_GET["fPedRmsInLimitRms"]="";
948
949 if (empty($_GET["fMuonRateLimitMean"]))
950 $_GET["fMuonRateLimitMean"]="";
951
952 if (empty($_GET["fMuonRateLimitRms"]))
953 $_GET["fMuonRateLimitRms"]="";
954
955 if (empty($_GET["fImgRateLimitMean"]))
956 $_GET["fImgRateLimitMean"]="";
957
958 if (empty($_GET["fImgRateLimitRms"]))
959 $_GET["fImgRateLimitRms"]="";
960
961 if (empty($_GET["fPSFLimitMean"]))
962 $_GET["fPSFLimitMean"]="";
963
964 if (empty($_GET["fPSFLimitRms"]))
965 $_GET["fPSFLimitRms"]="";
966
967 if (empty($_GET["fUnsInLimitMean"]))
968 $_GET["fUnsInLimitMean"]="";
969
970 if (empty($_GET["fZdMinLimitMean"]))
971 $_GET["fZdMinLimitMean"]="";
972
973 if (empty($_GET["fZdMaxLimitMean"]))
974 $_GET["fZdMaxLimitMean"]="";
975}
976
977
978?>
Note: See TracBrowser for help on using the repository browser.