From: hadaq Date: Thu, 1 May 2025 17:44:41 +0000 (+0200) Subject: add new QA web files X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=8277ddd788369238f7263ca87b461014a2319176;p=hadesdaq.git add new QA web files --- diff --git a/beamabort/beam_abort_init_beamCond.trbcmd b/beamabort/beam_abort_init_beamCond.trbcmd index f661660..646b242 100644 --- a/beamabort/beam_abort_init_beamCond.trbcmd +++ b/beamabort/beam_abort_init_beamCond.trbcmd @@ -31,21 +31,21 @@ w 0x0130 0xe01d 0x000003e8 #Indiv_Timewindow.29 w 0x0130 0xe01e 0x000003e8 #Indiv_Timewindow.30 w 0x0130 0xe01f 0x000003e8 #Indiv_Timewindow.31 -w 0x0130 0xe100 10000 -w 0x0130 0xe101 10000 -w 0x0130 0xe102 10000 -w 0x0130 0xe103 10000 -w 0x0130 0xe104 10000 -w 0x0130 0xe105 10000 +w 0x0130 0xe100 18000 +w 0x0130 0xe101 18000 +w 0x0130 0xe102 18000 +w 0x0130 0xe103 18000 +w 0x0130 0xe104 18000 +w 0x0130 0xe105 18000 w 0x0130 0xe106 0x00000000 #Indiv_Limit.6 w 0x0130 0xe107 0x00000000 #Indiv_Limit.7 -w 0x0130 0xe108 10000 -w 0x0130 0xe109 10000 -w 0x0130 0xe10a 10000 -w 0x0130 0xe10b 10000 +w 0x0130 0xe108 18000 +w 0x0130 0xe109 18000 +w 0x0130 0xe10a 18000 +w 0x0130 0xe10b 18000 w 0x0130 0xe10c 0x00000000 #Indiv_Limit.12 -w 0x0130 0xe10d 10000 -w 0x0130 0xe10e 10000 +w 0x0130 0xe10d 18000 +w 0x0130 0xe10e 18000 w 0x0130 0xe10f 0x00000000 #Indiv_Limit.15 w 0x0130 0xe110 0x00000000 #Indiv_Limit.16 w 0x0130 0xe111 0x00000000 #Indiv_Limit.17 diff --git a/evtbuild/start_eb_gbe.sh b/evtbuild/start_eb_gbe.sh index c45cfe6..5cfa4cf 100755 --- a/evtbuild/start_eb_gbe.sh +++ b/evtbuild/start_eb_gbe.sh @@ -1 +1 @@ -./start_eb_gbe.pl -e restart -n 1-16 -d on -p te -b 1; +./start_eb_gbe.pl -e restart -n 1-16 -d on -p te -b 8; diff --git a/hadesroot/EMC.htm b/hadesroot/EMC.htm new file mode 100644 index 0000000..36f65dd --- /dev/null +++ b/hadesroot/EMC.htm @@ -0,0 +1,132 @@ + + + + + + + + + + +
+ + + + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/hadesroot/MDC.htm b/hadesroot/MDC.htm new file mode 100644 index 0000000..7f6f3ec --- /dev/null +++ b/hadesroot/MDC.htm @@ -0,0 +1,674 @@ + + + + + + + + + + + +
+ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/hadesroot/Main.htm b/hadesroot/Main.htm new file mode 100644 index 0000000..1fe21a4 --- /dev/null +++ b/hadesroot/Main.htm @@ -0,0 +1,122 @@ + + + + + + + + + + + +
+ + +
+ +
+
+
+
+
+
+
+
+ + diff --git a/hadesroot/Physics.htm b/hadesroot/Physics.htm new file mode 100644 index 0000000..c387c49 --- /dev/null +++ b/hadesroot/Physics.htm @@ -0,0 +1,431 @@ + + + + + + + + + + + +
+ + + + + + + + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/hadesroot/RICH.htm b/hadesroot/RICH.htm new file mode 100644 index 0000000..b2d9e68 --- /dev/null +++ b/hadesroot/RICH.htm @@ -0,0 +1,217 @@ + + + + + + + + + + +
+ + + + + + + + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/hadesroot/RPC.htm b/hadesroot/RPC.htm new file mode 100644 index 0000000..78ef5a8 --- /dev/null +++ b/hadesroot/RPC.htm @@ -0,0 +1,314 @@ + + + + + + + + + + + +
+ + + + + + + + + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/hadesroot/Start.htm b/hadesroot/Start.htm new file mode 100644 index 0000000..9cdebbd --- /dev/null +++ b/hadesroot/Start.htm @@ -0,0 +1,160 @@ + + + + + + + + + + + +
+ + + + +
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/hadesroot/TOF.htm b/hadesroot/TOF.htm new file mode 100644 index 0000000..b434803 --- /dev/null +++ b/hadesroot/TOF.htm @@ -0,0 +1,124 @@ + + + + + + + + + + + +
+ + + + + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/hadesroot/Trigger.htm b/hadesroot/Trigger.htm new file mode 100644 index 0000000..2e10f16 --- /dev/null +++ b/hadesroot/Trigger.htm @@ -0,0 +1,101 @@ + + + + + + + + + + + +
+ + + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/hadesroot/WALL.htm b/hadesroot/WALL.htm new file mode 100644 index 0000000..4994bfc --- /dev/null +++ b/hadesroot/WALL.htm @@ -0,0 +1,232 @@ + + + + + + + + + + + +
+ + + + + + + + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/hadesroot/files/functions.mjs b/hadesroot/files/functions.mjs new file mode 100644 index 0000000..74e738f --- /dev/null +++ b/hadesroot/files/functions.mjs @@ -0,0 +1,159 @@ +import * as root from '/jsroot/modules/main.mjs'; +import * as colors from '/jsroot/modules/base/colors.mjs'; + +let first_call = {}; +export function initUpdate(histnames, histoptions, helptext, globalSettings) { + for (var t = 0; t < histnames.length; t++) { + first_call[t] = {}; + } + if (globalSettings) for (let [key, value] of Object.entries(globalSettings)) { + root.settings[key] = value; + } + document.getElementsByClassName("tabcontent")[0].style.display = 'flex'; + update(histnames, histoptions); + + // Array.from(document.getElementsByClassName("tabcontent")).forEach(addhelp); + for (let tc = 0; tc < document.getElementsByClassName("tabcontent").length; tc++) { + for (let t = 0; t < document.getElementsByClassName("tabcontent")[tc].children.length; t++) { + addhelp(tc, t, helptext[tc][t]); + } + } +} + +function addhelp(tc, t, h) { + const obj = document.getElementsByClassName("tabcontent")[tc].children[t]; + const box = document.createElement("div"); + box.classList.add("help"); + box.innerHTML = h; + obj.append(box) +} + +function deepMerge(target, source) { + if (!source) + return target; + Object.entries(source).forEach(([key, value]) => { + if (value && typeof value === 'object') { + deepMerge(target[key] = target[key] || {}, value); + return; + } + target[key] = value; + }); + return target; +} + +function setPainterSettings(painter, settings) { + if (!settings) + return; + if (settings.FRAME) + deepMerge(painter.getFramePainter(), settings.FRAME); + if (settings.PAINTER) + deepMerge(painter, settings.PAINTER); + if (settings.PAD) + deepMerge(painter.getPadPainter(), settings.PAD); +} + +function createLegendEntry(obj, lbl) { + let entry = root.create('TLegendEntry'); + entry.fObject = obj; + entry.fLabel = lbl; + entry.fOption = 'l'; + return entry; +} + +export async function update(histnames, histoptions) { + + for (var t = 0; t < histnames.length; t++) { + let tablinks = document.getElementsByClassName("tablinks"); + if (!tablinks[t].className.includes("active")) + continue; + + for (var i = 0; i < histnames[t].length; i++) { + if (!Array.isArray(histnames[t][i])) { + let hist = await root.httpRequest('/qaweb/HadesQA/' + histnames[t][i] + '/root.json.gz?compact=23', 'object'); + if (histoptions[t][i].HIST) deepMerge(hist, histoptions[t][i].HIST); + if (histoptions[t][i].XLABEL) { + hist.fXaxis.fLabels = root.create('THashList'); + for (let l = 0; l < histoptions[t][i].XLABEL.length; l++) { + let lbl = root.create('TObjString'); + lbl.fString = histoptions[t][i].XLABEL[l]; + lbl.fUniqueID = l + 1; + hist.fXaxis.fLabels.Add(lbl, ''); + } + } + // console.log(hist); + let painter = await root.redraw(`t${t}d${i}`, hist, ''); + // if (!first_call[t][i]) { + setPainterSettings(painter, histoptions[t][i]); + first_call[t][i] = true; + // } + // console.log(painter); + // console.log(painter.getFramePainter()); + } + else { + let histo = []; + let label = {}; + for (var j = 0; j < histnames[t][i].length; j++) { + histo[j] = await root.httpRequest('/qaweb/HadesQA/' + histnames[t][i][j] + '/root.json.gz?compact=23', 'object'); + deepMerge(histo[j], histoptions[t][i][j].HIST); + if (histoptions[t][i][j].LABEL == '') label[j] = histo[j].fTitle; + if (histoptions[t][i][j].LABEL) label[j] = histoptions[t][i][j].LABEL; + if (histoptions[t][i][j].XLABEL) { + // console.log(histoptions[t][i][j].XLABEL); + histo[j].fXaxis.fLabels = create('THashList'); + for (let l = 0; l < histoptions[t][i][j].XLABEL.length; l++) { + let lbl = create('TObjString'); + lbl.fString = histoptions[t][i][j].XLABEL[l]; + lbl.fUniqueID = l + 1; + histo[j].fXaxis.fLabels.Add(lbl, ''); + } + } + } + const stack = root.createTHStack(...histo); + // console.log(stack); + if (histo[0].fTitle) stack.fTitle = histo[0].fTitle; + if (Object.keys(label).length) { + let leg = root.create('TLegend'); + if (histoptions[t][i][Object.keys(label)[0]].LEGENDNOAUTO) + Object.assign(leg, histoptions[t][i][Object.keys(label)[0]].LEGENDNOAUTO); + for (let [key, value] of Object.entries(label)) { + leg.fPrimitives.Add(createLegendEntry(histo[key], value)); + } + // console.log(leg); + if (!histoptions[t][i][Object.keys(label)[0]].LEGENDNOAUTO) + stack.fHists.arr[0].fFunctions.Add(leg, 'autoplace'); + else + stack.fHists.arr[0].fFunctions.Add(leg, ''); + } + let painter = await root.redraw(`t${t}d${i}`, stack, 'nostack'); + // console.log(stack); + // console.log(histo[0]); + // console.log(stack.fHistogram.fFunctions); + // if (!first_call[t][i]) { + setPainterSettings(painter, histoptions[t][i][0]); + first_call[t][i] = true; + // } + } + } + } +} + +export function openTab(evt, Name) { + // Declare all variables + var i, tabcontent, tablinks; + + // Get all elements with class="tabcontent" and hide them + tabcontent = document.getElementsByClassName("tabcontent"); + for (i = 0; i < tabcontent.length; i++) { + tabcontent[i].style.display = 'none'; + } + + // Get all elements with class="tablinks" and remove the class "active" + tablinks = document.getElementsByClassName("tablinks"); + for (i = 0; i < tablinks.length; i++) { + tablinks[i].className = tablinks[i].className.replace(" active", ""); + } + + // Show the current tab, and add an "active" class to the button that opened the tab + document.getElementById(Name).style.display = 'flex'; + evt.currentTarget.className += " active"; +} diff --git a/hadesroot/files/tab.css b/hadesroot/files/tab.css new file mode 100644 index 0000000..8d7c10d --- /dev/null +++ b/hadesroot/files/tab.css @@ -0,0 +1,127 @@ +body { + height: calc(100vh - 30px); + margin:0; + padding:0; + margin-top:30px; + } + +.tabcontent { + display: none; /* establish flex container */ + flex-wrap: wrap; /* enable flex items to wrap */ + justify-content: space-around; +/* padding: 6px 12px; */ +/* border: 1px solid #ccc; */ + border-top: none; +} + +.tabcontent>div>div { + width:100%; + height:100%; +} + +.tabcontent>div { +/* padding: 5px; */ +/* margin-bottom: 5px; */ + background-color: #999; + border:1px solid #aaa; + position:relative; + +} + +.cell6x4>div { + flex: 1 1 16%; + height: calc(25vh - 10px); +} + +.cell3x3>div { + flex: 1 1 33%; + height: calc(33vh - 15px); +} + +.cell3x2>div { + flex: 1 1 33%; + height: calc(50vh - 20px); +} + +.cell3x1>div { + flex: 1 1 33%; + height: calc(100vh - 40px); +} + +.cell2x2>div { + flex: 1 1 49%; + height: calc(50vh - 20px); +} + +.cell2x1>div { + flex: 1 1 49%; + height: calc(100vh - 40px); +} + +.tab { + position:absolute; + top: 0px; + width: calc(100% - 2px); + z-index:1; + overflow: hidden; + border: 1px solid #ccc; + height: 30px; + max-height: 30px; + padding: 0; + margin: 0; + background-color: #f1f1f1; +} + +.tab button { + background-color: inherit; + float: left; + border: 1px solid #aaa; + outline: none; + cursor: pointer; + padding: 7px 20px; + transition: 0.3s; + border-radius:10px 10px 0 0; +} + +.tab button:hover { + background-color: #ddd; +} + +.tab button.active { + background-color: #fff; +} + + +.tabcontent .help { + position:absolute; + top:0; + right:0; + max-width:1em; + max-height:1.2em; + overflow:hidden; + background:#eed; + text-align:center; + z-index:2; + transition: max-width 200ms, max-height 200ms; +} + +.tabcontent .help:hover { + max-width:none; + max-height:none; + text-align:left; + background:#ddd; + overflow:scroll; + width:200px; + height:200px; + font-size:80%; + margin:5px; + padding:5px; + border:1px solid black; +} + +.tabcontent .help::before{ + content:"?"; +} +.tabcontent .help:hover::before{ + content:""; +} diff --git a/hmon/QA.pm b/hmon/QA.pm index 5c0547b..ff9d8b3 100644 --- a/hmon/QA.pm +++ b/hmon/QA.pm @@ -93,11 +93,11 @@ our @EcalTempLimits = (55, 60, 65); our @StartTempLimits = (55, 60, 65); our @ItofTempLimits = (55, 60, 65); our @RichInnerTempLimits = (37.5,38.5,39); -our @TrgErrLimits = (100, 1000, 10000); +our @TrgErrLimits = (1000, 2000, 10000); our @CPULimits = (95, 100, 100); our @TimeoutLimits = (0, 0, 1); our @TimeoutLimitsOnlyRICHMDC = (4, 6, 10); -our @LinkErrLimits = (50, 500, 1000); +our @LinkErrLimits = (150, 500, 1000); our @MdcEndpMissingLimits = (4, 5, 6); #(0, 4, 5)!!! Oh dear. our @RichEndpMissingLimits = (1, 3, 4); our @TofEndpMissingLimits = (0, 0, 0); @@ -114,7 +114,7 @@ our @MdcTokenMissLimits = (10,50,100); # Modification of 4.Feb2024 P1S3 supplied by different HV channels, so taken out here: our $MdcNominalHV = [[1750,1750,1750,1750,1750,1750],[1770,1790,1770,1770,1770,1770],[1900,1900,1900,1900,1900,1900],[2150,2150,2150,2150,2150,2150]]; our $MdcHVOffsetLimits = [[5,10,255],[5,30,255],[5,10,255],[10,110,325]]; -our @EcalHvLimits = (978,960,950); +our @EcalHvLimits = (977,960,950); our @RpcHvLimits = (12,12,12); our @TofHvLimits = (764,760,759); our @FwHvLimits = (280,250,200); @@ -123,6 +123,7 @@ our @ItofHvLimits = (29,28,0); our @TdcCalibrationInterval = (3200000,4500000,6000000); our @TdcCalibrationTemperature = (4,5,7); +our @TdcCalibrationTemperatureRich = (7,9,10); our @PionLvCurrLimits = (4,5,6); @@ -155,7 +156,7 @@ our $RichGasOff = 0; our $TofHvOff = 0; our $RpcHvOff = 0; our $FwHvOff = 0; -our $MagnetOff = 1; +our $MagnetOff = 0; our $StsHvOff = 1; our $StartHvOff = 1; our $ItofHvOff = 1; @@ -169,7 +170,8 @@ our $QAServerOff = 0; ############################################################################### our @mdc_boards_removed =(0x2257); # 2333 added 2024-03-01 #(0x2203, 0x2027, 0x2057); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23 -our @mdc_new_boards_removed =(); #(0x8e95,0xa950,0xa951); +our @mdc_new_boards_removed =(0x8e7b,0xa7b0,0xa7b1, + 0x8e5a,0xa5a0,0xa5a1,0xa5a2); #(0x8e95,0xa950,0xa951); #0x8e7b,0xa7b0,0xa7b1 our @mdc_chambers_removed =(); our @rich_boards_removed =();#(0x71a4,0x71a5,0x71b4,0x71b5,0x72a4,0x72a5,0x72b4,0x72b5,0x73a4,0x73a5,0x73b4,0x73b5,0x826a); diff --git a/hmon/hmon_adcvolt.pl b/hmon/hmon_adcvolt.pl index def4672..7970bc3 100755 --- a/hmon/hmon_adcvolt.pl +++ b/hmon/hmon_adcvolt.pl @@ -338,8 +338,8 @@ while(1) { my $value = ''; my $status = QA::OK; - if($min[0]<3270 || $min[1]<2500 || $min[2]<1250 || $min[3]<1160) {$status = QA::WARN} - if($min[10]<3330 || $min[11]<2560 || $min[12]<1250 || $min[13]<1160) {$status = QA::WARN} + if($min[0]<3270 || $min[1]<2500 || $min[2]<1240 || $min[3]<1160) {$status = QA::WARN} + if($min[10]<3330 || $min[11]<2560 || $min[12]<1240 || $min[13]<1160) {$status = QA::WARN} # QA::WriteQALog($fqa,"rich","volt",30,$status,'Voltages',$value,$longtext); @@ -384,7 +384,7 @@ while(1) { print $fh encode_json($dirich2V5); close $fh; - $dirich1V2->{min} = 1250; + $dirich1V2->{min} = 1240; $dirich1V2->{max} = 1400; $dirich1V2->{symbol} = 'mV'; $dirich1V2->{title} = 'RICH 1.2V'; diff --git a/hmon/hmon_calibration.pl b/hmon/hmon_calibration.pl index 7fb8137..cd7d7bb 100755 --- a/hmon/hmon_calibration.pl +++ b/hmon/hmon_calibration.pl @@ -42,9 +42,9 @@ while(1){ # print Dumper $store; - my ($min,$max) = (0,0); + my ($min,$max,$minrich,$maxrich) = (0,0,0,0); my ($minvdiff,$maxvdiff) = (10000,0); - my ($minboard,$maxboard) = (0,0); + my ($minboard,$maxboard,$minboardrich,$maxboardrich) = (0,0,0,0); my ($maxvdiffboard,$minvdiffboard) = (0,0); # print "Read\n"; @@ -55,14 +55,23 @@ while(1){ $newstore->{boards}{$b} = $t; if($store->{boards}) { next unless $store->{boards}{$b}; - if ($t - $store->{boards}{$b} > $max) { + if ($t - $store->{boards}{$b} > $max && ($b&0xF000) != 0x7000) { $max = $t - $store->{boards}{$b}; $maxboard = $b; } - if ($t - $store->{boards}{$b} < $min) { + if ($t - $store->{boards}{$b} < $min && ($b&0xF000) != 0x7000) { $min = $t - $store->{boards}{$b}; $minboard = $b; } + if ($t - $store->{boards}{$b} > $maxrich && ($b&0xF000) == 0x7000) { + $maxrich = $t - $store->{boards}{$b}; + $maxboardrich = $b; + } + if ($t - $store->{boards}{$b} < $minrich && ($b&0xF000) == 0x7000) { + $minrich = $t - $store->{boards}{$b}; + $minboardrich = $b; + } + } } if(($b&0xF000) == 0x7000) { @@ -97,7 +106,7 @@ while(1){ $export->{time} = time(); $export->{quality} = $data->{LastCalibr}{'quality'}; $export->{status}{time} = QA::GetQAState('below',$timesincecalib,@QA::TdcCalibrationInterval); - $export->{status}{temp} = QA::GetQAState('below',max(-$min,$max),@QA::TdcCalibrationTemperature); + $export->{status}{temp} = max(QA::GetQAState('below',max(-$min,$max),@QA::TdcCalibrationTemperature),QA::GetQAState('below',max(-$minrich,$maxrich),@QA::TdcCalibrationTemperatureRich)); $export->{status}{volt} = ($minvdiffboard || $maxvdiffboard)?QA::ERROR:QA::OK; $export->{status}{quality} = ($export->{quality} < 0.9)?QA::ERROR:QA::OK; # JAM12-2021: 0.9 means error was acknowledged by operator (???) , 1.0 means all is perfect @@ -130,7 +139,8 @@ while(1){ my $txt = strftime("%d.%m. %H:%M",localtime($data->{LastCalibr}{'time'})); my $longtext = "Last Calibration was done at $txt
"; $longtext .= sprintf("Temperature changed in the interval of %.1f (%04x) to %.1f (%04x) degrees.
",$min,$minboard,$max,$maxboard); - if($minvdiffboard) { + $longtext .= sprintf("Temperature changed in the interval of %.1f (%04x) to %.1f (%04x) degrees in RICH.
",$minrich,$minboardrich,$maxrich,$maxboardrich); + if($minvdiffboard) { $longtext .= sprintf("Voltage changed by %.1f (%04x) mV.
",$minvdiff,$minvdiffboard); } if($maxvdiffboard) { diff --git a/hmon/hmon_ipcheck.pl b/hmon/hmon_ipcheck.pl index 7b347cc..50958ce 100755 --- a/hmon/hmon_ipcheck.pl +++ b/hmon/hmon_ipcheck.pl @@ -29,6 +29,14 @@ my %hubnames = ( 'trb3sc315' => 'ECal', 'trb3sc318' => 'ECal', 'trb3sc316' => 'ECal', + + 'trb3sc548' => 'MDC', + 'trb3sc565' => 'MDC', + 'trb3sc546' => 'MDC', + 'trb3sc554' => 'MDC', + 'trb3sc563' => 'MDC', + 'trb3sc555' => 'MDC', + 'trb3sc134' => 'RPC', 'trb3sc009' => 'RPC', 'trb3sc130' => 'RPC', @@ -86,7 +94,7 @@ while(1) { # } # } - +print "n\n"; trb_init_ports() or die trb_strerror(); my $errorfound = 0; diff --git a/hmon/hmon_mdc_busy.pl b/hmon/hmon_mdc_busy.pl index a836d6f..5fa6538 100755 --- a/hmon/hmon_mdc_busy.pl +++ b/hmon/hmon_mdc_busy.pl @@ -63,7 +63,7 @@ while (1) { } Hmon::WriteFile("MDCBusy", $str[0][4]."

" #.$str[1][0].$str[1][1]."

". - .$str[1][2]."

".$str[1][3].$str[2][0]); + .$str[1][2]."

".$str[1][3].$str[2][2]); ($min, $max, $avg, $mean) = Hmon::MakeMinMax3($values, 4, 6, 16, 1); # Hmon::WriteLog($flog, "MDC BusyTime", diff --git a/hmon/hmon_mdc_plotmissingboards.pl b/hmon/hmon_mdc_plotmissingboards.pl index a7295fa..c7c4928 100755 --- a/hmon/hmon_mdc_plotmissingboards.pl +++ b/hmon/hmon_mdc_plotmissingboards.pl @@ -48,7 +48,7 @@ my $store = {}; $str[2][$l] .= Hmon::MakeFooter(); # Hmon::WriteFile("MDC".$l."Temperature",$str[0][$l].$str[1][$l].$str[2][$l]); } - Hmon::WriteFile("MDCFailure",$str[0][4]."

".$str[1][0].$str[1][1]."

".$str[1][2]."

".$str[1][3].$str[2][0]); + Hmon::WriteFile("MDCFailure",$str[0][4]."

".$str[1][0].$str[1][1]."

".$str[1][2]."

".$str[1][3].$str[2][3]); diff --git a/hmon/hmon_mdc_retr.pl b/hmon/hmon_mdc_retr.pl index 47cad36..28f0626 100755 --- a/hmon/hmon_mdc_retr.pl +++ b/hmon/hmon_mdc_retr.pl @@ -101,7 +101,7 @@ while (1) { Hmon::WriteFile("MDCRetransmission", $str[0][4]."

". #$str[1][0].$str[1][1]."

". - $str[1][2]."

".$str[1][3].$str[2][0]); + $str[1][2]."

".$str[1][3].$str[2][3]); sleep 1; diff --git a/hmon/hmon_mdc_tokenmiss.pl b/hmon/hmon_mdc_tokenmiss.pl index 52ce360..5b77694 100755 --- a/hmon/hmon_mdc_tokenmiss.pl +++ b/hmon/hmon_mdc_tokenmiss.pl @@ -67,7 +67,7 @@ while (1) { Hmon::WriteFile("MDCTokenMiss", $str[0][4]."

". #$str[1][0].$str[1][1]."

". - $str[1][2]."

".$str[1][3].$str[2][0]); + $str[1][2]."

".$str[1][3].$str[2][3]); my $qastate = QA::GetQAState('below', $sum, @QA::MdcTokenMissLimits); # QA::WriteQALog($fqa, "mdc", "oeps", 20, $qastate, diff --git a/hmon/hmon_mdc_voltage.pl b/hmon/hmon_mdc_voltage.pl index f31d36c..4d713ad 100755 --- a/hmon/hmon_mdc_voltage.pl +++ b/hmon/hmon_mdc_voltage.pl @@ -64,7 +64,34 @@ while (1) { $reg_address++; } } + + my $values = trb_register_read_mem(0xfe90,0xd488,0,4); + foreach my $b (sort keys %{$values}) { + my $value = $values->{$b}[0] / 16; + if ($value > 1550) { + my $boardstr = sprintf("%04x",$b); + $msg .= " $boardstr 1.1V high (".sprintf("%.2fV),",$value/1000.); + $high++; + } + if ($value < 1350) { + my $boardstr = sprintf("%04x",$b); + $msg .= " $boardstr 1.1V low (".sprintf("%.2fV),",$value/1000.); + $low++; + } + $value = $values->{$b}[2] / 16; + if ($value > 3750) { + my $boardstr = sprintf("%04x",$b); + $msg .= " $boardstr 3.3V high (".sprintf("%.2fV),",$value/1000.); + $high++; + } + if ($value < 3550) { + my $boardstr = sprintf("%04x",$b); + $msg .= " $boardstr 3.3V low (".sprintf("%.2fV),",$value/1000.); + $low++; + } + } + $status = $high + $low . " warnings"; my $qastate = QA::GetQAState('below', $high + $low, @QA::MdcVoltageLimits); QA::WriteQALog($fqa, "mdc", "voltage", 30, $qastate,"Voltages", $status,$msg); diff --git a/hmon/hmon_mdcnew_endpoints.pl b/hmon/hmon_mdcnew_endpoints.pl index 68cd0fe..773cd7b 100755 --- a/hmon/hmon_mdcnew_endpoints.pl +++ b/hmon/hmon_mdcnew_endpoints.pl @@ -128,8 +128,10 @@ my $value = "OK ".(scalar @mdc_boards - scalar @QA::mdc_new_boards_removed); my $longtext = ""; $longtext .= "Missing boards: $missinglist
" if $missing_number; + $longtext .= "$removedboards removed
" if $removedboards; -Hmon::Speak('mdcmissonce',"$missing_number new M-D-C Frontends missing") if($qastate > 60 ); +Hmon::Speak('mdcmissonce',"$missing_number new M-D-C Frontends missing") if($qastate > 60 && $qastate < QA::ERROR ); +Hmon::Speak('mdcmiss',"$missing_number new M-D-C Frontends missing") if($qastate >= QA::ERROR ); QA::WriteQALog($flog,"endp","mdc12",10,$qastate,"MDC 1/2",$value,$longtext); diff --git a/hmon/hmon_startrate.pl b/hmon/hmon_startrate.pl index f365764..208e0a4 100755 --- a/hmon/hmon_startrate.pl +++ b/hmon/hmon_startrate.pl @@ -86,10 +86,36 @@ my $plot5 = { set obj 2 rect from -1, 10E7 to 2000, 100E7 fc rgb '#ffdddd' behind " }; - - HPlot::PlotInit($plot5); +my $plot5_online = { + name => "StartRateX_histbar_online", + file => "files/StartRateX_histbar_online", + entries => 600, + type => HPlot::TYPE_BARGRAPH, + output => HPlot::OUT_PNG, + titles => ["0","1","2","3","4","5","6","7","8","9","10","11"], + xlabel => "Time / 100 ms", + ylabel => "Hitrate / Hz", + sizex => 800, + sizey => 500, + xmin => 0, + xmax => 600, + ymin => "0", + ymax => "5E5<*", + curves => 12, + nokey => 1, + xscale => 10, # xscale does not work with TYPE_BARGRAPH + buffer => 1, + stacked => 1, + curvewidth => .9, + additional => " + set obj 1 rect from -1, 7E7 to 2000, 10E7 fc rgb '#ffffbb' behind \n + set obj 2 rect from -1, 10E7 to 2000, 100E7 fc rgb '#ffdddd' behind + " + }; +HPlot::PlotInit($plot5_online); + # my $plot6 = { # name => "StartRateX_1histbar_VW", # file => "files/StartRateX_1histbar_VW", @@ -490,6 +516,11 @@ $str .= qq@

\n@; +$str .= Hmon::MakeFooter(); +Hmon::WriteFile("StartRateX_histbar_online",$str); + $str = Hmon::MakeTitle(12, 7, "Start Summed Rates Y",0); $str .= qq@
\n@; $str .= Hmon::MakeFooter(); @@ -777,6 +808,7 @@ while(1) { for my $i (0..11){ HPlot::PlotAdd("StartRateX_histbar",$summedRatesFor4Channels_X0[$i],$i); HPlot::PlotAdd("StartRateY_histbar",$summedRatesFor4Channels_Y0[$i],$i); + HPlot::PlotAdd("StartRateX_histbar_online",$summedRatesFor4Channels_X0[$i],$i); HPlot::PlotAdd("StartRateX_histbar_short",$summedRatesFor4Channels_X0[$i],$i); HPlot::PlotAdd("StartRateY_histbar_short",$summedRatesFor4Channels_Y0[$i],$i); @@ -1015,6 +1047,7 @@ while(1) { HPlot::PlotDrawFork('StartPositionRMS') if ($iter == 3); HPlot::PlotDrawFork('StartRateX_histbar') if ($iter == 4); + HPlot::PlotDrawFork('StartRateX_histbar_online') if ($iter == 4); # HPlot::PlotDrawFork('StartRateX_1histbar_VW') if ($iter == 5); HPlot::PlotDrawFork('StartRateY_histbar') if ($iter == 6); HPlot::PlotDrawFork('StartRateY_histbar_short') if ($iter == 7); diff --git a/hmon/hmon_tofrate.pl b/hmon/hmon_tofrate.pl index 188390f..f295c51 100755 --- a/hmon/hmon_tofrate.pl +++ b/hmon/hmon_tofrate.pl @@ -92,7 +92,7 @@ while(1) { $lowrate++ if ($diff->{$b}->[$v] < $lowratelimit); } } - HPlot::PlotDraw('TofRate'); + HPlot::PlotDrawFork('TofRate'); } # print $highrate." ".$lowrate."\n"; @@ -114,5 +114,5 @@ while(1) { $old = $o; $oldtime = time(); - sleep 2; + sleep 1; } diff --git a/hmon/index.cgi b/hmon/index.cgi index 6701949..c33e415 100755 --- a/hmon/index.cgi +++ b/hmon/index.cgi @@ -35,7 +35,7 @@ function openwin(url) {

  • Web Tools (daqtools)
  • Eventbuilder Monitor
  • Raw Data Monitor
  • -
  • Accumulated Run Statistics +
  • Accumulated Run Statistics