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

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