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

Last change on this file since 8124 was 8124, checked in by Daniela Dorner, 18 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 30.8 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", "FailedTime");
260 CheckBox("fReturnCode", "ErrCode");
261 CheckBox("fFailedCode", "RetCode");
262 CheckBox("fFailedCodeAdd", "CodeAdd");
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 PrintSourceMenu($host,$user,$pw,$db)
478{
479 printf("Source&nbsp;(<A HREF=\"regexp.html\">regexp</A>)&nbsp;<input name=\"fSourceN\" type=\"text\" size=\"15\" maxlength=\"15\" value=\"");
480 if (!empty($_GET["fSourceN"]))
481 printf("%s", $_GET["fSourceN"]);
482 printf("\">&nbsp;&nbsp;&nbsp;\n");
483}
484function PrintSequMenu($host,$user,$pw,$db)
485{
486 printf("Sequ#&nbsp;<input name=\"fSequenceNo\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"");
487 if (!empty($_GET["fSequenceNo"]))
488 printf("%s", $_GET["fSequenceNo"]);
489 printf("\">&nbsp;&nbsp;&nbsp;\n");
490}
491
492function PrintNumResPullDown()
493{
494 printf(" Results:\n");
495 printf(" <select name=\"fNumResults\">\n");
496
497 $numres = array("10", "20", "50", "100", "200", "500", "1000", "2000");
498 foreach ($numres as $element)
499 {
500 if ($element==$_GET["fNumResults"])
501 printf("<option value=\"%s\" selected>%3s</option>\n", $element, $element);
502 else
503 printf("<option value=\"%s\">%3s</option>\n", $element, $element);
504 }
505 printf(" </select>\n");
506 printf(" &nbsp;&nbsp;&nbsp;\n");
507}
508
509function PrintButtons($page)
510{
511 printf("<input class='Width' type='submit' value='Query Table'>&nbsp;&nbsp;&nbsp;\n");
512 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"%s\"'>&nbsp;&nbsp;&nbsp;\n", $page);
513// printf("<p>");
514 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
515 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"]));
516 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
517 {
518 printf("<input class='Width' type='button' value='Print' onClick='self.location.href=\"%s&amp;fPrintTable=1\"'>&nbsp;&nbsp;&nbsp;\n", htmlspecialchars($_SERVER["REQUEST_URI"]));
519 printf("MySqlQuery: <img id='showquerybutton' src='../plus.png' alt='+' onClick='showhide(\"showquery\")'>\n");
520 }
521}
522
523function InitFailInfo($_GET)
524{
525 if (empty($_GET["fStartTime"]))
526 $_GET["fStartTime"]="Off";
527
528 if (empty($_GET["fFailedTime"]))
529 $_GET["fFailedTime"]="Off";
530
531 if (empty($_GET["fReturnCode"]))
532 $_GET["fReturnCode"]="Off";
533
534 if (empty($_GET["fFailedCode"]))
535 $_GET["fFailedCode"]="Off";
536
537 if (empty($_GET["fFailedCodeAdd"]))
538 $_GET["fFailedCodeAdd"]="Off";
539}
540
541function InitInfo($_GET)
542{
543 if (empty($_GET["fNumResults"]))
544 $_GET["fNumResults"]="20";
545
546 if (empty($_GET["fNumEvents"]))
547 $_GET["fNumEvents"]="Off";
548
549 if (empty($_GET["fRunStart"]))
550 $_GET["fRunStart"]="Off";
551
552 if (empty($_GET["fRunStop"]))
553 $_GET["fRunStop"]="Off";
554
555 if (empty($_GET["fTest"]))
556 $_GET["fTest"]="Off";
557
558 if (empty($_GET["fSourceName"]))
559 $_GET["fSourceName"]="Off";
560
561 if (empty($_GET["fProjectName"]))
562 $_GET["fProjectName"]="Off";
563
564 if (empty($_GET["fL1TriggerTableName"]))
565 $_GET["fL1TriggerTableName"]="Off";
566
567 if (empty($_GET["fL2TriggerTableName"]))
568 $_GET["fL2TriggerTableName"]="Off";
569
570 if (empty($_GET["fHvSettingsName"]))
571 $_GET["fHvSettingsName"]="Off";
572
573 if (empty($_GET["fDiscriminatorThresholdTableName"]))
574 $_GET["fDiscriminatorThresholdTableName"]="Off";
575
576 if (empty($_GET["fTriggerDelayTableName"]))
577 $_GET["fTriggerDelayTableName"]="Off";
578
579 if (empty($_GET["fLightConditionsName"]))
580 $_GET["fLightConditionsName"]="Off";
581
582 if (empty($_GET["fTestFlagName"]))
583 $_GET["fTestFlagName"]="Off";
584}
585
586function InitRunStatus($_GET)
587{
588 if (empty($_GET["fDataCheckDone"]))
589 $_GET["fDataCheckDone"]="Off";
590
591 if (empty($_GET["fDataCheckDoneStatus"]))
592 $_GET["fDataCheckDoneStatus"]="0";
593
594 if (empty($_GET["fCCFileAvail"]))
595 $_GET["fCCFileAvail"]="Off";
596
597 if (empty($_GET["fCCFileAvailStatus"]))
598 $_GET["fCCFileAvailStatus"]="0";
599
600 if (empty($_GET["fCaCoFileAvail"]))
601 $_GET["fCaCoFileAvail"]=$first?"On":"";
602
603 if (empty($_GET["fCaCoFileAvailStatus"]))
604 $_GET["fCaCoFileAvailStatus"]="0";
605
606 if (empty($_GET["fCaCoFileFound"]))
607 $_GET["fCaCoFileFound"]="Off";
608
609 if (empty($_GET["fCaCoFileFoundStatus"]))
610 $_GET["fCaCoFileFoundStatus"]="0";
611
612 if (empty($_GET["fRawFileAvail"]))
613 $_GET["fRawFileAvail"]="Off";
614
615 if (empty($_GET["fRawFileAvailStatus"]))
616 $_GET["fRawFileAvailStatus"]="0";
617
618 if (empty($_GET["fTimingCorrection"]))
619 $_GET["fTimingCorrection"]="Off";
620
621 if (empty($_GET["fTimingCorrectionStatus"]))
622 $_GET["fTimingCorrectionStatus"]="0";
623}
624
625function InitRunInfo($_GET)
626{
627 InitRunStatus($_GET);
628 InitInfo($_GET);
629 InitFailInfo($_GET);
630
631 if (empty($_GET["fFormatVersion"]))
632 $_GET["fFormatVersion"]="Off";
633
634 if (empty($_GET["fAzimuth"]))
635 $_GET["fAzimuth"]="Off";
636
637 if (empty($_GET["fZenithDistance"]))
638 $_GET["fZenithDistance"]="Off";
639
640 if (empty($_GET["fRunTypeName"]))
641 $_GET["fRunTypeName"]="Off";
642
643 if (empty($_GET["fExcludedFDAName"]))
644 $_GET["fExcludedFDAName"]="Off";
645
646 if (empty($_GET["fMagicNumberName"]))
647 $_GET["fMagicNumberName"]="Off";
648
649 if (empty($_GET["fObservationModeName"]))
650 $_GET["fObservationModeName"]="Off";
651
652 if (empty($_GET["fMeanTriggerRate"]))
653 $_GET["fMeanTriggerRate"]="Off";
654
655 if (empty($_GET["fCalibrationScriptName"]))
656 $_GET["fCalibrationScriptName"]="Off";
657
658 if (empty($_GET["fTestFlagName"]))
659 $_GET["fTestFlagName"]="Off";
660
661 if (empty($_GET["fDaqStoreRate"]))
662 $_GET["fDaqStoreRate"]="Off";
663
664 if (empty($_GET["fDaqTriggerRate"]))
665 $_GET["fDaqTriggerRate"]="Off";
666
667 if (empty($_GET["fL2RatePresc"]))
668 $_GET["fL2RatePresc"]="Off";
669
670 if (empty($_GET["fL2RateUnpresc"]))
671 $_GET["fL2RateUnpresc"]="Off";
672
673 if (empty($_GET["fSequenceFirst"]))
674 $_GET["fSequenceFirst"]="Off";
675
676 if (empty($_GET["fSequenceNo"]))
677 $_GET["fSequenceNo"]="";
678}
679
680function InitSequStatus($_GET)
681{
682 if (empty($_GET["fSequenceFileWritten"]))
683 $_GET["fSequenceFileWritten"]="Off";
684
685 if (empty($_GET["fSequenceFileWrittenStatus"]))
686 $_GET["fSequenceFileWrittenStatus"]="0";
687
688 if (empty($_GET["fAllFilesAvail"]))
689 $_GET["fAllFilesAvail"]="Off";
690
691 if (empty($_GET["fAllFilesAvailStatus"]))
692 $_GET["fAllFilesAvailStatus"]="0";
693
694 if (empty($_GET["fCallisto"]))
695 $_GET["fCallisto"]="Off";
696
697 if (empty($_GET["fCallistoStatus"]))
698 $_GET["fCallistoStatus"]="0";
699
700 if (empty($_GET["fFillCallisto"]))
701 $_GET["fFillCallisto"]="Off";
702
703 if (empty($_GET["fFillCallistoStatus"]))
704 $_GET["fFillCallistoStatus"]="0";
705
706 if (empty($_GET["fStar"]))
707 $_GET["fStar"]="Off";
708
709 if (empty($_GET["fStarStatus"]))
710 $_GET["fStarStatus"]="0";
711
712 if (empty($_GET["fFillStar"]))
713 $_GET["fFillStar"]="Off";
714
715 if (empty($_GET["fFillStarStatus"]))
716 $_GET["fFillStarStatus"]="0";
717}
718
719function InitStarInfo($_GET)
720{
721 if (empty($_GET["fMeanNumberIslands"]))
722 $_GET["fMeanNumberIslands"]="Off";
723
724 if (empty($_GET["fPSF"]))
725 $_GET["fPSF"]="Off";
726
727 if (empty($_GET["fRatio"]))
728 $_GET["fRatio"]="Off";
729
730 if (empty($_GET["fMuonNumber"]))
731 $_GET["fMuonNumber"]="Off";
732
733 if (empty($_GET["fEffOnTime"]))
734 $_GET["fEffOnTime"]="Off";
735
736 if (empty($_GET["fEffOnTime/fRunTime"]))
737 $_GET["fEffOnTime/fRunTime"]="Off";
738
739 if (empty($_GET["fMuonRate"]))
740 $_GET["fMuonRate"]="Off";
741
742 if (empty($_GET["fInhomogeneity"]))
743 $_GET["fInhomogeneity"]="Off";
744
745 if (empty($_GET["fDataRate"]))
746 $_GET["fDataRate"]="Off";
747
748 if (empty($_GET["fMaxHumidity"]))
749 $_GET["fMaxHumidity"]="Off";
750}
751
752function InitCalInfo($_GET)
753{
754 if (empty($_GET["fUnreliableInner"]))
755 $_GET["fUnreliableInner"]="Off";
756
757 if (empty($_GET["fUnsuitableOuter"]))
758 $_GET["fUnsuitableOuter"]="Off";
759
760 if (empty($_GET["fUnreliableOuter"]))
761 $_GET["fUnreliableOuter"]="Off";
762
763 if (empty($_GET["fUnsuitableInner"]))
764 $_GET["fUnsuitableInner"]="Off";
765
766 if (empty($_GET["fIsolatedInner"]))
767 $_GET["fIsolatedInner"]="Off";
768
769 if (empty($_GET["fIsolatedOuter"]))
770 $_GET["fIsolatedOuter"]="Off";
771
772 if (empty($_GET["fMeanPedRmsInner"]))
773 $_GET["fMeanPedRmsInner"]="Off";
774
775 if (empty($_GET["fMeanPedRmsOuter"]))
776 $_GET["fMeanPedRmsOuter"]="Off";
777
778 if (empty($_GET["fIsolatedMaxCluster"]))
779 $_GET["fIsolatedMaxCluster"]="Off";
780
781 if (empty($_GET["fArrTimeMeanInner"]))
782 $_GET["fArrTimeMeanInner"]="Off";
783
784 if (empty($_GET["fArrTimeMeanOuter"]))
785 $_GET["fArrTimeMeanOuter"]="Off";
786
787 if (empty($_GET["fArrTimeRmsInner"]))
788 $_GET["fArrTimeRmsInner"]="Off";
789
790 if (empty($_GET["fArrTimeRmsOuter"]))
791 $_GET["fArrTimeRmsOuter"]="Off";
792
793 if (empty($_GET["fMeanSignalInner"]))
794 $_GET["fMeanSignalInner"]=$first?"Off":"";
795
796 if (empty($_GET["fMeanSignalOuter"]))
797 $_GET["fMeanSignalOuter"]=$first?"Off":"";
798
799 if (empty($_GET["fPulsePosMean"]))
800 $_GET["fPulsePosMean"]=$first?"Off":"";
801
802 if (empty($_GET["fConvFactorInner"]))
803 $_GET["fConvFactorInner"]="Off";
804
805 if (empty($_GET["fConvFactorOuter"]))
806 $_GET["fConvFactorOuter"]="Off";
807}
808
809function InitSequInfo($_GET)
810{
811 InitInfo($_GET);
812 InitSequStatus($_GET);
813 InitFailInfo($_GET);
814 InitCalInfo($_GET);
815 InitStarInfo($_GET);
816
817 if (empty($_GET["fRunTime/60"]))
818 $_GET["fRunTime/60"]="Off";
819
820 if (empty($_GET["fSequenceLast"]))
821 $_GET["fSequenceLast"]="Off";
822
823 if (empty($_GET["fAzimuthMin"]))
824 $_GET["fAzimuthMin"]="Off";
825
826 if (empty($_GET["fAzimuthMax"]))
827 $_GET["fAzimuthMax"]="Off";
828
829 if (empty($_GET["fZenithDistanceMin"]))
830 $_GET["fZenithDistanceMin"]="Off";
831
832 if (empty($_GET["fZenithDistanceMax"]))
833 $_GET["fZenithDistanceMax"]="Off";
834
835 if (empty($_GET["fObservationModeName"]))
836 $_GET["fObservationModeName"]="Off";
837
838// if (empty($_GET["fManuallyChangedName"]))
839// $_GET["fManuallyChangedName"]="Off";
840}
841
842function InitDataSetStatus($_GET)
843{
844 if (empty($_GET["fDataSetInserted"]))
845 $_GET["fDataSetInserted"]="Off";
846
847 if (empty($_GET["fDataSetInsertedStatus"]))
848 $_GET["fDataSetInsertedStatus"]="0";
849
850 if (empty($_GET["fStarFilesAvail"]))
851 $_GET["fStarFilesAvail"]="Off";
852
853 if (empty($_GET["fStarFilesAvailStatus"]))
854 $_GET["fStarFilesAvailStatus"]="0";
855
856 if (empty($_GET["fGanymed"]))
857 $_GET["fGanymed"]=$first?"On":"";
858
859 if (empty($_GET["fGanymedStatus"]))
860 $_GET["fGanymedStatus"]="0";
861
862 if (empty($_GET["fFillGanymed"]))
863 $_GET["fFillGanymed"]="Off";
864
865 if (empty($_GET["fFillGanymedStatus"]))
866 $_GET["fFillGanymedStatus"]="0";
867}
868
869function InitDataSetInfo($_GET)
870{
871 InitDataSetStatus($_GET);
872 InitFailInfo($_GET);
873
874 if (empty($_GET["fNumResults"]))
875 $_GET["fNumResults"]="50";
876
877 if (empty($_GET["fSourceName"]))
878 $_GET["fSourceName"]="Off";
879
880 if (empty($_GET["fComment"]))
881 $_GET["fComment"]="Off";
882
883 if (empty($_GET["fWobble"]))
884 $_GET["fWobble"]="Off";
885
886 if (empty($_GET["fExcessEvents"]))
887 $_GET["fExcessEvents"]="Off";
888
889 if (empty($_GET["fExcessEvents*60/fEffOnTime"]))
890 $_GET["fExcessEvents*60/fEffOnTime"]="Off";
891
892 if (empty($_GET["fBackgroundEvents*60/fEffOnTime"]))
893 $_GET["fBackgroundEvents*60/fEffOnTime"]="Off";
894
895 if (empty($_GET["fBackgroundEvents"]))
896 $_GET["fBackgroundEvents"]="Off";
897
898 if (empty($_GET["fSignalEvents"]))
899 $_GET["fSignalEvents"]="Off";
900
901 if (empty($_GET["fSignalEvents*60/fEffOnTime"]))
902 $_GET["fSignalEvents*60/fEffOnTime"]="Off";
903
904 if (empty($_GET["fSignificance"]))
905 $_GET["fSignificance"]="Off";
906
907 if (empty($_GET["Round(fSignificance/Sqrt(fEffOnTime/3600),2)"]))
908 $_GET["Round(fSignificance/Sqrt(fEffOnTime/3600),2)"]="Off";
909
910 if (empty($_GET["fScaleFactor"]))
911 $_GET["fScaleFactor"]="Off";
912
913 if (empty($_GET["fEffOnTime/3600"]))
914 $_GET["fEffOnTime/3600"]="Off";
915}
916
917function InitFindOffData($_GET)
918{
919 InitSequInfo($_GET);
920
921 if (empty($_GET["fArrTimeLimitMean"]))
922 $_GET["fArrTimeLimitMean"]="";
923
924 if (empty($_GET["fArrTimeLimitRms"]))
925 $_GET["fArrTimeLimitRms"]="";
926
927 if (empty($_GET["fPedRmsInLimitMean"]))
928 $_GET["fPedRmsInLimitMean"]="";
929
930 if (empty($_GET["fPedRmsInLimitRms"]))
931 $_GET["fPedRmsInLimitRms"]="";
932
933 if (empty($_GET["fMuonRateLimitMean"]))
934 $_GET["fMuonRateLimitMean"]="";
935
936 if (empty($_GET["fMuonRateLimitRms"]))
937 $_GET["fMuonRateLimitRms"]="";
938
939 if (empty($_GET["fImgRateLimitMean"]))
940 $_GET["fImgRateLimitMean"]="";
941
942 if (empty($_GET["fImgRateLimitRms"]))
943 $_GET["fImgRateLimitRms"]="";
944
945 if (empty($_GET["fPSFLimitMean"]))
946 $_GET["fPSFLimitMean"]="";
947
948 if (empty($_GET["fPSFLimitRms"]))
949 $_GET["fPSFLimitRms"]="";
950
951 if (empty($_GET["fUnsInLimitMean"]))
952 $_GET["fUnsInLimitMean"]="";
953
954 if (empty($_GET["fZdMinLimitMean"]))
955 $_GET["fZdMinLimitMean"]="";
956
957 if (empty($_GET["fZdMaxLimitMean"]))
958 $_GET["fZdMaxLimitMean"]="";
959}
960
961
962?>
Note: See TracBrowser for help on using the repository browser.