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

Last change on this file since 8119 was 8119, checked in by Daniela Dorner, 18 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 30.7 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("fNumEvents", "Num of events");
105 CheckBox("fRunTime/60", "Duration");
106 CheckBox("fSequenceLast", "Last run");
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("fLinks", "Links");
118 CheckBox("fTest", "incl. TestSources");
119 CheckBox("fOff", "incl. offsources");
120 CheckBox("fOnlyOff", "only offsources");
121
122 printf(" </tr></table>\n");
123 printf(" </div><p>\n");
124}
125
126function PrintSequInfo2Menu($host,$user,$pw,$db)
127{
128 printf(" <div id='info2' style='display:none'>\n");
129 printf(" <table>\n");
130 printf(" <tr><td>\n");
131 PrintPullDown($host, $user, $pw, $db, "Source", "fSourceName", "fSourceKEY", "Source Name");
132 printf(" </td><td>\n");
133 PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1Trigger Table");
134 printf(" </td><td>\n");
135 PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2Trigger Table");
136 printf(" </td><td>\n");
137 PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable", "fTriggerDelayTableName", "fTriggerDelayTableKEY", "Trigger Delay Table");
138 printf(" </td></tr><tr><td>\n");
139 PrintPullDown($host, $user, $pw, $db, "LightConditions", "fLightConditionsName", "fLightConditionsKEY", "Light Conditions");
140 printf(" </td><td>\n");
141 PrintPullDown($host, $user, $pw, $db, "Project", "fProjectName", "fProjectKEY", "Project Name");
142 printf(" </td><td>\n");
143 PrintPullDown($host, $user, $pw, $db, "HvSettings", "fHvSettingsName", "fHvSettingsKEY", "HV Settings");
144 printf(" </td><td>\n");
145 PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
146 printf(" </td></tr><tr><td>\n");
147 PrintPullDown($host, $user, $pw, $db, "ObservationMode", "fObservationModeName", "fObservationModeKEY", "Obs. Mode");
148 printf(" </td><td>\n");
149// PrintPullDown($host, $user, $pw, $db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed");
150// printf(" </td><td>\n");
151 PrintPullDown($host, $user, $pw, $db, "TestFlag", "fTestFlagName", "fTestFlagKEY", "Test Flag");
152 printf(" </td></tr>\n");
153 printf(" </table>\n");
154 printf(" </div><p>\n");
155}
156
157function PrintLimitsMenu($limitsmean, $limitsmin, $limitsmax, $alias, $old)
158{
159 printf("<div id='limits' style='display:none'>\n");
160 printf(" <table>\n");
161 printf(" <tr><th colspan='3'>Limits</th></tr>\n");
162 printf(" <tr><td valign='top'>\n");
163
164 printf(" <table>\n");
165 printf(" <tr><th>Name </th><th> Mean </th><th> Rms </th></tr>\n");
166
167 foreach($limitsmean as $key => $element)
168 {
169 printf("<tr><td>%s</td>\n", $alias[$key]);
170 $mean=$key . "Mean";
171 $limitmean=$_GET[$mean];
172 printf("<td><input name=\"%sMean\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limitmean);
173 $rms2=$key . "Rms";
174 $limitrms=$_GET[$rms2];
175 printf("<td><input name=\"%sRms\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limitrms);
176 printf("</tr>\n");
177 }
178
179 if (empty($old))
180 {
181 printf(" </table>\n");
182 printf(" </td>\n");
183 printf(" <td valign='top'>\n");
184 printf(" <table>\n");
185 }
186
187 printf(" <tr><th>Name </th><th> Min </th><th> Min2 </th></tr>\n");
188 foreach($limitsmin as $key => $element)
189 {
190 printf("<tr><td>%s</td>\n", $alias[$key]);
191 $level1=$key . "1";
192 $limit1=$_GET[$level1];
193 printf("<td><input name=\"%s1\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limit1);
194 $level2=$key . "2";
195 $limit2=$_GET[$level2];
196 printf("<td><input name=\"%s2\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limit2);
197 printf("</tr>\n");
198 }
199
200 if (empty($old))
201 {
202 printf(" </table>\n");
203 printf(" </td>\n");
204 printf(" <td valign='top'>\n");
205 printf(" <table>\n");
206 }
207
208 printf(" <tr><th>Name </th><th> Max </th><th> Max2 </th></tr>\n");
209 foreach($limitsmax as $key => $element)
210 {
211 printf("<tr><td>%s</td>\n", $alias[$key]);
212 $level1=$key . "1";
213 $limit1=$_GET[$level1];
214 printf("<td><input name=\"%s1\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limit1);
215 $level2=$key . "2";
216 $limit2=$_GET[$level2];
217 printf("<td><input name=\"%s2\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\"></td>\n", $key, $limit2);
218 printf("</tr>\n");
219 }
220 printf(" </table>\n");
221
222 printf(" </td></tr></table>\n");
223 printf("<p>\n");
224 printf("</div>\n");
225}
226
227function PrintSequStatMenu()
228{
229 printf(" <div id='stat' style='display:none'>\n");
230 printf(" <table><tr><td>\n");
231
232 PrintStatusMenu("fAllFilesAvail", "Files avail");
233 printf(" </td><td>\n");
234 PrintStatusMenu("fCallisto", "Callisto");
235 printf(" </td><td>\n");
236 PrintStatusMenu("fStar", "Star");
237 printf(" </td></tr><tr><td>\n");
238 PrintStatusMenu("fSequenceFileWritten", "Sequfile");
239 printf(" </td><td>\n");
240 PrintStatusMenu("fFillCallisto", "Fillcallisto");
241 printf(" </td><td>\n");
242 PrintStatusMenu("fFillStar", "Fillstar");
243
244 printf("</td></tr> </table>\n");
245 printf(" </div><p>\n");
246}
247
248function PrintFailMenu()
249{
250 printf(" <div id='fail' style='display:none'>\n");
251 printf(" <table>\n");
252 printf(" <tr>\n");
253
254 CheckBox("fStartTime", "StartTime");
255 CheckBox("fFailedTime", "FailedTime");
256 CheckBox("fReturnCode", "ErrCode");
257 CheckBox("fFailedCode", "RetCode");
258 CheckBox("fFailedCodeAdd", "CodeAdd");
259
260 printf(" </tr>\n");
261 printf(" </table>\n");
262 printf(" </div><p>\n");
263}
264
265function PrintCalMenu()
266{
267 printf(" <div id='cal' style='display:none'>\n");
268 printf(" <table>\n");
269 printf(" <tr>\n");
270
271 CheckBox("fUnsuitableInner", "Unsuitable inner");
272 CheckBox("fUnsuitableOuter", "Unsuitable outer");
273 CheckBox("fUnreliableInner", "Unreliable inner");
274 CheckBox("fUnreliableOuter", "Unreliable outer");
275
276 printf(" </tr><tr>\n");
277
278 CheckBox("fIsolatedInner", "Isolated inner");
279 CheckBox("fIsolatedOuter", "Isolated outer");
280 CheckBox("fIsolatedMaxCluster", "IsolatedMaxCluster");
281
282 printf(" </tr><tr>\n");
283
284 CheckBox("fArrTimeMeanInner", "ArrTimeMean inner ");
285 CheckBox("fArrTimeMeanOuter", "ArrTimeMean outer ");
286 CheckBox("fArrTimeRmsInner", "ArrTimeRms inner ");
287 CheckBox("fArrTimeRmsOuter", "ArrTimeRms outer ");
288
289 printf(" </tr><tr>\n");
290
291 CheckBox("fMeanPedRmsInner", "MeanPedRms inner");
292 CheckBox("fMeanPedRmsOuter", "MeanPedRms outer");
293 CheckBox("fMeanSignalInner", "MeanSignal inner");
294 CheckBox("fMeanSignalOuter", "MeanSignal outer");
295
296 printf(" </tr><tr>\n");
297
298 CheckBox("fConvFactorInner", "Conv inner ");
299 CheckBox("fConvFactorOuter", "Conv outer ");
300 CheckBox("fPulsePosMean", "Mean PulsePos");
301
302 printf(" </tr></table>\n");
303 printf(" </div><p>\n");
304}
305
306function PrintStarMenu()
307{
308 printf(" <div id='star' style='display:none'>\n");
309 printf(" <table>\n");
310 printf(" <tr>\n");
311
312 CheckBox("fDataRate", "CleanedEvtRate");
313 CheckBox("fMeanNumberIslands", "MeanNumIslands");
314 CheckBox("fMaxHumidity", "MaxHumidity");
315 CheckBox("fInhomogeneity", "Inhomogeneity");
316
317 printf(" </tr><tr>\n");
318
319 CheckBox("fMuonRate", "MuonRate");
320 CheckBox("fMuonNumber", "MuonNumber");
321 CheckBox("fRatio", "Ratio");
322 CheckBox("fPSF", "PSF");
323
324 printf(" </tr><tr>\n");
325
326 CheckBox("fEffOnTime", "EffOnTime");
327 CheckBox("fEffOnTime/fRunTime", "RelOnTime");
328 CheckBox("fBrightnessMed", "SkyBrightnessMed");
329 CheckBox("fBrightnessRMS", "SkyBrightnessRMS");
330
331 printf(" </tr><tr>\n");
332
333 CheckBox("fNumStarsMed", "# id. Stars");
334 CheckBox("fNumStarsRMS", "RMS id. Stars");
335 CheckBox("fNumStarsCorMed", "# cor. Stars");
336 CheckBox("fNumStarsCorRMS", "RMS cor. Stars");
337
338 printf(" </tr>\n");
339 printf(" </table>\n");
340 printf(" </div><p>\n");
341}
342
343function PrintDataSetInfoMenu($host,$user,$pw,$db)
344{
345 printf(" <div id=\"info\" style='display:none'>");
346 printf(" <table>\n");
347 printf(" <tr>\n");
348
349 CheckBox("fWobble", "Wobble");
350 CheckBox("fComment", "Comment");
351 CheckBox("fScaleFactor", "Scale");
352 CheckBox("fEffOnTime/3600", "EffOnTime");
353 CheckBox("fLinks", "Links");
354
355 printf(" </tr><tr>\n");
356
357 CheckBox("fExcessEvents", "ExcEvts");
358 CheckBox("fBackgroundEvents", "BgEvts");
359 CheckBox("fSignalEvents", "SignEvts");
360 CheckBox("fSignificance", "Sign");
361
362 printf(" </tr><tr>\n");
363
364 CheckBox("fExcessEvents*60/fEffOnTime", "ExcRate");
365 CheckBox("fBackgroundEvents*60/fEffOnTime", "BgRate");
366 CheckBox("fSignalEvents*60/fEffOnTime", "SignRate");
367 CheckBox("Round(fSignificance/Sqrt(fEffOnTime/3600),2)", "SignfRate");
368
369 printf(" </tr>\n");
370 printf(" </table>\n");
371 printf(" </div><p>\n");
372}
373
374function PrintDataSetStatMenu($host,$user,$pw,$db)
375{
376 printf(" <div id=\"stat\" style='display:none'>\n");
377 printf(" <table>\n");
378 printf(" <tr>\n");
379
380 printf(" <td>\n");
381 PrintStatusMenu("fDataSetInserted", "DataSet Inserted");
382 printf(" </td><td>\n");
383 PrintStatusMenu("fStarFilesAvail", "FilesAvail");
384 printf(" </td><td>\n");
385 PrintStatusMenu("fGanymed", "Ganymed");
386 printf(" </td><td>\n");
387 PrintStatusMenu("fFillGanymed", "FillGanymed");
388 printf(" </tr>\n");
389 printf(" </table>\n");
390 printf(" </div><p>\n");
391}
392
393function PrintRunRangeMenu($host,$user,$pw,$db)
394{
395 if (empty($_GET["fRunMin"]))
396 $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db);
397 else
398 $min = $_GET["fRunMin"];
399
400 if (empty($_GET["fRunMax"]))
401 $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db);
402 else
403 $max = $_GET["fRunMax"];
404
405 printf("Runs&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min);
406 printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
407}
408
409function PrintSequRangeMenu($host,$user,$pw,$db)
410{
411 if (empty($_GET["fRunMin"]))
412 $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
413 else
414 $min = $_GET["fRunMin"];
415
416 if (empty($_GET["fRunMax"]))
417 $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
418 else
419 $max = $_GET["fRunMax"];
420
421 printf("Sequences&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min);
422 printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
423}
424
425function PrintDataSetRangeMenu($host,$user,$pw,$db)
426{
427 if (empty($_GET["fRunMin"]))
428 $min = GetMin("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
429 else
430 $min = $_GET["fRunMin"];
431
432 if (empty($_GET["fRunMax"]))
433 $max = GetMax("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
434 else
435 $max = $_GET["fRunMax"];
436
437 printf("DataSets&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">\n", $min);
438 printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
439}
440
441function PrintZdRangeMenu($host,$user,$pw,$db)
442{
443 if (empty($_GET["fZDMin"]))
444 $zdmin = GetMin("fZenithDistanceMin", "Sequences", $host, $user, $pw, $db);
445 else
446 $zdmin = $_GET["fZDMin"];
447
448 if (empty($_GET["fZDMax"]))
449 $zdmax = GetMax("fZenithDistanceMax", "Sequences", $host, $user, $pw, $db);
450 else
451 $zdmax = $_GET["fZDMax"];
452
453 printf("ZenithDistance&nbsp;from&nbsp;<input name=\"fZDMin\" type=\"text\" size=\"2\" maxlength=\"2\" value=\"%s\">\n", $zdmin);
454 printf("to&nbsp;<input name=\"fZDMax\" type=\"text\" size=\"2\" maxlength=\"2\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $zdmax);
455}
456
457function PrintNightRangeMenu($host,$user,$pw,$db)
458{
459 if (empty($_GET["fStartDate"]))
460 $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);
461 else
462 $timemin = $_GET["fStartDate"];
463
464 if (empty($_GET["fStopDate"]))
465 $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db);
466 else
467 $timemax = $_GET["fStopDate"];
468
469 printf("Night&nbsp;(yyyy-mm-dd)&nbsp;from&nbsp;<input name=\"fStartDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">\n", $timemin);
470 printf("to&nbsp;<input name=\"fStopDate\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"%s\">&nbsp;&nbsp;&nbsp;&nbsp;\n", $timemax);
471}
472
473function PrintSourceMenu($host,$user,$pw,$db)
474{
475 printf("Source&nbsp;(<A HREF=\"regexp.html\">regexp</A>)&nbsp;<input name=\"fSourceN\" type=\"text\" size=\"15\" maxlength=\"15\" value=\"");
476 if (!empty($_GET["fSourceN"]))
477 printf("%s", $_GET["fSourceN"]);
478 printf("\">&nbsp;&nbsp;&nbsp;\n");
479}
480function PrintSequMenu($host,$user,$pw,$db)
481{
482 printf("Sequ#&nbsp;<input name=\"fSequenceNo\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"");
483 if (!empty($_GET["fSequenceNo"]))
484 printf("%s", $_GET["fSequenceNo"]);
485 printf("\">&nbsp;&nbsp;&nbsp;\n");
486}
487
488function PrintNumResPullDown()
489{
490 printf(" Results:\n");
491 printf(" <select name=\"fNumResults\">\n");
492
493 $numres = array("10", "20", "50", "100", "200", "500", "1000", "2000");
494 foreach ($numres as $element)
495 {
496 if ($element==$_GET["fNumResults"])
497 printf("<option value=\"%s\" selected>%3s</option>\n", $element, $element);
498 else
499 printf("<option value=\"%s\">%3s</option>\n", $element, $element);
500 }
501 printf(" </select>\n");
502 printf(" &nbsp;&nbsp;&nbsp;\n");
503}
504
505function PrintButtons($page)
506{
507 printf("<input class='Width' type='submit' value='Query Table'>&nbsp;&nbsp;&nbsp;\n");
508 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"%s\"'>&nbsp;&nbsp;&nbsp;\n", $page);
509// printf("<p>");
510 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
511 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"]));
512 if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
513 {
514 printf("<input class='Width' type='button' value='Print' onClick='self.location.href=\"%s&amp;fPrintTable=1\"'>&nbsp;&nbsp;&nbsp;\n", htmlspecialchars($_SERVER["REQUEST_URI"]));
515 printf("MySqlQuery: <img id='showquerybutton' src='../plus.png' alt='+' onClick='showhide(\"showquery\")'>\n");
516 }
517}
518
519function InitFailInfo($_GET)
520{
521 if (empty($_GET["fStartTime"]))
522 $_GET["fStartTime"]="Off";
523
524 if (empty($_GET["fFailedTime"]))
525 $_GET["fFailedTime"]="Off";
526
527 if (empty($_GET["fReturnCode"]))
528 $_GET["fReturnCode"]="Off";
529
530 if (empty($_GET["fFailedCode"]))
531 $_GET["fFailedCode"]="Off";
532
533 if (empty($_GET["fFailedCodeAdd"]))
534 $_GET["fFailedCodeAdd"]="Off";
535}
536
537function InitInfo($_GET)
538{
539 if (empty($_GET["fNumResults"]))
540 $_GET["fNumResults"]="20";
541
542 if (empty($_GET["fNumEvents"]))
543 $_GET["fNumEvents"]="Off";
544
545 if (empty($_GET["fRunStart"]))
546 $_GET["fRunStart"]="Off";
547
548 if (empty($_GET["fTest"]))
549 $_GET["fTest"]="Off";
550
551 if (empty($_GET["fSourceName"]))
552 $_GET["fSourceName"]="Off";
553
554 if (empty($_GET["fProjectName"]))
555 $_GET["fProjectName"]="Off";
556
557 if (empty($_GET["fL1TriggerTableName"]))
558 $_GET["fL1TriggerTableName"]="Off";
559
560 if (empty($_GET["fL2TriggerTableName"]))
561 $_GET["fL2TriggerTableName"]="Off";
562
563 if (empty($_GET["fHvSettingsName"]))
564 $_GET["fHvSettingsName"]="Off";
565
566 if (empty($_GET["fDiscriminatorThresholdTableName"]))
567 $_GET["fDiscriminatorThresholdTableName"]="Off";
568
569 if (empty($_GET["fTriggerDelayTableName"]))
570 $_GET["fTriggerDelayTableName"]="Off";
571
572 if (empty($_GET["fLightConditionsName"]))
573 $_GET["fLightConditionsName"]="Off";
574
575 if (empty($_GET["fTestFlagName"]))
576 $_GET["fTestFlagName"]="Off";
577}
578
579function InitRunStatus($_GET)
580{
581 if (empty($_GET["fDataCheckDone"]))
582 $_GET["fDataCheckDone"]="Off";
583
584 if (empty($_GET["fDataCheckDoneStatus"]))
585 $_GET["fDataCheckDoneStatus"]="0";
586
587 if (empty($_GET["fCCFileAvail"]))
588 $_GET["fCCFileAvail"]="Off";
589
590 if (empty($_GET["fCCFileAvailStatus"]))
591 $_GET["fCCFileAvailStatus"]="0";
592
593 if (empty($_GET["fCaCoFileAvail"]))
594 $_GET["fCaCoFileAvail"]=$first?"On":"";
595
596 if (empty($_GET["fCaCoFileAvailStatus"]))
597 $_GET["fCaCoFileAvailStatus"]="0";
598
599 if (empty($_GET["fCaCoFileFound"]))
600 $_GET["fCaCoFileFound"]="Off";
601
602 if (empty($_GET["fCaCoFileFoundStatus"]))
603 $_GET["fCaCoFileFoundStatus"]="0";
604
605 if (empty($_GET["fRawFileAvail"]))
606 $_GET["fRawFileAvail"]="Off";
607
608 if (empty($_GET["fRawFileAvailStatus"]))
609 $_GET["fRawFileAvailStatus"]="0";
610
611 if (empty($_GET["fTimingCorrection"]))
612 $_GET["fTimingCorrection"]="Off";
613
614 if (empty($_GET["fTimingCorrectionStatus"]))
615 $_GET["fTimingCorrectionStatus"]="0";
616}
617
618function InitRunInfo($_GET)
619{
620 InitRunStatus($_GET);
621 InitInfo($_GET);
622 InitFailInfo($_GET);
623
624 if (empty($_GET["fFormatVersion"]))
625 $_GET["fFormatVersion"]="Off";
626
627 if (empty($_GET["fRunStop"]))
628 $_GET["fRunStop"]="Off";
629
630 if (empty($_GET["fAzimuth"]))
631 $_GET["fAzimuth"]="Off";
632
633 if (empty($_GET["fZenithDistance"]))
634 $_GET["fZenithDistance"]="Off";
635
636 if (empty($_GET["fRunTypeName"]))
637 $_GET["fRunTypeName"]="Off";
638
639 if (empty($_GET["fExcludedFDAName"]))
640 $_GET["fExcludedFDAName"]="Off";
641
642 if (empty($_GET["fMagicNumberName"]))
643 $_GET["fMagicNumberName"]="Off";
644
645 if (empty($_GET["fMeanTriggerRate"]))
646 $_GET["fMeanTriggerRate"]="Off";
647
648 if (empty($_GET["fCalibrationScriptName"]))
649 $_GET["fCalibrationScriptName"]="Off";
650
651 if (empty($_GET["fTestFlagName"]))
652 $_GET["fTestFlagName"]="Off";
653
654 if (empty($_GET["fDaqStoreRate"]))
655 $_GET["fDaqStoreRate"]="Off";
656
657 if (empty($_GET["fDaqTriggerRate"]))
658 $_GET["fDaqTriggerRate"]="Off";
659
660 if (empty($_GET["fL2RatePresc"]))
661 $_GET["fL2RatePresc"]="Off";
662
663 if (empty($_GET["fL2RateUnpresc"]))
664 $_GET["fL2RateUnpresc"]="Off";
665
666 if (empty($_GET["fSequenceFirst"]))
667 $_GET["fSequenceFirst"]="Off";
668
669 if (empty($_GET["fSequenceNo"]))
670 $_GET["fSequenceNo"]="";
671}
672
673function InitSequStatus($_GET)
674{
675 if (empty($_GET["fSequenceFileWritten"]))
676 $_GET["fSequenceFileWritten"]="Off";
677
678 if (empty($_GET["fSequenceFileWrittenStatus"]))
679 $_GET["fSequenceFileWrittenStatus"]="0";
680
681 if (empty($_GET["fAllFilesAvail"]))
682 $_GET["fAllFilesAvail"]="Off";
683
684 if (empty($_GET["fAllFilesAvailStatus"]))
685 $_GET["fAllFilesAvailStatus"]="0";
686
687 if (empty($_GET["fCallisto"]))
688 $_GET["fCallisto"]="Off";
689
690 if (empty($_GET["fCallistoStatus"]))
691 $_GET["fCallistoStatus"]="0";
692
693 if (empty($_GET["fFillCallisto"]))
694 $_GET["fFillCallisto"]="Off";
695
696 if (empty($_GET["fFillCallistoStatus"]))
697 $_GET["fFillCallistoStatus"]="0";
698
699 if (empty($_GET["fStar"]))
700 $_GET["fStar"]="Off";
701
702 if (empty($_GET["fStarStatus"]))
703 $_GET["fStarStatus"]="0";
704
705 if (empty($_GET["fFillStar"]))
706 $_GET["fFillStar"]="Off";
707
708 if (empty($_GET["fFillStarStatus"]))
709 $_GET["fFillStarStatus"]="0";
710}
711
712function InitStarInfo($_GET)
713{
714 if (empty($_GET["fMeanNumberIslands"]))
715 $_GET["fMeanNumberIslands"]="Off";
716
717 if (empty($_GET["fPSF"]))
718 $_GET["fPSF"]="Off";
719
720 if (empty($_GET["fRatio"]))
721 $_GET["fRatio"]="Off";
722
723 if (empty($_GET["fMuonNumber"]))
724 $_GET["fMuonNumber"]="Off";
725
726 if (empty($_GET["fEffOnTime"]))
727 $_GET["fEffOnTime"]="Off";
728
729 if (empty($_GET["fEffOnTime/fRunTime"]))
730 $_GET["fEffOnTime/fRunTime"]="Off";
731
732 if (empty($_GET["fMuonRate"]))
733 $_GET["fMuonRate"]="Off";
734
735 if (empty($_GET["fInhomogeneity"]))
736 $_GET["fInhomogeneity"]="Off";
737
738 if (empty($_GET["fDataRate"]))
739 $_GET["fDataRate"]="Off";
740
741 if (empty($_GET["fMaxHumidity"]))
742 $_GET["fMaxHumidity"]="Off";
743}
744
745function InitCalInfo($_GET)
746{
747 if (empty($_GET["fUnreliableInner"]))
748 $_GET["fUnreliableInner"]="Off";
749
750 if (empty($_GET["fUnsuitableOuter"]))
751 $_GET["fUnsuitableOuter"]="Off";
752
753 if (empty($_GET["fUnreliableOuter"]))
754 $_GET["fUnreliableOuter"]="Off";
755
756 if (empty($_GET["fUnsuitableInner"]))
757 $_GET["fUnsuitableInner"]="Off";
758
759 if (empty($_GET["fIsolatedInner"]))
760 $_GET["fIsolatedInner"]="Off";
761
762 if (empty($_GET["fIsolatedOuter"]))
763 $_GET["fIsolatedOuter"]="Off";
764
765 if (empty($_GET["fMeanPedRmsInner"]))
766 $_GET["fMeanPedRmsInner"]="Off";
767
768 if (empty($_GET["fMeanPedRmsOuter"]))
769 $_GET["fMeanPedRmsOuter"]="Off";
770
771 if (empty($_GET["fIsolatedMaxCluster"]))
772 $_GET["fIsolatedMaxCluster"]="Off";
773
774 if (empty($_GET["fArrTimeMeanInner"]))
775 $_GET["fArrTimeMeanInner"]="Off";
776
777 if (empty($_GET["fArrTimeMeanOuter"]))
778 $_GET["fArrTimeMeanOuter"]="Off";
779
780 if (empty($_GET["fArrTimeRmsInner"]))
781 $_GET["fArrTimeRmsInner"]="Off";
782
783 if (empty($_GET["fArrTimeRmsOuter"]))
784 $_GET["fArrTimeRmsOuter"]="Off";
785
786 if (empty($_GET["fMeanSignalInner"]))
787 $_GET["fMeanSignalInner"]=$first?"Off":"";
788
789 if (empty($_GET["fMeanSignalOuter"]))
790 $_GET["fMeanSignalOuter"]=$first?"Off":"";
791
792 if (empty($_GET["fPulsePosMean"]))
793 $_GET["fPulsePosMean"]=$first?"Off":"";
794
795 if (empty($_GET["fConvFactorInner"]))
796 $_GET["fConvFactorInner"]="Off";
797
798 if (empty($_GET["fConvFactorOuter"]))
799 $_GET["fConvFactorOuter"]="Off";
800}
801
802function InitSequInfo($_GET)
803{
804 InitInfo($_GET);
805 InitSequStatus($_GET);
806 InitFailInfo($_GET);
807 InitCalInfo($_GET);
808 InitStarInfo($_GET);
809
810 if (empty($_GET["fRunTime/60"]))
811 $_GET["fRunTime/60"]="Off";
812
813 if (empty($_GET["fSequenceLast"]))
814 $_GET["fSequenceLast"]="Off";
815
816 if (empty($_GET["fAzimuthMin"]))
817 $_GET["fAzimuthMin"]="Off";
818
819 if (empty($_GET["fAzimuthMax"]))
820 $_GET["fAzimuthMax"]="Off";
821
822 if (empty($_GET["fZenithDistanceMin"]))
823 $_GET["fZenithDistanceMin"]="Off";
824
825 if (empty($_GET["fZenithDistanceMax"]))
826 $_GET["fZenithDistanceMax"]="Off";
827
828 if (empty($_GET["fObservationModeName"]))
829 $_GET["fObservationModeName"]="Off";
830
831// if (empty($_GET["fManuallyChangedName"]))
832// $_GET["fManuallyChangedName"]="Off";
833}
834
835function InitDataSetStatus($_GET)
836{
837 if (empty($_GET["fDataSetInserted"]))
838 $_GET["fDataSetInserted"]="Off";
839
840 if (empty($_GET["fDataSetInsertedStatus"]))
841 $_GET["fDataSetInsertedStatus"]="0";
842
843 if (empty($_GET["fStarFilesAvail"]))
844 $_GET["fStarFilesAvail"]="Off";
845
846 if (empty($_GET["fStarFilesAvailStatus"]))
847 $_GET["fStarFilesAvailStatus"]="0";
848
849 if (empty($_GET["fGanymed"]))
850 $_GET["fGanymed"]=$first?"On":"";
851
852 if (empty($_GET["fGanymedStatus"]))
853 $_GET["fGanymedStatus"]="0";
854
855 if (empty($_GET["fFillGanymed"]))
856 $_GET["fFillGanymed"]="Off";
857
858 if (empty($_GET["fFillGanymedStatus"]))
859 $_GET["fFillGanymedStatus"]="0";
860}
861
862function InitDataSetInfo($_GET)
863{
864 InitDataSetStatus($_GET);
865 InitFailInfo($_GET);
866
867 if (empty($_GET["fNumResults"]))
868 $_GET["fNumResults"]="50";
869
870 if (empty($_GET["fSourceName"]))
871 $_GET["fSourceName"]="Off";
872
873 if (empty($_GET["fComment"]))
874 $_GET["fComment"]="Off";
875
876 if (empty($_GET["fWobble"]))
877 $_GET["fWobble"]="Off";
878
879 if (empty($_GET["fExcessEvents"]))
880 $_GET["fExcessEvents"]="Off";
881
882 if (empty($_GET["fExcessEvents*60/fEffOnTime"]))
883 $_GET["fExcessEvents*60/fEffOnTime"]="Off";
884
885 if (empty($_GET["fBackgroundEvents*60/fEffOnTime"]))
886 $_GET["fBackgroundEvents*60/fEffOnTime"]="Off";
887
888 if (empty($_GET["fBackgroundEvents"]))
889 $_GET["fBackgroundEvents"]="Off";
890
891 if (empty($_GET["fSignalEvents"]))
892 $_GET["fSignalEvents"]="Off";
893
894 if (empty($_GET["fSignalEvents*60/fEffOnTime"]))
895 $_GET["fSignalEvents*60/fEffOnTime"]="Off";
896
897 if (empty($_GET["fSignificance"]))
898 $_GET["fSignificance"]="Off";
899
900 if (empty($_GET["Round(fSignificance/Sqrt(fEffOnTime/3600),2)"]))
901 $_GET["Round(fSignificance/Sqrt(fEffOnTime/3600),2)"]="Off";
902
903 if (empty($_GET["fScaleFactor"]))
904 $_GET["fScaleFactor"]="Off";
905
906 if (empty($_GET["fEffOnTime/3600"]))
907 $_GET["fEffOnTime/3600"]="Off";
908}
909
910function InitFindOffData($_GET)
911{
912 InitSequInfo($_GET);
913
914 if (empty($_GET["fArrTimeLimitMean"]))
915 $_GET["fArrTimeLimitMean"]="";
916
917 if (empty($_GET["fArrTimeLimitRms"]))
918 $_GET["fArrTimeLimitRms"]="";
919
920 if (empty($_GET["fPedRmsInLimitMean"]))
921 $_GET["fPedRmsInLimitMean"]="";
922
923 if (empty($_GET["fPedRmsInLimitRms"]))
924 $_GET["fPedRmsInLimitRms"]="";
925
926 if (empty($_GET["fMuonRateLimitMean"]))
927 $_GET["fMuonRateLimitMean"]="";
928
929 if (empty($_GET["fMuonRateLimitRms"]))
930 $_GET["fMuonRateLimitRms"]="";
931
932 if (empty($_GET["fImgRateLimitMean"]))
933 $_GET["fImgRateLimitMean"]="";
934
935 if (empty($_GET["fImgRateLimitRms"]))
936 $_GET["fImgRateLimitRms"]="";
937
938 if (empty($_GET["fPSFLimitMean"]))
939 $_GET["fPSFLimitMean"]="";
940
941 if (empty($_GET["fPSFLimitRms"]))
942 $_GET["fPSFLimitRms"]="";
943
944 if (empty($_GET["fUnsInLimitMean"]))
945 $_GET["fUnsInLimitMean"]="";
946
947 if (empty($_GET["fZdMinLimitMean"]))
948 $_GET["fZdMinLimitMean"]="";
949
950 if (empty($_GET["fZdMaxLimitMean"]))
951 $_GET["fZdMaxLimitMean"]="";
952}
953
954
955?>
Note: See TracBrowser for help on using the repository browser.