$entries->{'main'} = ['time', 'rate','beamabort','up','spillcount'];
$entries->{'daq'} = ['trbnet', 'timeouts', 'busy','readout','outofsync'];
$entries->{'trg'} = ['spill', 'accepted', 'source','pt1rate', 'start'];
-$entries->{'rate'} = ['pt1','pt2','pt3','hic sunt','pt8'];
-$entries->{'server'} = ['fill', 'cpu', 'ip', 'dracones', 'onlineqa']; #icinga, pwrsup
+$entries->{'rate'} = ['pt1','pt2','pt3','','pt8'];
+$entries->{'server'} = ['fill', 'cpu', 'ip', 'ebinputs', 'onlineqa']; #icinga, pwrsup
$entries->{'eb'} = ['run', 'rate','bytes', 'lostevt', 'errbits'];
$entries->{'mdc'} = ['token', 'blocked', 'temp', 'linkqual', 'voltage'];
$entries->{'endp'} = ['mdc','rich', 'tof', 'rpc', 'other'];
#$entries->{'hv2'} = ['mdchv','stshv','frpchv','itofhv','valve'];
$entries->{'hv2'} = ['mdchv','','','','sequencer'];
$entries->{'misc'} = ['seu','calib','magnet','env','valve'];
-$entries->{'misc2'} = ['ecal','tdctot','m1','m2','m3'];
+$entries->{'misc2'} = ['ecal','tdctot','','',''];
$entries->{'pion'} = ['nxstatus', 'HV', 'HVcurr', 'cooling','seu'];
our @TimeoutLimits = (0, 0, 1);
our @TimeoutLimitsOnlyRICHMDC = (1, 5, 10);
our @LinkErrLimits = (50, 500, 1000);
-our @MdcEndpMissingLimits = (0, 5, 8); #!!! Oh dear.
+our @MdcEndpMissingLimits = (4, 5, 6); #(0, 4, 5)!!! Oh dear.
our @RichEndpMissingLimits = (0, 3, 4);
our @TofEndpMissingLimits = (0, 0, 0);
our @RpcEndpMissingLimits = (0, 0, 0);
#our @MdcNominalHV = (1750,1770,1900,2150);
#individual HV each chamber
#Original our $MdcNominalHV = [[1750,1750,1750,1750,1750,1750],[1770,1790,1750,1770,1770,1770],[1900,1900,1900,1900,1900,1900],[2150,2150,2150,2150,2150,2150]];
-# Modification of 8.Feb2022 P2S3 supplied by different HV channels, so taken out here:
-our $MdcNominalHV = [[1750,1750,1750,1750,1750,1750],[1770,1790,0,1770,1770,1770],[1900,1900,1900,1900,1900,1900],[2150,2150,2150,2150,2150,2150]];
+# 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 @RpcHvLimits = (12,12,12);
our @ItofHvLimits = (29,28,0);
our @TdcCalibrationInterval = (3200000,4500000,6000000);
-our @TdcCalibrationTemperature = (5,7,10);
+our @TdcCalibrationTemperature = (4,5,7);
our @PionLvCurrLimits = (4,5,6);
# Missing Boards
###############################################################################
-our @mdc_boards_removed =();#(0x2203, 0x2027, 0x2057); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23
+our @mdc_boards_removed =(0x2203);#(0x2203, 0x2027, 0x2057); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23
our @mdc_chambers_removed =();
our @rich_boards_removed =();#(0x71a4,0x71a5,0x71b4,0x71b5,0x72a4,0x72a5,0x72b4,0x72b5,0x73a4,0x73a5,0x73b4,0x73b5,0x826a);
our @tof_boards_removed =();
<p>
This button shows the status of the Magnet system.
</p>
-<h4>Error Handling in case it is not <font color="gree">Green</font> for > 2 min.</h4>
-<p>The script might show red precisely at midnight due to change of logfiles. Don't worry in this case.
+<p>In case of an error wait for the next update after ~ 30 seconds. Especially if a value reads back with a value of 0 it's likely not an error on the magnet but with getting the information from EPICS.
+<h4>Error Handling in case it is not <font color="gree">Green</font> for > 2 min.</h4>
<p>Call <b>Torsten Heinz</b> (mobile: 0175 388 4066 or home: 06162 982292 or work: 1818<br>
-<p>If no ssh connection to the magnet PC is possible (hadesp28), check if the machine is still running (upstairs, next to cryo)
+
--- /dev/null
+<h3>Eventbuilder data input state</h3>
+<p>
+This tile shows the state of the eventbuiler inputs that receive data from the trbnet hubs.
+</p>
+
+
+<h4>Error Handling</h4>
+<dl>
+
+<dt> A "LowData" warning (orange) can appear if the data rate is low (cosmics data).</dt>
+<dd> Depending on the intended trigger set up, this might be ignored. </dd>
+
+<dt>"All inputs get no data!" error: </dt>
+<dd>Check if DAQ is stalled, trigger is disabled, or accelerator is off. </dd>
+
+<dt>"partially missing data" error: </dt>
+<dd>
+Check if the IP of any hub is missing (see TrbIP field). Consider the "Fix missing IP" procecedure.
+You may also have a look at the eventbuilder expert GUI (BNET master) to find out in detail which hub does not send any data </dd>
+
+
+
+
+<dt>"Server mismatch" error: restart event builders</dt>
+<dd>This may happen if one of the eventbuilder server nodes has failed completely. Use "Restart EB" button in operator GUI. If this should not help, do first "Stop EB" and then "Restart EB." Finally you may also try "Restart BNET control." (with "Restart Hmon" required afterwards) </dd>
+</dl>
my ($src, $name) = @_;
my $baseurl = "invalid";
- if($src eq 'rawmon') {$baseurl = 'http://lxhadeb12:8090';}
- if($src eq 'ebmon') {$baseurl = 'http://lxhadeb12:8090';}
- if($src eq 'eb') {$baseurl = 'http://lxhadeb07:8099';}
+ if($src eq 'rawmon') {$baseurl = 'http://lxhadeb12:8090';}
+ if($src eq 'ebmon') {$baseurl = 'http://lxhadeb12:8090';}
+ if($src eq 'eb') {$baseurl = 'http://lxhadeb07:8099';}
if($src eq 'calib') {$baseurl = 'http://hadesp66:8092';}
if($src eq 'calibtest') {$baseurl = 'http://hadesp63:8097';}
+ if($src eq 'qa') {$baseurl = 'http://hadesp67:8888';}
my $channel = [7,7,7,6,6]; #SPI interface number
#1:4V, 2:2V, 3:1V
-my $resolution = [[2,1,2,1], [2,2,2,1], [2,2,2,4], [2,2,2,2], [3,3,2,2]];
-my $multiplier= [[1,1,0.5,2],[1,1,0.5,0],[1,1,0.5,3.125],[1,1,0.5,0.5], [2.5,1.25,1,0.5]];
+my $resolution = [[2,1,2,1], [2,2,2,1], [2,2,2,4], [2,2,2,2], [2,3,2,2]];
+my $multiplier= [[1,1,0.5,2],[1,1,0.5,0],[1,1,0.5,3.125],[1,1,0.5,0.5], [5,1.25,1,0.5]];
my $modedesc = [ 'Trb3sc', 'DiRich', 'Concentrator', 'Power-Voltages','Power-Currents'];
-
+my $fudgefactor = 0.78; #Apparently the current is measured incorrectly. This fudge-factor should approximately fix that
HPlot::PlotInit({
name => "DiRichVolt",
if($i) {
foreach my $t (keys %$s) {
$return->[$i-1]{$t} = ($s->{$t}>>19&0xfff)*$multiplier->[$mode][$i-1];
+ $return->[$i-1]{$t} *= $fudgefactor if $mode == 4;
}
}
usleep(5000);
my $dirich1V;
my $dirich2V5;
my $dirich1V2;
+ my $dirich3V3;
+ my $dirich1VCurr;
+ my $dirich2V5Curr;
+ my $dirich1V2Curr;
+ my $dirich3V3Curr;
foreach my $m (sort keys %{$ret->[1][0]}) {
HPlot::PlotAdd('DiRichVolt',$ret->[1][0]{$m}-3300,0);
my $sm = sprintf("0x%04x",$m);
$dirich1V->{$sm} = $ret->[1][2]{$m};
$dirich2V5->{$sm} = $ret->[1][1]{$m};
+ $dirich3V3->{$sm} = $ret->[1][0]{$m};
}
foreach my $m (sort keys %{$ret->[2][0]}) {
HPlot::PlotAdd('DiRichVolt',$ret->[2][0]{$m}-3300,0);
HPlot::PlotAdd('DiRichVolt',$ret->[2][2]{$m}-1260,2);
my $sm = sprintf("0x%04x",$m);
$dirich1V2->{$sm} = $ret->[2][2]{$m};
+ $dirich2V5->{$sm} = $ret->[2][1]{$m};
+ $dirich3V3->{$sm} = $ret->[2][0]{$m};
}
HPlot::PlotLimitEntries('DiRichVolt',(scalar keys %{$ret->[1][0]}) + (scalar keys %{$ret->[2][0]}));
HPlot::PlotDraw('DiRichVolt');
HPlot::PlotAdd('PowerCurr',$ret->[4][2]{$m},1);
HPlot::PlotAdd('PowerCurr',$ret->[4][1]{$m},2);
HPlot::PlotAdd('PowerCurr',$ret->[4][0]{$m},3);
- }
+ my $sm = sprintf("0x%04x",$m);
+ $dirich1VCurr->{$sm} = $ret->[4][0]{$m};
+ $dirich2V5Curr->{$sm} = $ret->[4][2]{$m};
+ $dirich1V2Curr->{$sm} = $ret->[4][1]{$m};
+ $dirich3V3Curr->{$sm} = $ret->[4][3]{$m};
+ }
HPlot::PlotLimitEntries('PowerCurr',(scalar keys %{$ret->[4][0]}));
HPlot::PlotDraw('PowerCurr');
my $value = '';
my $status = QA::OK;
- if($min[0]<3270 || $min[1]<2260 || $min[2]<1260 || $min[3]<1160) {$status = QA::WARN}
- if($min[10]<3330 || $min[11]<2260 || $min[12]<1260 || $min[13]<1160) {$status = QA::WARN}
+ 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}
# QA::WriteQALog($fqa,"rich","volt",30,$status,'Voltages',$value,$longtext);
print $fh encode_json($dirich1V);
close $fh;
- $dirich2V5->{min} = 2560;
+ $dirich2V5->{min} = 2500;
$dirich2V5->{max} = 2750;
$dirich2V5->{symbol} = 'mV';
$dirich2V5->{title} = 'RICH 2.5V';
print $fh encode_json($dirich2V5);
close $fh;
- $dirich1V2->{min} = 1280;
+ $dirich1V2->{min} = 1250;
$dirich1V2->{max} = 1400;
$dirich1V2->{symbol} = 'mV';
$dirich1V2->{title} = 'RICH 1.2V';
open($fh, ">", Hmon::HMONDIR."/files/rich1V2.json");
print $fh encode_json($dirich1V2);
close $fh;
+
+ $dirich3V3->{min} = 3270;
+ $dirich3V3->{max} = 3500;
+ $dirich3V3->{symbol} = 'mV';
+ $dirich3V3->{title} = 'RICH 3.3V';
+
+ $dirich3V3->{updatetime} = $updatetime;
+
+ open($fh, ">", Hmon::HMONDIR."/files/rich3V3.json");
+ print $fh encode_json($dirich3V3);
+ close $fh;
+
+ $dirich1VCurr->{min} = 9000;
+ $dirich1VCurr->{max} = 11000;
+ $dirich1VCurr->{symbol} = 'mA';
+ $dirich1VCurr->{title} = 'RICH 1.1V Curr';
+ $dirich1VCurr->{updatetime} = $updatetime;
+
+ open($fh, ">", Hmon::HMONDIR."/files/rich1VCurr.json");
+ print $fh encode_json($dirich1VCurr);
+ close $fh;
-
+ $dirich2V5Curr->{min} = 2000;
+ $dirich2V5Curr->{max} = 5000;
+ $dirich2V5Curr->{symbol} = 'mA';
+ $dirich2V5Curr->{title} = 'RICH 2.5V Curr';
+
+ $dirich2V5Curr->{updatetime} = $updatetime;
+
+ open($fh, ">", Hmon::HMONDIR."/files/rich2V5Curr.json");
+ print $fh encode_json($dirich2V5Curr);
+ close $fh;
+
+ $dirich1V2Curr->{min} = 2000;
+ $dirich1V2Curr->{max} = 5000;
+ $dirich1V2Curr->{symbol} = 'mA';
+ $dirich1V2Curr->{title} = 'RICH 1.2V Curr';
+
+ $dirich1V2Curr->{updatetime} = $updatetime;
+
+ open($fh, ">", Hmon::HMONDIR."/files/rich1V2Curr.json");
+ print $fh encode_json($dirich1V2Curr);
+ close $fh;
+
+ $dirich3V3Curr->{min} = 800;
+ $dirich3V3Curr->{max} = 1200;
+ $dirich3V3Curr->{symbol} = 'mA';
+ $dirich3V3Curr->{title} = 'RICH 3.3V Curr';
+
+ $dirich3V3Curr->{updatetime} = $updatetime;
+
+ open($fh, ">", Hmon::HMONDIR."/files/rich3V3Curr.json");
+ print $fh encode_json($dirich3V3Curr);
+ close $fh;
sleep 5;
}
use LWP::Simple;
use JSON qw( decode_json );
use JSON::XS;
+use JSON::Parse qw(read_json);
use POSIX qw/floor ceil strftime/;
use lib '.';
use getebjson;
my $export;
my $store;
my $newstore;
+
my $storefile = '/dev/shm/hmon_calibrationinformation.store';
if (-e $storefile) {
$store = lock_retrieve($storefile);
}
+
+ my $voltagefile = '/dev/shm/hmon/rich1V.json';
+ my $voltages = read_json ($voltagefile);
+
+
# print Dumper $store;
my ($min,$max) = (0,0);
+ my ($minvdiff,$maxvdiff) = (10000,0);
my ($minboard,$maxboard) = (0,0);
+ my ($maxvdiffboard,$minvdiffboard) = (0,0);
# print "Read\n";
my $temp = trb_register_read(0xffff,0);
}
}
}
+ if(($b&0xF000) == 0x7000) {
+ my $bhex = sprintf("0x%04x",$b);
+ if($voltages->{$bhex}) {
+ my $diff = $voltages->{$bhex} - $store->{voltages}{$bhex};
+ if (($voltages->{$bhex} < 1150 || $store->{voltages}{$bhex} < 1150) && abs($diff) > 20) { #Critical voltages
+ if ($maxvdiff < $diff) { $maxvdiffboard = $b;}
+ if ($minvdiff > $diff) { $minvdiffboard = $b;}
+ $maxvdiff = max($maxvdiff,$diff);
+ $minvdiff = min($minvdiff,$diff);
+ }
+ }
+ }
}
-
+
if(!$store->{boards} || $data->{LastCalibr}{'time'} != $store->{LastCalibr}) {
+ $newstore->{voltages} = $voltages;
$newstore->{LastCalibr} = $data->{LastCalibr}{'time'};
lock_store($newstore,$storefile);
# print "Writing\n";
$export->{mintemp} = $min;
$export->{maxtemp} = $max;
+ $export->{minvdiff} = $minvdiff;
+ $export->{maxvdiff} = $maxvdiff;
$export->{LastCalibr} = $data->{LastCalibr}{'time'};
$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}{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
$export->{nocalib} = [];
my $txt = strftime("%d.%m. %H:%M",localtime($data->{LastCalibr}{'time'}));
my $longtext = "Last Calibration was done at $txt <br/>";
$longtext .= sprintf("Temperature changed in the interval of %.1f (%04x) to %.1f (%04x) degrees.<br/>",$min,$minboard,$max,$maxboard);
- my $status = max($export->{status}{time},$export->{status}{temp});
+ if($minvdiffboard) {
+ $longtext .= sprintf("Voltage changed by %.1f (%04x) mV.<br/>",$minvdiff,$minvdiffboard);
+ }
+ if($maxvdiffboard) {
+ $longtext .= sprintf("Voltage changed by %.1f (%04x) mV.<br/>",$maxvdiff,$maxvdiffboard);
+ }
+ my $status = max($export->{status}{time},$export->{status}{temp},$export->{status}{volt});
if($export->{quality} && $export->{quality} < 0.9) {
$longtext .= "Quality reported by EB is below 0.9";
Hmon::WriteFile("ECalRate",$str);
-my $str = Hmon::MakeTitle(6, 9, "ECal Hit Rate",0);
+$str = Hmon::MakeTitle(6, 9, "ECal Hit Rate",0);
$str .= qq@<img src="%ADDPNG files/EcalRate.png%" type="image/png"><br>\n@;
$str .= Hmon::MakeFooter();
$inspill = $o->{0x10} >> 31;
} while($inspill);
- trb_register_write(0xfe61,0xc802,0);
- trb_register_write(0xfe61,0xc803,0);
- trb_register_write(0xfe61,0xc802,0xffffffff);
- trb_register_write(0xfe61,0xc803,0x0000ffff);
+ trb_register_write(0xfe71,0xc802,0);
+ trb_register_write(0xfe71,0xc803,0);
+ trb_register_write(0xfe71,0xc802,0xffffffff);
+ trb_register_write(0xfe71,0xc803,0x0000ffff);
sleep(5);
}
my @mdcboards = (@sorted_mdc_results,@QA::mdc_boards_removed);
chop(@mdcboards);
my @uniqchambers = uniq @mdcboards;
- my $samechamberboards = 0;
- if(scalar @mdcboards != scalar @uniqchambers) {$samechamberboards = 1;}
+ my $samechamberboards = (scalar @mdcboards) - (scalar @uniqchambers);
+ # if(scalar @mdcboards != scalar @uniqchambers) {$samechamberboards = 1;}
#Are two boards from the same sector missing?
- chop(@mdcboards);
- @uniqchambers = uniq @mdcboards;
- my $samesectorboards = 0;
- if(scalar @mdcboards != scalar @uniqchambers) {$samesectorboards = 1;}
+ my @mdcboardssec = chop(@mdcboards);
+ my @uniqchamberssec = uniq @mdcboardssec;
+ my $samesectorboards = (scalar @mdcboardssec) - (scalar @uniqchamberssec);
+ # if(scalar @mdcboards != scalar @uniqchambers) {$samesectorboards = 1;}
print $fh "$num_mdc_missing\n";
$fh->autoflush(1);
my $qastate = QA::GetQAState('below',$num_mdc_missing,@QA::MdcEndpMissingLimits);
$qastate = max($qastate,QA::ERROR) if $samechamberboards;
- $qastate = min(QA::WARN,$qastate) if !$samesectorboards;
- $qastate = max($qastate,QA::NOTE) if $mdcmissingtime > 600;
+ $qastate = max($qastate,QA::WARN) if $samesectorboards;
+ $qastate = max($qastate,QA::ERROR) if $samesectorboards > 2;
+ $qastate = max($qastate,QA::WARN) if $mdcmissingtime > 600;
+ $qastate = max($qastate,QA::NOTE) if $num_mdc_missing >= 1;
$longtext .= "<br>Few boards missing, but for a long time. Better do a restart." if $mdcmissingtime > 360;
--- /dev/null
+#!/usr/bin/perl
+
+use warnings;
+use POSIX qw(strftime floor ceil);
+use FileHandle;
+use lib "./code";
+use lib "../daqtools/tools";
+use HADES::TrbNet;
+use Time::HiRes qw(usleep);
+use Dmon;
+use Hmon;
+use HPlot;
+use QA;
+use getebjson;
+use getrootjson;
+use JSON::XS;
+use Data::Dumper;
+use List::Util qw(min max sum);
+use LWP::Simple qw(get);
+use Try::Tiny;
+
+# trb_init_ports() or die trb_strerror();
+my $fqa = QA::OpenQAFile();
+
+
+my @hubnames = (
+'trb3sc317', 'trb3sc319', 'trb3sc320', 'trb3sc315', 'trb3sc318', 'trb3sc316', #ECal
+'trb3sc134', 'trb3sc009', 'trb3sc130', 'trb3sc128', 'trb3sc131', 'trb3sc129', #RPC
+'trb3sc438', #Start
+'trb3sc136', 'trb3sc158', 'trb3sc144', 'trb3sc139', 'trb3sc163', 'trb3sc153', 'trb3sc164', 'trb3sc166', 'trb3sc137', 'trb3sc138', 'trb3sc162', 'trb3sc141', #RICH
+'trbp088', 'trbp263', 'trbp006', 'trbp262', 'trbp265', 'trbp242', 'trbp074', 'trbp267', 'trbp266', #TOF, FW
+);
+
+while(1) {
+
+ my $counter = 0;
+ my $errorcnt = 0;
+ my $longstatus = 0;
+ my $qastate = QA::OK;
+
+ for my $b (@hubnames) {
+ $counter++;
+# print $b."\n";
+ my $cmd = "ping $b -c 1 -w 1 >/dev/null 2>&1";
+ my $i=2;
+ my $err = 0;
+ while($i--) {
+ qx($cmd);
+ $err = $?;
+ last unless $err;
+ sleep 1;
+ }
+ if($err) {
+ $errorcnt++;
+ $longstatus .= "Hub $b not reached<br>";
+# print $longstatus."\n";
+ $qastate = QA::ERROR;
+ }
+ }
+
+ my $shortstatus = "OK $counter";
+ $shortstatus = " $errorcnt / $counter" if $qastate == QA::ERROR;
+ QA::WriteQALog($fqa, "server", "ip", 60, $qastate, "Trb IP",
+ $shortstatus, $longstatus);
+ sleep 20;
+ }
$feeerrcnt = "" if $feeerrcnt == 0;
$qastate = QA::ERROR if ($feeerrinmdc >= 4 || $feeerrinrich);
Hmon::Speak("feeerr","Rich front-end error") if $feeerrinrich;
- Hmon::Speak("feeerr","MDC front-end error") if $feeerrinmdc >= 4;
+ Hmon::Speak("feeerr","M-D-C front-end error") if $feeerrinmdc >= 4;
QA::WriteQALog($fqa, "feeerr", "feeerr" , 30, $qastate, "FEE Error", "$feeerrcnt",
"Boards with an Front-end Error: $feeerrlist");
my $fqa = QA::OpenQAFile();
trb_init_ports() or die trb_strerror();
-
while(1){
my $msg = "";
my $msg2 = "";
#send local reset
my @port = `trbcmd nettrace $b | tail -n1`;
my ($c,$p) = $port[0] =~ /0x(\w{4})\s+0x(\w{8})/;
- printf("Sending local reset signal %04x %08x\n",hex($c),1 << hex($p));
+ my $str = sprintf("Sent local reset signal %04x %08x\n",hex($c),1 << hex($p));
+ print($str);
+ system("logger -p local1.info -t DAQ 'Hmon <I> Autorestart DiRICH $b -> $str'");
trb_register_write(hex($c),0xc6,1 << hex($p));
system("ssh -X lxhadesdaqp 'cd /home/hadaq/trbsoft/daq/main/;./startup.pl -f ../rich/startup.script -c 0 -eb off'");
#Starting trigger
my $MAKE_MAGNET_LOG = 0;
+my $temp2d = {
+ name => "RichInnerTemp",
+ file => "files/RichInnerTemp",
+ title => "RICH RichInnerTemp",
+ entries => 8,
+ curves => 9,
+ type => HPlot::TYPE_HEATMAP,
+ output => HPlot::OUT_PNG,
+ zlabel => "°C",
+ sizex => 500,
+ sizey => 400,
+ nokey => 1,
+ buffer => 1,
+ xmin => -0.5,
+ xmax => 7.5,
+ xlabel => "x",#"RICH Arm number",
+ ylabel => "y",#"Sensor Number on Board",
+ ymin => -0.5,
+ ymax => 8.5,
+ cbmax => "15<*<35",
+ cbmin => 0.0,
+ cblabel => "Temperature [°C]",
+ noinit => 1,
+ additional => "",
+ showvalues => 1,
+};
+HPlot::PlotInit($temp2d);
-my $plot1 = {
-name => "RichMagnet",
-file => "files/RichMagnet",
-title => "RICH MagnetSensors",
-entries => 8,
-curves => 9,
-type => HPlot::TYPE_HEATMAP,
-output => HPlot::OUT_PNG,
-zlabel => "B [uT]",
-sizex => 500,
-sizey => 400,
-nokey => 1,
-buffer => 1,
-xmin => -0.5,
-xmax => 7.5,
-xlabel => "x",#"RICH Arm number",
-ylabel => "y",#"Sensor Number on Board",
-ymin => -0.5,
-ymax => 8.5,
-cbmax => "100<*<1E5",
-cbmin => 0.0,
-cblabel => "B [uT]",
-noinit => 1,
-additional => "",
-showvalues => 1, };
-HPlot::PlotInit($plot1);
-
-
-my @colors = ("#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd");
-
-my $plot = {
+my $tempshort = {
name => "RichInnerTempHist",
file => "files/RichInnerTempHist",
entries => 1200,
type => HPlot::TYPE_HISTORY,
output => HPlot::OUT_PNG,
-# titles => ["M_0_0","M_0_1","M_0_2","M_0_3","M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
+ # titles => ["M_0_0","M_0_1","M_0_2","M_0_3","M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
titles => ["M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
- #titles => ['min','max','mean'],
xlabel => "Minutes",
ylabel => "Temperature [°C]",
sizex => 950,
sizey => 300,
- #ymin => "*<15",
- #ymax => "40<*",
-# curves => 24,
+ # ymin => "*<15",
+ # ymax => "40<*",
+ # curves => 24,
curves => 20,
xscale => 6,
storable=> 1,
buffer => 1,
-# colors => ["#333333","#00ff00","#ff0000","#0022ff","#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
+ # colors => ["#333333","#00ff00","#ff0000","#0022ff","#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
colors => ["#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
additional => "set offsets 0,0,1.5,1.5"
-# colors => ["#333333","#00ff00","#ff0000"]
};
-HPlot::PlotInit($plot);
-
-my $plot2 = {
-name => "RichInnerTemp",
-file => "files/RichInnerTemp",
-title => "RICH RichInnerTemp",
-entries => 8,
-curves => 9,
-type => HPlot::TYPE_HEATMAP,
-output => HPlot::OUT_PNG,
-zlabel => "°C",
-sizex => 500,
-sizey => 400,
-nokey => 1,
-buffer => 1,
-xmin => -0.5,
-xmax => 7.5,
-xlabel => "x",#"RICH Arm number",
-ylabel => "y",#"Sensor Number on Board",
-ymin => -0.5,
-ymax => 8.5,
-cbmax => "15<*<35",
-cbmin => 0.0,
-cblabel => "Temperature [°C]",
-noinit => 1,
-additional => "",
-showvalues => 1, };
-HPlot::PlotInit($plot2);
+HPlot::PlotInit($tempshort);
-my $plot3 = {
+my $templong = {
name => "RichInnerTempHistLong",
file => "files/RichInnerTempHistLong",
entries => 1200,
type => HPlot::TYPE_HISTORY,
output => HPlot::OUT_PNG,
-# titles => ["M_0_0","M_0_1","M_0_2","M_0_3","M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
+ # titles => ["M_0_0","M_0_1","M_0_2","M_0_3","M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
titles => ["M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
- #titles => ['min','max','mean'],
xlabel => "Hours",
ylabel => "Temperature [°C]",
sizex => 950,
sizey => 300,
- #ymin => "*<15",
- #ymax => "40<*",
-# curves => 24,
+ # ymin => "*<15",
+ # ymax => "40<*",
+ # curves => 24,
curves => 20,
xscale => 60,
storable=> 1,
buffer => 1,
-# colors => ["#333333","#00ff00","#ff0000","#0022ff","#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
+ # colors => ["#333333","#00ff00","#ff0000","#0022ff","#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
colors => ["#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
additional => "set offsets 0,0,1.5,1.5"
-# colors => ["#333333","#00ff00","#ff0000"]
- };
-HPlot::PlotInit($plot3);
+ };
+HPlot::PlotInit($templong);
-my $plot4 = {
- name => "RichMagnetHistLong",
- file => "files/RichMagnetHistLong",
+my $magnet2d = {
+ name => "RichMagnet",
+ file => "files/RichMagnet",
+ title => "RICH MagnetSensors",
+ entries => 8,
+ curves => 9,
+ type => HPlot::TYPE_HEATMAP,
+ output => HPlot::OUT_PNG,
+ zlabel => "B [uT]",
+ sizex => 500,
+ sizey => 400,
+ nokey => 1,
+ buffer => 1,
+ xmin => -0.5,
+ xmax => 7.5,
+ xlabel => "x",#"RICH Arm number",
+ ylabel => "y",#"Sensor Number on Board",
+ ymin => -0.5,
+ ymax => 8.5,
+ cbmax => "100<*<1E5",
+ cbmin => 0.0,
+ cblabel => "B [uT]",
+ noinit => 1,
+ additional => "",
+ showvalues => 1,
+};
+HPlot::PlotInit($magnet2d);
+
+my $magnetshort = {
+ name => "RichMagnetHist",
+ file => "files/RichMagnetHist",
entries => 1200,
type => HPlot::TYPE_HISTORY,
output => HPlot::OUT_PNG,
-# titles => ["M_0_0","M_0_1","M_0_2","M_0_3","M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
+ # titles => ["M_0_0","M_0_1","M_0_2","M_0_3","M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
titles => ["M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
- #titles => ['min','max','mean'],
- xlabel => "Hours",
+ xlabel => "Minutes",
ylabel => "B [uT]",
sizex => 950,
sizey => 300,
- #ymin => "*<15",
- #ymax => "40<*",
-# curves => 24,
+ # ymin => "*<15",
+ # ymax => "40<*",
+ # curves => 24,
curves => 20,
- xscale => 60,
+ xscale => 6,
storable=> 1,
buffer => 1,
-# colors => ["#333333","#00ff00","#ff0000","#0022ff","#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
+ # colors => ["#333333","#00ff00","#ff0000","#0022ff","#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
colors => ["#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
additional => "set offsets 0,0,1.5,1.5"
-# colors => ["#333333","#00ff00","#ff0000"]
};
-HPlot::PlotInit($plot4);
+HPlot::PlotInit($magnetshort);
-
-my $plot5 = {
- name => "RichMagnetHist",
- file => "files/RichMagnetHist",
+my $magnetlong = {
+ name => "RichMagnetHistLong",
+ file => "files/RichMagnetHistLong",
entries => 1200,
type => HPlot::TYPE_HISTORY,
output => HPlot::OUT_PNG,
-# titles => ["M_0_0","M_0_1","M_0_2","M_0_3","M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
+ # titles => ["M_0_0","M_0_1","M_0_2","M_0_3","M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
titles => ["M_1_0","M_1_1","M_1_2","M_1_3","M_2_0","M_2_1","M_2_2","M_2_3","M_3_0","M_3_1","M_3_2","M_3_3","M_4_0","M_4_1","M_4_2","M_4_3","M_5_0","M_5_1","M_5_2","M_5_3"],
- #titles => ['min','max','mean'],
- xlabel => "Minutes",
+ xlabel => "Hours",
ylabel => "B [uT]",
sizex => 950,
sizey => 300,
- #ymin => "*<15",
- #ymax => "40<*",
-# curves => 24,
+ # ymin => "*<15",
+ # ymax => "40<*",
+ # curves => 24,
curves => 20,
- xscale => 6,
+ xscale => 60,
storable=> 1,
buffer => 1,
-# colors => ["#333333","#00ff00","#ff0000","#0022ff","#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
+ # colors => ["#333333","#00ff00","#ff0000","#0022ff","#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
colors => ["#9a176d","#b844b8","#555555","#22ff22","#ffaaaa","#2222ff","#2d9c94","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df","#777777","#55ff77","#ff7755","#7575ff","#aadd47","#aa0033","#316022","#09b9df"],
additional => "set offsets 0,0,1.5,1.5"
-# colors => ["#333333","#00ff00","#ff0000"]
};
-HPlot::PlotInit($plot5);
+HPlot::PlotInit($magnetlong);
my $str = Hmon::MakeTitle(12, 21, "RICH Magnet",0);
my $sensT = int(($count % 16) / 4);
my $boardT = int($count / 16);
if (($magActive->{0x0110}[$boardT] >> 8) == 0 ) {
- #print "$boardT $sensT $t\n";
+ # print "$boardT $sensT $t\n";
Val2Hist('RichInnerTemp',$t,$boardT,$sensT);
$data->{$boardT}{$sensT} = $t;
$mintemp = $t if $t < $mintemp;
$maxtemp = $t if $t > $maxtemp;
my $reg = 4*$boardT+$sensT;
- if ($cnt > 7) {$cnt =0;} else {$cnt++;}
+ # print("reg=$reg,t=$t,sensT=$sensT,boardT=$boardT\n");
if ($reg > 3) {
- if ($t != 0) {HPlot::PlotAdd('RichInnerTempHist',$t,$reg-4);}
+ HPlot::PlotAdd('RichInnerTempHist',$t,$reg-4);
+ # if ($t != 0) {HPlot::PlotAdd('RichInnerTempHist',$t,$reg-4);}
+ # print("reg=$reg,reg_=".($reg-4).",t=$t,sensT=$sensT,boardT=$boardT\n");
}
-# HPlot::PlotAdd('RichInnerTempHist',$t,$reg);
+ # HPlot::PlotAdd('RichInnerTempHist',$t,$reg);
$TempLong[$reg]+=$t;
$TempLongCnt[$reg]++;
$str_log .= sprintf("%3.2f\t",$t);
my $board = int($count / 16);
if (($magActive->{0x0110}[$board] >> 8) == 0 ) {
- #HPlot::PlotFill('RichMagnet',sqrt($val),$board,$sens);
+ # HPlot::PlotFill('RichMagnet',sqrt($val),$board,$sens);
Val2Hist('RichMagnet',sqrt($val),$board,$sens);
my $sensorID2Array = $board*4+$sens;
$MagnetLong[$sensorID2Array]+=sqrt($val);
$MagnetLongCnt[$sensorID2Array]++;
+ # print("sensorID2Array=$sensorID2Array,sqrtval=".sqrt($val).",sens=$sens,board=$board\n");
if ($sensorID2Array > 3){
- if ($val != 0) {HPlot::PlotAdd('RichMagnetHist',sqrt($val),$sensorID2Array-4);}
+ HPlot::PlotAdd('RichMagnetHist',sqrt($val),$sensorID2Array-4);
+ # if ($val != 0) {HPlot::PlotAdd('RichMagnetHist',sqrt($val),$sensorID2Array-4);}
+ # print("sensorID2Array=$sensorID2Array,sensorID2Array_=".($sensorID2Array-4).",sqrtval=".sqrt($val).",sens=$sens,board=$board\n");
}
}
}
}
#print Dumper \@calib;
HPlot::PlotDraw('RichMagnet');
- HPlot::PlotDraw('RichInnerTemp');
+ HPlot::PlotDraw('RichInnerTemp');
+ # print Dumper $tempshort;
HPlot::PlotDraw('RichInnerTempHist');
HPlot::PlotDraw('RichMagnetHist');
$MagnetLong[$i] = 0;
$MagnetLongCnt[$i] = 0;
}
+ # print Dumper $templong;
HPlot::PlotDraw('RichInnerTempHistLong');
HPlot::PlotDraw('RichMagnetHistLong');
$longcnt = 0;
$qashort, $qalong) unless $opt_debug>0;
}
my $spillcountstate = QA::OK;
- if ($countnochange > 30) {
+ if ($countnochange > 50) {
$spillcountstate = QA::WARN;
# my $prefix = get ($url_prefix);
# $prefix = "--" unless defined $prefix;
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
+ set obj 1 rect from -1, 5E6 to 400, 10E6 fc rgb '#ffffbb' behind \n
+ set obj 2 rect from -1, 1E7 to 400, 10E7 fc rgb '#ffdddd' behind
"
};
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
+ set obj 1 rect from -1, 5E6 to 400, 10E6 fc rgb '#ffffbb' behind \n
+ set obj 2 rect from -1, 1E7 to 400, 10E7 fc rgb '#ffdddd' behind
"
};
HPlot::PlotInit($plot7);
curvewidth => .9,
key => 0,
additional => "
- set obj 1 rect from -1, 7E7 to 400, 10E7 fc rgb '#ffffbb' behind \n
- set obj 2 rect from -1, 10E7 to 400, 100E7 fc rgb '#ffdddd' behind
+ set obj 1 rect from -1, 5E6 to 400, 10E6 fc rgb '#ffffbb' behind \n
+ set obj 2 rect from -1, 1E7 to 400, 10E7 fc rgb '#ffdddd' behind
"
};
HPlot::PlotInit($plot7a);
curvewidth => .9,
key => 0,
additional => "
- set obj 1 rect from -1, 7E7 to 400, 10E7 fc rgb '#ffffbb' behind \n
- set obj 2 rect from -1, 10E7 to 400, 100E7 fc rgb '#ffdddd' behind
+ set obj 1 rect from -1, 5E6 to 400, 10E6 fc rgb '#ffffbb' behind \n
+ set obj 2 rect from -1, 1E7 to 400, 10E7 fc rgb '#ffdddd' behind
"
};
HPlot::PlotInit($plot7b);
my $current_readout = trb_registertime_read_mem(0xfe58,0xc001,0,8); # or die trb_strerror() or sleep 5 and next;
+# my $current_readout = trb_registertime_read_mem(0xfe58,0xc001,0,8) or die trb_strerror() or sleep 5 and next;
if (defined $old) {
$summedRatesFor4Channels_Y0[$i]=0;
}
- for my $i(1..8){
- $summedRatesFor4Channels_X0[int(($i-1)) ]+= $hitRatesStartX_0[$i]; # TODO Bugcheck
- $summedRatesFor4Channels_X0[int(($i-1)) ]+= $hitRatesStartX_1[$i];
- $summedRatesFor4Channels_Y0[int(($i-1)) ]+= $hitRatesStartY_0[$i];
- $summedRatesFor4Channels_Y0[int(($i-1)) ]+= $hitRatesStartY_1[$i];
+ for my $i(1..16){
+ $summedRatesFor4Channels_X0[int(($i-1)/2) ]+= $hitRatesStartX_0[$i]; # TODO Bugcheck
+ $summedRatesFor4Channels_X0[int(($i-1)/2) ]+= $hitRatesStartX_1[$i];
+ $summedRatesFor4Channels_Y0[int(($i-1)/2) ]+= $hitRatesStartY_0[$i];
+ $summedRatesFor4Channels_Y0[int(($i-1)/2) ]+= $hitRatesStartY_1[$i];
}
# HPlot::PlotAdd("StartSpillSumX_0", $total_x_0,0);
# changed W.K 01.02.22 max_x and total_x for whole detector
- HPlot::PlotAdd("StartDutyFactorX_0", ($avgRate_x_0+$avgRate_x_1)/$maxTotalX,0);
+ HPlot::PlotAdd("StartDutyFactorX_0", ($avgRate_x_0+$avgRate_x_1)/($maxTotalX||1),0);
HPlot::PlotAdd("StartSpillPeakX_0", $maxTotalX,0);
HPlot::PlotAdd("StartSpillSumX_0", $total_x_0+$total_x_1,0);
# end changed
$str .= "<table style=\"margin:auto;\"><tr><td>Last Sum<td>".QA::SciNotation( $total_x_0+$total_x_1);
# end changed
- $str .= "<td>Last Duty<td>".sprintf("%0.3f",($avgRate_x_0+$avgRate_x_1)/$maxTotalX);
+ $str .= "<td>Last Duty<td>".sprintf("%0.3f",($avgRate_x_0+$avgRate_x_1)/($maxTotalX||1));
$str .= "<tr><td>Last Duration<td>".$length_x_0;
$str .= "<td>Last Break<td>".$offtime_x_0." s";
# $str .= "<tr><td>Last Max<td>".QA::SciNotation($max_x_0)." Hz (100ms)";
# HPlot::PlotAdd("StartSpillPeakY_0", $max_y_0,0);
# HPlot::PlotAdd("StartSpillSumY_0", $total_y_0,0);
# changed W.K 01.02.22
- HPlot::PlotAdd("StartDutyFactorY_0", ($avgRate_y_0+$avgRate_y_1)/$maxTotalY,0);
+ HPlot::PlotAdd("StartDutyFactorY_0", ($avgRate_y_0+$avgRate_y_1)/($maxTotalY||1),0);
HPlot::PlotAdd("StartSpillPeakY_0",$maxTotalY,0);
HPlot::PlotAdd("StartSpillSumY_0", $total_y_0+$total_y_1,0);
# end changed
$str .= "<table style=\"margin:auto;\"><tr><td>Last Sum<td>".QA::SciNotation($total_y_0+$total_y_1);
# end changed
- $str .= "<td>Last Duty<td>".sprintf("%0.3f",($avgRate_y_0+$avgRate_y_1)/$maxTotalY);
+ $str .= "<td>Last Duty<td>".sprintf("%0.3f",($avgRate_y_0+$avgRate_y_1)/($maxTotalY||1));
$str .= "<tr><td>Last Duration<td>".$length_y_0;
$str .= "<td>Last Break<td>".$offtime_y_0." s";
# $str .= "<tr><td>Last Max<td>".QA::SciNotation($max_y_0)." Hz (100ms)";
# VK: Jan said register is 24 bit, not 28 => change all 2**28 to 2**24
+# SS: Jan said register is 28 bit, not 24 => change all 2**24 to 2**28
sub calculate_rates{
my ($ra_channels, $old,$current_readout) = @_ ;
$trbnet += $trbnet_endpoint_offset;
my $hits = $current_readout->{$trbnet}->{value}->[$channel]//0;
my $hitdiff = ($hits & 0xfffffff)-(($old->{$trbnet}->{value}->[$channel]//0) & 0xfffffff);
- $hitdiff +=2**24 if $hitdiff < 0;
+ $hitdiff +=2**28 if $hitdiff < 0;
my $time = $current_readout->{$trbnet}->{time}->[$channel];
my $tdiff = ($time//0) - ($old->{$trbnet}->{time}->[$channel]//0);
$tdiff += 2**16 if $tdiff <0;
}
for my $i(1..16){
- $result[$i] +=2**24 if $result[$i] < 0;
+ $result[$i] +=2**28 if $result[$i] < 0;
}
return @result;
#exit;
# vdiff is difference in read out values (Read: ValueDifference)
my $vdiff = ($hits & 0xfffffff) - (($old->{$trbnet}->{value}->[$channel]//0) & 0xfffffff);
- $vdiff += 2**24 if $vdiff < 0;
+ $vdiff += 2**28 if $vdiff < 0;
my $diff = $vdiff/($tdiff||1E6)*1E6;
#print "vdiff: $vdiff, diff: $diff, tdiff: $tdiff\n";
if ($channel==1 || $channel==6){ $diff = $diff/2;} # added 16.1.24 by Willy to accound for double bonded readout channels
my $hits = $current_readout->{$trbnet}->{value}->[$channel]//0;
my $hitdiff = ($hits & 0xfffffff)-(($old->{$trbnet}->{value}->[$channel]//0) & 0xfffffff);
printf("%04x %04x\n",$trbnet,$channel) unless defined $hits;
- $hitdiff +=2**24 if $hitdiff < 0;
+ $hitdiff +=2**28 if $hitdiff < 0;
my $time = $current_readout->{$trbnet}->{time}->[$channel]//0;
my $tdiff = $time - ($old->{$trbnet}->{time}->[$channel]//0);
$tdiff += 2**16 if $tdiff <0;
#print Dumper $datahistlist->{'_allnames'};
$entry = -1;
- my $longstatus = "TDC channels with likely problems:<br>";
+ my $longstatus="";
my $qastate = QA::OK;
my $ToTCount = getroothist($SERVER,"/HADES/Run/HLD/HLD_ToTCountPerChannel");
next if $hits->{$b}[$i] < $oldhits->{$b}[$i];
$brokenchannels++ if $ratio < 0.05 and $currenthits > 10;
$localbroken++ if $ratio < 0.05 and $currenthits > 10;
+
# $longstatus .= $i." ".$currenttots." ".$currenthits."." if $ratio < 0.05 and $currenthits > 10;
}
#one always noisy channel
- $localbroken-- if $localbroken > 0 && $b == 0x5815;
+ if ($localbroken > 0 && $b == 0x5815){
+ $localbroken--;
+ $brokenchannels--;
+ }
$qastate = max($qastate,QA::WARN) if $localbroken >=3;
$qastate = max($qastate,QA::WARN_2) if $localbroken >=8;
HPlot::PlotDraw("TdcTotHitRatio");
-
+ $longstatus = "TDC channels with likely problems:<br>".$longstatus if $longstatus ne "";
QA::WriteQALog($fqa, "misc2", "tdctot", 120, $qastate, "TDC",
$brokenchannels, $longstatus);
}
get ("http://lxhadeb12:8090/HADES/Run/HLD/HLD_HitsPerChannel/cmd.json?command=ClearHistos");
$iteration = 0;
}
- sleep 30;
+ sleep 20;
}
use List::Util qw[min max sum];
my $STARTRATELIMIT = 50000;
-my $UPPERLIMIT = 0.03;
-my $UPPERLIMIT_PT3 = 0.004;
+my $UPPERLIMIT = 0.13;
+my $UPPERLIMIT_PT3 = 0.08;
my $oldtb; my $oldst;
my $diff;
my $iter = 0;
my $spillsumstart = 0;
my $lastinspill = 0;
-my $lastspillsumstart = 0;
+my $lastspillsumstart = -1;
while (1) {
my $tb = trb_registertime_read_mem(0x10,0x9000,0,224);
}
}
- my $startdirect = sum(@{$diff->{0x5000}},@{$diff->{0x5001}},@{$diff->{0x5002}},@{$diff->{0x5003}});
+ my $startdirect = sum(@{$diff->{0x5000}},@{$diff->{0x5001}},@{$diff->{0x5002}},@{$diff->{0x5003}})/2; #contains x and y!
my $start = sum(@{$diff->{0x10}}[56..63]) + sum(@{$diff->{0x10}}[72..79]); #sum from start
- my $m2 = $diff->{0x10}[0x50];
- my $pt3 = $diff->{0x10}[218];
+ my $m2 = $diff->{0x10}[81];
+ my $pt3 = $diff->{0x10}[82];
###Ratio M2 over Start
my $ratio = $m2/($startdirect||1);
my $qastatstart = QA::OK;
my $startmsg = "";
my $startlongmsg = "";
- if ($lastspillsumstart < 10000 || $lastspillsumstart > 20E8) {
+ if (($lastspillsumstart < 1E5 || $lastspillsumstart > 1E8) && $lastspillsumstart != -1) {
$qastatstart = QA::WARN;
}
$startmsg = sprintf("%s / %s",QA::SciNotation($startdirect),QA::SciNotation($lastspillsumstart));
if ($startdirect < 100000 || !$inspill) {
$ratiomsg = "--";
}
- if ($startdirect > 100000 && $inspill && ($ratio > 0.03 || $pt3ratio > 0.005)) {
+ if ($startdirect > 100000 && $inspill && ($ratio > 0.13 || $pt3ratio > 0.08)) {
$qastatratio = QA::WARN;
}
trb_init_ports() or die trb_strerror();
-
my $channels_x_1 = [
- { pch => 2, tdc => 2, ch => int(1 /2)}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
- { pch => 1, tdc => 2, ch => int(3 /2)}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
- { pch => 4, tdc => 2, ch => int(5 /2)},
- { pch => 3, tdc => 2, ch => int(7 /2)},
- { pch => 6, tdc => 2, ch => int(9 /2)},
- { pch => 5, tdc => 2, ch => int(11/2)},
- { pch => 8, tdc => 2, ch => int(13/2)},
- { pch => 7, tdc => 2, ch => int(15/2)},
- { pch => 10, tdc => 2, ch => int(17/2)},
- { pch => 9, tdc => 2, ch => int(19/2)},
- { pch => 12, tdc => 2, ch => int(21/2)},
- { pch => 11, tdc => 2, ch => int(23/2)},
- { pch => 14, tdc => 2, ch => int(25/2)},
- { pch => 13, tdc => 2, ch => int(27/2)},
- { pch => 16, tdc => 2, ch => int(29/2)},
- { pch => 15, tdc => 2, ch => int(31/2)},
- { pch => 18, tdc => 2, ch => int(33/2)},
- { pch => 17, tdc => 2, ch => int(35/2)},
- { pch => 20, tdc => 2, ch => int(37/2)},
- { pch => 19, tdc => 2, ch => int(39/2)},
- { pch => 22, tdc => 2, ch => int(41/2)},
- { pch => 21, tdc => 2, ch => int(43/2)},
- { pch => 24, tdc => 2, ch => int(45/2)},
- { pch => 23, tdc => 2, ch => int(47/2)},
- { pch => 34, tdc => 3, ch => int(1 /2)},
- { pch => 33, tdc => 3, ch => int(3 /2)},
- { pch => 36, tdc => 3, ch => int(5 /2)},
- { pch => 35, tdc => 3, ch => int(7 /2)},
- { pch => 38, tdc => 3, ch => int(9 /2)},
- { pch => 37, tdc => 3, ch => int(11/2)},
- { pch => 40, tdc => 3, ch => int(13/2)},
- { pch => 39, tdc => 3, ch => int(15/2)},
- { pch => 42, tdc => 3, ch => int(17/2)},
- { pch => 41, tdc => 3, ch => int(19/2)},
- { pch => 44, tdc => 3, ch => int(21/2)},
- { pch => 43, tdc => 3, ch => int(23/2)},
- { pch => 46, tdc => 3, ch => int(25/2)},
- { pch => 45, tdc => 3, ch => int(27/2)},
- { pch => 48, tdc => 3, ch => int(29/2)},
- { pch => 47, tdc => 3, ch => int(31/2)},
- { pch => 26, tdc => 3, ch => int(33/2)},
- { pch => 25, tdc => 3, ch => int(35/2)},
- { pch => 28, tdc => 3, ch => int(37/2)},
- { pch => 27, tdc => 3, ch => int(39/2)},
- { pch => 30, tdc => 3, ch => int(41/2)},
- { pch => 29, tdc => 3, ch => int(43/2)},
- { pch => 32, tdc => 3, ch => int(45/2)},
- { pch => 31, tdc => 3, ch => int(47/2)}
+ { pch => 1, tdc => 2, ch => 0}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+ { pch => 3, tdc => 2, ch => 1}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+ { pch => 5, tdc => 2, ch => 1}, # pch: physical channel. The thing which will be plotted
+ { pch => 7, tdc => 2, ch => 3}, # tdc: tdc number
+ { pch => 9, tdc => 2, ch => 4}, # ch: channel in the TDC
+ { pch => 11, tdc => 2, ch => 6},
+ { pch => 13, tdc => 2, ch => 6},
+ { pch => 15, tdc => 2, ch => 7}
+
];
my $channels_x_0 = [
- { pch => 15 , tdc => 0, ch => int(1 /2)}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
- { pch => 16 , tdc => 0, ch => int(3 /2)}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
- { pch => 13 , tdc => 0, ch => int(5 /2)},
- { pch => 14 , tdc => 0, ch => int(7 /2)},
- { pch => 11 , tdc => 0, ch => int(9 /2)},
- { pch => 12 , tdc => 0, ch => int(11/2)},
- { pch => 9 , tdc => 0, ch => int(13/2)},
- { pch => 10 , tdc => 0, ch => int(15/2)},
- { pch => 7 , tdc => 0, ch => int(17/2)},
- { pch => 8 , tdc => 0, ch => int(19/2)},
- { pch => 5 , tdc => 0, ch => int(21/2)},
- { pch => 6 , tdc => 0, ch => int(23/2)},
- { pch => 3 , tdc => 0, ch => int(25/2)},
- { pch => 4 , tdc => 0, ch => int(27/2)},
- { pch => 1 , tdc => 0, ch => int(29/2)},
- { pch => 2 , tdc => 0, ch => int(31/2)},
- { pch => 31 , tdc => 0, ch => int(33/2)},
- { pch => 32 , tdc => 0, ch => int(35/2)},
- { pch => 29 , tdc => 0, ch => int(37/2)},
- { pch => 30 , tdc => 0, ch => int(39/2)},
- { pch => 27 , tdc => 0, ch => int(41/2)},
- { pch => 28 , tdc => 0, ch => int(43/2)},
- { pch => 25 , tdc => 0, ch => int(45/2)},
- { pch => 26 , tdc => 0, ch => int(47/2)},
- { pch => 47 , tdc => 1, ch => int(1 /2)},
- { pch => 48 , tdc => 1, ch => int(3 /2)},
- { pch => 45 , tdc => 1, ch => int(5 /2)},
- { pch => 46 , tdc => 1, ch => int(7 /2)},
- { pch => 43 , tdc => 1, ch => int(9 /2)},
- { pch => 44 , tdc => 1, ch => int(11/2)},
- { pch => 41 , tdc => 1, ch => int(13/2)},
- { pch => 42 , tdc => 1, ch => int(15/2)},
- { pch => 39 , tdc => 1, ch => int(17/2)},
- { pch => 40 , tdc => 1, ch => int(19/2)},
- { pch => 37 , tdc => 1, ch => int(21/2)},
- { pch => 38 , tdc => 1, ch => int(23/2)},
- { pch => 35 , tdc => 1, ch => int(25/2)},
- { pch => 36 , tdc => 1, ch => int(27/2)},
- { pch => 33 , tdc => 1, ch => int(29/2)},
- { pch => 34 , tdc => 1, ch => int(31/2)},
- { pch => 23 , tdc => 1, ch => int(33/2)},
- { pch => 24 , tdc => 1, ch => int(35/2)},
- { pch => 21 , tdc => 1, ch => int(37/2)},
- { pch => 22 , tdc => 1, ch => int(39/2)},
- { pch => 19 , tdc => 1, ch => int(41/2)},
- { pch => 20 , tdc => 1, ch => int(43/2)},
- { pch => 17 , tdc => 1, ch => int(45/2)},
- { pch => 18 , tdc => 1, ch => int(47/2)}
+ { pch => 2 , tdc => 0, ch => 7 }, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+ { pch => 4 , tdc => 0, ch => 6 }, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+ { pch => 6 , tdc => 0, ch => 6 },
+ { pch => 8 , tdc => 0, ch => 4 },
+ { pch => 10, tdc => 0, ch => 3 },
+ { pch => 12, tdc => 0, ch => 1 },
+ { pch => 14, tdc => 0, ch => 1 },
+ { pch => 16, tdc => 0, ch => 0 }
+
];
my $channels_y_1 = [
- { pch => 2, tdc => 2, ch => int(1 /2)}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
- { pch => 1, tdc => 2, ch => int(3 /2)}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
- { pch => 4, tdc => 2, ch => int(5 /2)},
- { pch => 3, tdc => 2, ch => int(7 /2)},
- { pch => 6, tdc => 2, ch => int(9 /2)},
- { pch => 5, tdc => 2, ch => int(11/2)},
- { pch => 8, tdc => 2, ch => int(13/2)},
- { pch => 7, tdc => 2, ch => int(15/2)},
- { pch => 10, tdc => 2, ch => int(17/2)},
- { pch => 9, tdc => 2, ch => int(19/2)},
- { pch => 12, tdc => 2, ch => int(21/2)},
- { pch => 11, tdc => 2, ch => int(23/2)},
- { pch => 14, tdc => 2, ch => int(25/2)},
- { pch => 13, tdc => 2, ch => int(27/2)},
- { pch => 16, tdc => 2, ch => int(29/2)},
- { pch => 15, tdc => 2, ch => int(31/2)},
- { pch => 18, tdc => 2, ch => int(33/2)},
- { pch => 17, tdc => 2, ch => int(35/2)},
- { pch => 20, tdc => 2, ch => int(37/2)},
- { pch => 19, tdc => 2, ch => int(39/2)},
- { pch => 22, tdc => 2, ch => int(41/2)},
- { pch => 21, tdc => 2, ch => int(43/2)},
- { pch => 24, tdc => 2, ch => int(45/2)},
- { pch => 23, tdc => 2, ch => int(47/2)},
- { pch => 34, tdc => 3, ch => int(1 /2)},
- { pch => 33, tdc => 3, ch => int(3 /2)},
- { pch => 36, tdc => 3, ch => int(5 /2)},
- { pch => 35, tdc => 3, ch => int(7 /2)},
- { pch => 38, tdc => 3, ch => int(9 /2)},
- { pch => 37, tdc => 3, ch => int(11/2)},
- { pch => 40, tdc => 3, ch => int(13/2)},
- { pch => 39, tdc => 3, ch => int(15/2)},
- { pch => 42, tdc => 3, ch => int(17/2)},
- { pch => 41, tdc => 3, ch => int(19/2)},
- { pch => 44, tdc => 3, ch => int(21/2)},
- { pch => 43, tdc => 3, ch => int(23/2)},
- { pch => 46, tdc => 3, ch => int(25/2)},
- { pch => 45, tdc => 3, ch => int(27/2)},
- { pch => 48, tdc => 3, ch => int(29/2)},
- { pch => 47, tdc => 3, ch => int(31/2)},
- { pch => 26, tdc => 3, ch => int(33/2)},
- { pch => 25, tdc => 3, ch => int(35/2)},
- { pch => 28, tdc => 3, ch => int(37/2)},
- { pch => 27, tdc => 3, ch => int(39/2)},
- { pch => 30, tdc => 3, ch => int(41/2)},
- { pch => 29, tdc => 3, ch => int(43/2)},
- { pch => 32, tdc => 3, ch => int(45/2)},
- { pch => 31, tdc => 3, ch => int(47/2)}
+ { pch => 2 , tdc => 3, ch => 7 }, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+ { pch => 4 , tdc => 3, ch => 6 }, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+ { pch => 6 , tdc => 3, ch => 6 },
+ { pch => 8 , tdc => 3, ch => 4 },
+ { pch => 10, tdc => 3, ch => 3 },
+ { pch => 12, tdc => 3, ch => 1 },
+ { pch => 14, tdc => 3, ch => 1 },
+ { pch => 16, tdc => 3, ch => 0 }
];
my $channels_y_0 = [
- { pch => 15 , tdc => 0 , ch => int(1 /2)}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
- { pch => 16 , tdc => 0 , ch => int(3 /2)}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
- { pch => 13 , tdc => 0 , ch => int(5 /2)},
- { pch => 14 , tdc => 0 , ch => int(7 /2)},
- { pch => 11 , tdc => 0 , ch => int(9 /2)},
- { pch => 12 , tdc => 0 , ch => int(11/2)},
- { pch => 9 , tdc => 0 , ch => int(13/2)},
- { pch => 10 , tdc => 0 , ch => int(15/2)},
- { pch => 7 , tdc => 0 , ch => int(17/2)},
- { pch => 8 , tdc => 0 , ch => int(19/2)},
- { pch => 5 , tdc => 0 , ch => int(21/2)},
- { pch => 6 , tdc => 0 , ch => int(23/2)},
- { pch => 3 , tdc => 0 , ch => int(25/2)},
- { pch => 4 , tdc => 0 , ch => int(27/2)},
- { pch => 1 , tdc => 0 , ch => int(29/2)},
- { pch => 2 , tdc => 0 , ch => int(31/2)},
- { pch => 31 , tdc => 0 , ch => int(33/2)},
- { pch => 32 , tdc => 0 , ch => int(35/2)},
- { pch => 29 , tdc => 0 , ch => int(37/2)},
- { pch => 30 , tdc => 0 , ch => int(39/2)},
- { pch => 27 , tdc => 0 , ch => int(41/2)},
- { pch => 28 , tdc => 0 , ch => int(43/2)},
- { pch => 25 , tdc => 0 , ch => int(45/2)},
- { pch => 26 , tdc => 0 , ch => int(47/2)},
- { pch => 47 , tdc => 1 , ch => int(1 /2)},
- { pch => 48 , tdc => 1 , ch => int(3 /2)},
- { pch => 45 , tdc => 1 , ch => int(5 /2)},
- { pch => 46 , tdc => 1 , ch => int(7 /2)},
- { pch => 43 , tdc => 1 , ch => int(9 /2)},
- { pch => 44 , tdc => 1 , ch => int(11/2)},
- { pch => 41 , tdc => 1 , ch => int(13/2)},
- { pch => 42 , tdc => 1 , ch => int(15/2)},
- { pch => 39 , tdc => 1 , ch => int(17/2)},
- { pch => 40 , tdc => 1 , ch => int(19/2)},
- { pch => 37 , tdc => 1 , ch => int(21/2)},
- { pch => 38 , tdc => 1 , ch => int(23/2)},
- { pch => 35 , tdc => 1 , ch => int(25/2)},
- { pch => 36 , tdc => 1 , ch => int(27/2)},
- { pch => 33 , tdc => 1 , ch => int(29/2)},
- { pch => 34 , tdc => 1 , ch => int(31/2)},
- { pch => 23 , tdc => 1 , ch => int(33/2)},
- { pch => 24 , tdc => 1 , ch => int(35/2)},
- { pch => 21 , tdc => 1 , ch => int(37/2)},
- { pch => 22 , tdc => 1 , ch => int(39/2)},
- { pch => 19 , tdc => 1 , ch => int(41/2)},
- { pch => 20 , tdc => 1 , ch => int(43/2)},
- { pch => 17 , tdc => 1 , ch => int(45/2)},
- { pch => 18 , tdc => 1 , ch => int(47/2)}
+ { pch => 1, tdc => 1, ch => 0}, # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+ { pch => 3, tdc => 1, ch => 1}, # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+ { pch => 5, tdc => 1, ch => 1},
+ { pch => 7, tdc => 1, ch => 3},
+ { pch => 9, tdc => 1, ch => 4},
+ { pch => 11, tdc => 1, ch => 6},
+ { pch => 13, tdc => 1, ch => 6},
+ { pch => 15, tdc => 1, ch => 7}
];
+
+
while (1) {
my $st = trb_registertime_read_mem(0xfe58,0xc001,0,8);
my $tdiff = $st->{$b}{time}[0] - ($oldst->{$b}{time}[0]||0);
$tdiff += 2**16 if ($tdiff <= 0);
$tdiff = ($tdiff * 16 / 1E6) || 1;
- for my $v (0..23) {
+ for my $v (0..7) {
$vdiff = (($st->{$b}{value}[$v]||0)&0xffffff) - (($oldst->{$b}{value}[$v]||0)&0xffffff);
$vdiff += 2**24 if ($vdiff < 0);
$diff->{$b}->[$v] = $vdiff/$tdiff;
}
}
- my $startdirecty = sum(@{$diff->{0x5001}},@{$diff->{0x5003}});
- my $startdirectx = sum(@{$diff->{0x5000}},@{$diff->{0x5002}});
+ my $startdirecty = sum(@{$diff->{0x5001}},@{$diff->{0x5003}})||1;
+ my $startdirectx = sum(@{$diff->{0x5000}},@{$diff->{0x5002}})||1;
my @y; my @x;
for my $e (0..7) {
<li><a href="https://hessenbox-a10.rz.uni-frankfurt.de/getlink/fiFyuhGJXrwV1dPs5RebuW/HadesOperatorManual.pdf" style="color:#d33">Operator manual</a>
<li><a href="https://hessenbox-a10.rz.uni-frankfurt.de/getlink/fiRhk3zAKorCqtPgXk7hpa/">Document Repository</a>
<li><a href="https://hessenbox-a10.rz.uni-frankfurt.de/getlink/fiHTFzB5jN8CgPNMjvzn83/networkaddresses.pdf">DAQ FEE Addresses</a>
-<li><a href="https://hessenbox-a10.rz.uni-frankfurt.de/getlink/fiGgg6c7AhGjD2rnVAxfD7/PhoneNumbers.jpg">Phone Numbers</a>
+<!--<li><a href="https://hessenbox-a10.rz.uni-frankfurt.de/getlink/fiGgg6c7AhGjD2rnVAxfD7/PhoneNumbers.jpg">Phone Numbers</a>-->
<li><a href="https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.form_selection">Beamtime Logbook</a></li>
-<li><a href="https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hshiftcrews2.form_select">Shift Crew</a></li>
+<li><a href="/mon/monitor.cgi?30-window-ExpertsOnCall" style="color:#d33">Experts on Shift</a></li>
+<li><a href="https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hshiftcrews2.form_select">Shift Plan (Oracle)</a></li>
<li class="outdated"><a href="https://jspc29.x-matter.uni-frankfurt.de/docu/qadocu.pdf">QA manual</a>
</div>
<div class="linkbox" style="width:730px;"><h4>Operator Monitor - the "must-have" windows</h4><ul>
<p style="width:600px">Use these links if you want to open them on your own screen. In the counting house, use the icons provided on the desktop!
<li style="width:600px;"><a href="monitor.cgi?1-window-QA">Main Screen 0</a> Tactical Overview
-<li style="width:600px;"><a href="monitor.cgi?1-window9x21-busyhist-eventratelong-eventrateshort-StartBars">Main Screen 1</a> Eventrate & Busy
-<li style="width:600px;"><a href="monitor.cgi?1-window8x26-busy-DutyFactor-Pt3AcceptRatio-EvtsPerSpill-StartCountSpill">Main Screen 2</a> Spill Info
-<li style="width:600px;"><a href="monitor.cgi?1-window14x8-EBSummary-hldlast">Main Screen 3</a> EBs</li>
+<li style="width:600px;"><a href="monitor.cgi?1-window9x20-busyhist-eventratelong-eventrateshort">Main Screen 1</a> Eventrate & Busy
+<li style="width:600px;"><a href="monitor.cgi?1-window8x20-busy-DutyFactor-Pt3AcceptRatio-EvtsPerSpill-StartCountSpill">Main Screen 2</a> Spill Info
+<li style="width:600px;"><a href="monitor.cgi?1-window13x8-EBSummary-hldlast">Main Screen 3</a> EBs</li>
<!--<li style="width:600px;"><a href="monitor.cgi?2-window19x16-EcalSimpleRate-RpcRate-StsRate-TofRate-ItofRate-StartRateSimple-FrpcRate">Main Screen 4</a> Tof Rpc STS Ecal iTOF fRPC Start rates</li>-->
<li style="width:600px;"><a href="monitor.cgi?2-window12x16-EcalSimpleRate-RpcRate-TofRate-StartRateSimple-FwRateSimple">Main Screen 4</a> Tof Rpc FW Ecal Start rates</li>
<li style="width:600px;"><a href="monitor.cgi?2-window14x14-StartMap-StartRateNumbers_1D-StartPosition">Main Screen 5</a> Beam Position</li>
-<li style="width:600px;"><a href="monitor.cgi?2-window12x21-StartFalls-CTSRates</a>Main Screen 5a</a>Beam and CTS rates</li>
-<li style="width:600px;"><a href="monitor.cgi?2-window12x21-RpcTofSectorRate_highres-StartRateX_histbar-StartRateX_histbar_short">Main Screen 6</a> Beam Intensities</li>
+<li style="width:600px;"><a href="monitor.cgi?2-window12x27-RpcTofSectorRate_highres-StartRateX_histbar-StartRateX_histbar_short-CTSRates">Main Screen 6</a> Beam Intensities and Trigger Rates</li>
</ul></div>
<div class="linkbox" style="clear:both;width:730px;"><h4>Other Resources</h4><ul>
</ul></div>
<div class="linkbox" style="float:right"><h4>Beam</h4><ul>
-<li class="outdated"><a href="monitor.cgi?10-window-StartCountSpill">Start counts per spill</a></li>
+<li ><a href="http://ope-acc.gsi.de/#/shiftoverview?shift=1">Accelerator Status / Logbook</a></li>
+<li ><a href="monitor.cgi?10-window-StartCountSpill">Start counts per spill</a></li>
<li><a href="monitor.cgi?2-window13x21-QFactor-MicroSpillStructure">QFactor & Micro Structure</a></li>
<li><a href="monitor.cgi?1-StartRateNumbers-StartPosition-ItofRateNumbers-StartPositionRMS-HodoRate-QFactor-CTSRates-MicroSpillStructure-StartSpillShapeAnalysisY_0">Beam plots collection similar to HKR</a></li>
<li><a href="/daqtools/tools/beamabort.pl">Beam Abort</a></li>
<li><a target="_blank" href="rich_drawing_2.htm#richTemperature">Temperature</a></li>
<li><a target="_blank" href="rich_drawing_bkpl.htm#richTemperatureBackplane">Temperature Backplane</a></li>
<li><a target="_blank" href="monitor.cgi?10-window-RichTempHistoDiRICH">Temperature Backplane Histo</a></li>
-<li><a target="_blank" href="rich_drawing_2.htm#rich1V">DiRich 1.1V</a></li>
-<li><a target="_blank" href="rich_drawing_2.htm#rich2V5">DiRich 2.5V</a></li>
+<li><a target="_blank" href="rich_drawing_2.htm#rich1V">DiRich 1.1V</a> <a target="_blank" href="rich_drawing_2.htm#rich2V5">DiRich 2.5V</a></li>
+<li><a target="_blank" href="rich_drawing_2.htm#rich3V3">DiRich 3.3V</a> <a target="_blank" href="rich_drawing_2.htm#rich1V2">DiRich 1.2V</a></li>
<li><a target="_blank" href="monitor.cgi?10-richvolt">Voltage & Current</a></li>
<li><a target="_blank" href="monitor.cgi?2-window-RichHV">High Voltage</a></li>
<li><a target="_blank" href="monitor.cgi?10-window-RichMagnet">Rich Inner Magnet fields</a></li>
$longtext .= "none" if (substr($res[3],3,1) ne "1");
$longtext .= "ABORTED" if (substr($res[3],3,1) eq "1");
- $value = "ABORT" if $longtext =~ /ABORT/;
$value = "ABORTED" if $longtext =~ /ABORTED/;
+ $value = "ABORT" if $longtext =~ /ABORT/ && $value ne "";
$value = "inactive" if $longtext =~ /inactive/;
$qastate = QA::WARN if $longtext =~ /inactive/;
$qastate = QA::FATAL if $longtext =~ /ABORT/;
--- /dev/null
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Time::HiRes qw( gettimeofday usleep time );
+use FileHandle;
+use Data::Dumper;
+use POSIX qw/floor ceil/;
+use Hmon;
+use QA;
+#use Perl2Epics;
+use LWP::Simple;
+use JSON qw( decode_json );
+
+use HADES::TrbNet;
+
+
+# JAM 9-Feb-2024: check hub inputs of BNET processes for missing data
+
+
+my $store = {};
+my @time;
+my @state;
+
+# with this switch disable qalog and enable printout only JAM
+my $opt_debug = 0;
+my $speak_counter =0;
+
+
+my $fqa = QA::OpenQAFile();
+
+
+
+# JAM 2018 here figure out corresponding json calles
+my $masterurl = 'http://lxhadeb12:8099/';
+my $url_inputs = $masterurl . 'Master/BNET/Inputs/get.json?field="value"';
+my $url_master_state = $masterurl . 'Master/BNET/State/get.json?field="value"';
+
+
+
+
+
+########### test to get all inputs here:
+my $inputs = get ($url_inputs);
+die "Couldn't get $url_inputs" unless defined $inputs;
+#
+my $inputs_array = decode_json($inputs);
+#
+#print Dumper $inputs_array;
+#my $numinputs = scalar @$inputs_array;
+#print "input node 1: $inputs_array->[0]\n";
+#print "number of inputs: $numinputs\n" ;
+
+
+
+# for my $inpnode (@$inputs_array) {
+# #print " node is $inpnode \n";
+# my $url_nodestate = $masterurl . $inpnode . '/State/get.json?field="value"';
+# my $nodestate = get ($url_nodestate);
+# #print $url_nodestate;
+# #print Dumper $nodestate;
+#
+# }
+
+
+
+#
+#
+#die "End of test.";
+
+
+# my $spilllength = 0;
+
+while (1) {
+# my $totalrate = 0;
+# my $totalbytes = 0;
+# my $totaldiscarded = 0;
+# my $ioc = 0;
+# my $actmask = 0;
+# my $recvmask = 0;
+
+my $qastate = QA::OK;
+
+my $qamsg = "";
+my $qamsgshort = "";
+
+
+ my $masterstate ="";
+ $masterstate = get ($url_master_state);
+ $masterstate = " unknown " unless defined $masterstate;
+ $masterstate = substr $masterstate, 1, -1;
+
+ #$masterstate ="no_data_12";
+
+ # print "----------- DEBUG:masterstate=$masterstate\n";
+
+
+
+# look for messages
+ #no_data_6
+ my $qatitle = "EB inputs";
+ my $first=1;
+ my $inpnumber = 0;
+ my $okflag=1;
+ for my $inpnode (@$inputs_array) {
+ #print " node is $inpnode \n";
+ my $url_nodestate = $masterurl . $inpnode . '/State/get.json?field="value"';
+ my $nodestate = get ($url_nodestate);
+ $nodestate = " unknown " unless defined $nodestate;
+ $nodestate = substr $nodestate, 1, -1;
+ #print $url_nodestate;
+ #print Dumper $nodestate;
+
+ # here find out address of (probably missing) input hub:
+ my $url_nodehubs = $masterurl . $inpnode . '/get.json?field="hubs"';
+ #print $url_nodehubs;
+ my $nodehubs = get ($url_nodehubs);
+ #print Dumper $nodehubs;
+ my $hubs_array = decode_json($nodehubs);
+ #print Dumper $hubs_array;
+
+ my @inpfields=split("/",$inpnode);
+ my $inpname=$inpfields[1];
+
+ #$nodestate="no_data_4"; #debug
+ if (index($nodestate, 'no_data_') != -1)
+ {
+ $qastate = QA::ERROR;
+ $qamsgshort = "Miss partial data!";
+ my @statefields=split("_",$nodestate);
+ my $inpnumber=0; # debug
+ $inpnumber=int($statefields[2]) if defined $statefields[2];
+ #$qamsg .= "Missing DAQ data on input $inpnumber , node $inpname\n";
+ if($first==1)
+ {
+ $qamsg .= "Missing DAQ data on: ";
+ $first=0;
+ }
+ $qamsg .= sprintf("%s, input %d (hub 0x%x) -", $inpname, $inpnumber, @$hubs_array[$inpnumber]);
+ $okflag=0;
+ }
+
+ if (index($nodestate, 'LowData') != -1)
+ {
+ $qastate = QA::WARN_2;
+ $qamsgshort = "Low data!";
+ if($first==1)
+ {
+ $qamsg .= "Low data rate on: ";
+ $first=0;
+ }
+ $qamsg .= "$inpname -";
+ $okflag=0;
+ }
+
+ }
+
+ if($okflag > 0)
+ {
+ $qamsgshort = "OK.";
+ $qamsg = "Eventbuilders inputs are getting data.";
+ }
+
+
+
+
+
+ if (index($masterstate, 'NoData') != -1) {
+ $qastate = QA::ERROR;
+ $qamsgshort = "All inputs get no data!";
+
+ $qamsg = "All eventbuilder inputs do not get any data. Check DAQ or accelerator!";# if ($opt_debug<1) {
+
+ }
+ if (index($masterstate, 'Mismatch') != -1) {
+ $qamsgshort = "Server mismatch!";
+ $qastate = QA::ERROR;
+ $qamsg .= "An eventbuilder server node is missing! Please restart eventbuilders.";
+
+ }
+
+ if ($opt_debug<1) {
+
+
+ $speak_counter++;
+ if($speak_counter>20)
+ {
+ $speak_counter=-20;
+
+ Hmon::Speak('ebmissing',"Event builders are missing input data.") if $qastate > 60;
+ }
+ # dracones
+ QA::WriteQALog($fqa, "server", "ebinputs", 10, $qastate, $qatitle,
+ $qamsgshort, $qamsg);
+ } else {
+ print "QAlog: state:$qastate title:$qatitle\n";
+ print "QAlog: short:$qamsgshort\n";
+ print "QAlog: msg: $qamsg\n";
+ }
+
+
+
+ usleep(1990000);
+}
--- /dev/null
+#!/usr/bin/perl
+
+use IPC::Run3;
+use warnings;
+use POSIX qw(strftime floor ceil);
+use FileHandle;
+use lib "./code";
+use lib "../daqtools/tools";
+use HADES::TrbNet;
+use Time::HiRes qw(usleep);
+use Dmon;
+use Hmon;
+use HPlot;
+use QA;
+use getebjson;
+use getrootjson;
+use JSON::XS;
+use Data::Dumper;
+use List::Util qw(min max sum);
+use LWP::Simple qw(get);
+use Try::Tiny;
+use utf8;
+
+binmode(STDOUT, ":utf8");
+binmode(STDIN, ":utf8");
+use POSIX qw(strftime);
+
+
+my @experts = qw(SL DaqOp QA DaqTr DaqProf DaqEx Start RICH MDC RPC ECAL TOF_FW Ana);
+
+#contact Expert Name Phone Alias
+#$store->{contact}{Name}
+
+
+while(1) {
+ my $store;
+
+ my $offset = 0; #for testing
+ my $oracledatestart = strftime("%d-%b-%Y %H:%M", localtime(time-3600*8+$offset*86400)); #-864000-7200
+ my $oracledateend = strftime("%d-%b-%Y %H:%M", localtime(time+$offset*86400));
+ my $date = strftime ("%Y-%m-%d", localtime(time+$offset*86400));
+ my $hour = strftime ("%H", localtime(time+$offset*86400));
+ $hour =~ s/\s//;
+
+ my $plan = get("https://hessenbox-a10.rz.uni-frankfurt.de/dl/fiUP5enanrB2pwwuBDJxGj/ExpertsPlan.csv");
+ my @plan = split("\n",$plan);
+
+ foreach my $line (@plan) {
+ my @s = split(",",$line);
+ if (scalar @s == 5 && $s[0] eq 'contact') {
+ $store->{contact}{$s[2]}{expert}=$s[1];
+ $store->{contact}{$s[2]}{phone}=$s[3];
+ $store->{contact}{$s[2]}{alias}=$s[4];
+ $store->{alias}{$s[4]} = $s[2];
+ $store->{alias}{$s[2]} = $s[4];
+ }
+ if (scalar @s == 28 && $s[0] ne '') {
+ my $exp = $store->{contact}{$s[0]}{expert} //'';
+ if($date eq $s[2]) {
+ $store->{onshift}{$exp}{$s[0]} = $s[$hour+3];
+ }
+ }
+ }
+
+
+
+ my $oraclecmd = "curl 'https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hshiftcrews2.show_shifts' -b /tmp/cookiefile -c /tmp/cookiefile -X POST -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' -H 'Accept-Language: de,en-US;q=0.7,en;q=0.3' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: https://hades-db.gsi.de' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hshiftcrews2.form_select' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: iframe' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-User: ?1' --data-raw 'p_exp_id=FEB24&p_begin=$oracledatestart&p_end=$oracledateend&p_purpose_id=&p_responsible=&p_action=Show+Shift+Crew' -u hades:6\\\$ectors 2>/dev/null" ;
+ my $text; my @ret;
+ run3($oraclecmd, \$text, \@ret);
+ my $cnt=0;
+ foreach my $line (@ret) {
+ next unless $line =~ /^<td/;
+ my $onshift = $line =~/on shift/;
+
+ $line =~ s/<td class="">//g;
+ $line =~ s/<td class="highlight">//g;
+ $line =~ s%</td>%%g;
+ $line =~ s%<strong>%%g;
+ $line =~ s%</strong>%%g;
+ $line =~ s%<br />on shift%%g;
+ $line =~ s% % %g;
+ $line =~ s%<br />%°%g;
+ $line =~ s%<br>%°%g;
+ $line =~ s%Info</span><span class="infoCont">[^<]*% %g;
+ $line =~ s%<span[^>]*>%%g;
+ $line =~ s%</span>%%g;
+ chomp $line;
+ my @e = split("°",$line);
+
+ my $name= $store->{alias}{$e[0]} || $e[0];
+ if($name ne ' ') {
+ $store->{contact}{$name}{phone} //= $e[1];
+ $store->{onshift}{$experts[$cnt]}{$name} = 'S' if $onshift;
+ $store->{onshift}{$experts[$cnt]}{$name} = 'X' unless $onshift;
+ }
+
+ $cnt++;
+ }
+
+
+ my $str = Hmon::MakeTitle(6, 9, "Experts on Shift",1);
+ $str .= "HADES knowledge at hand<br><table class=\"expertlist\">";
+
+
+ foreach my $ex (qw(DaqProf DaqEx Start RICH MDC RPC ECAL TOF_FW Ana SL)) {
+ next unless $store->{onshift}{$ex};
+ foreach my $n (sort {cmpstate($ex,$a,$b)} keys %{$store->{onshift}{$ex}}) {
+ next if $store->{onshift}{$ex}{$n} eq '.';
+ next if $store->{onshift}{$ex}{$n} eq '';
+
+ $str .= "<tr><td>$ex<td>";
+ $str .= "<div class=\"greenbutton inline\"></div>" if $store->{onshift}{$ex}{$n} eq 'S';
+ $str .= "<div class=\"darkgreenbutton inline\"></div>" if $store->{onshift}{$ex}{$n} eq 'X';
+ $str .= "<div class=\"yellowbutton inline\"></div>" if $store->{onshift}{$ex}{$n} eq '-';
+ $str .= "<div class=\"greybutton inline\"></div>" if $store->{onshift}{$ex}{$n} eq 'n';
+ $str .= "<div class=\"redbutton inline\"></div>" if $store->{onshift}{$ex}{$n} eq '.';
+
+ $str .= "<td>$n<td>".($store->{contact}{$n}{phone}//"");
+ }
+ $str .= "\n";
+
+ }
+
+
+ $str .= "</table><div style='text-align:left;'>";
+ $str .= "<div style='width:48%;display:inline-block;'><div class=\"greenbutton inline\"></div> ask me on shift</div>";
+ $str .= "<div style='width:48%;display:inline-block;'><div class=\"darkgreenbutton inline\"></div> on call</div>";
+ $str .= "<div style='width:48%;display:inline-block;'><div class=\"yellowbutton inline\"></div> call if needed</div>";
+ $str .= "<div style='width:48%;display:inline-block;'><div class=\"redbutton inline\"></div> please don't disturb</div>";
+ $str .= "</div>";
+ $str .= Hmon::MakeFooter();
+ Hmon::WriteFile("ExpertsOnCall",$str);
+
+
+ sleep(300);
+}
+
+
+sub cmpstate {
+ my ($ex,$a,$b) = @_;
+ my $x = $store->{onshift}{$ex}{$a} //'.';
+ my $y = $store->{onshift}{$ex}{$b} // '.';
+
+ $x = 10 if $x eq 'S';
+ $x = 8 if $x eq 'X';
+ $x = 6 if $x eq '-';
+ $x = 4 if $x eq 'n';
+ $x = 2 if $x eq '.';
+
+ $y = 10 if $y eq 'S';
+ $y = 8 if $y eq 'X';
+ $y = 6 if $y eq '-';
+ $y = 4 if $y eq 'n';
+ $y = 2 if $y eq '.';
+
+ return $y <=> $x;
+ }
binmode(STDOUT, ":utf8");
binmode(STDIN, ":utf8");
# use open qw( :encoding(ISO-8859-1) :std );
-use open qw( :encoding(UTF-8) :std );
+use open qw( :encoding(utf-8) :std );
use LWP;
use IPC::Run3;
use Data::Dumper;
$string
);
$ua->request($req);
+ Hmon::Speak("logbook","There is a new logbook entry to read.");
# exit;
- Hmon::Speak("logbook","There is a new lockbook entry to read.");
}
}
$found = 0 if $found == 6;
my $str = Hmon::MakeTitle(12, 16, "HADES Logbook", 1, "");
shift @res for (0..8);
$str .= '<div id="logbox" class="textbox" >';
- $str .= join("\n",@res);
+ $str .= encode("UTF-8",join("\n",@res));
$str .= "</div>";
$str .= Hmon::MakeFooter();
Hmon::WriteFile("Logbook", $str);
my $magnet_on = 1 - $QA::MagnetOff;
my %range_list = (
- 'Time' => {},
- 'TC1200' => {'min' => 5.2 , 'max' => 5.6 },
- 'TC1266' => {'min' => 4.9 , 'max' => 5.1 },
- 'TC1202' => {'min' => 4.4 , 'max' => 4.6 },
- 'TC1208' => {'min' => 4.5 , 'max' => 4.8 },
- 'TC1214' => {'min' => 4.4 , 'max' => 4.6 },
- 'TC1220' => {'min' => 4.4 , 'max' => 4.6 },
- 'TC1226' => {'min' => 4.5 , 'max' => 4.8 },
- 'TC1232' => {'min' => 4.4 , 'max' => 4.6 },
- 'TC1206' => {'min' => 4.0 , 'max' => 6.0 },
- 'TC1212' => {'min' => 3.7 , 'max' => 6.0 },
- 'TC1218' => {'min' => 6.0 , 'max' => 7.0 },
- 'TC1224' => {'min' => 6.0 , 'max' => 8.0 },
- 'TC1230' => {'min' => 4.6 , 'max' => 8.0 },
- 'TC1236' => {'min' => 4.4 , 'max' => 6.0 },
- 'TC1238' => {'min' => 4.6 , 'max' => 4.9 },
- 'TC1248' => {'min' => 4.5 , 'max' => 4.7 },
- 'FI1400' => {'min' => 0.36 , 'max' => 0.62 },
- 'PSUI_rbk' => {'min' => 2990 , 'max' => 3210 },
- 'PSUV_rbk' => {'min' => 0 , 'max' => 1 },
- 'BBI' => {'min' => 419 , 'max' => 620 },
- 'LL1708' => {'min' => 54 , 'max' => 65.0 , 'minerror' => 53 },
- 'TP1240' => {'min' => 75.5 , 'max' => 89.0 , 'cal_max' => 2},
- 'PI2610' => {'min' => 1.7 , 'max' => 3.1 },
- 'TP2200' => {'min' => 83.0 , 'max' => 85.5 , 'cal_max' => 2},
- 'TP2202' => {'min' => 81.0 , 'max' => 87.0 , 'cal_max' => 2},
- 'TP2204' => {'min' => 81.0 , 'max' => 85.5 , 'cal_max' => 2},
- 'TP2206' => {'min' => 81.0 , 'max' => 85.0 , 'cal_max' => 2},
- 'TP2208' => {'min' => 87.0 , 'max' => 95.0 , 'cal_max' => 2},
- 'TP2210' => {'min' => 80.0 , 'max' => 85.0 , 'cal_max' => 2},
- 'TP2212' => {'min' => 82.0 , 'max' => 92.0 , 'cal_max' => 2},
- 'TP2214' => {'min' => 80.0 , 'max' => 85.0 , 'cal_max' => 2},
- 'TP2216' => {'min' => 80.0 , 'max' => 84.0 , 'cal_max' => 2},
- 'TP2218' => {'min' => 84.0 , 'max' => 90.5 , 'cal_max' => 2},
- 'TP2220' => {'min' => 80.0 , 'max' => 84.0 , 'cal_max' => 2},
- 'TP2222' => {'min' => 80.0 , 'max' => 86.0 , 'cal_max' => 2},
- 'TP2224' => {'min' => 81.0 , 'max' => 85.0 , 'cal_max' => 2},
- 'TP2226' => {'min' => 80.0 , 'max' => 100 , 'cal_max' => 2},
- 'TP2228' => {'min' => 85 , 'max' => 94.0 , 'cal_max' => 2},
- 'TP2230' => {'min' => 80.0 , 'max' => 85.5 , 'cal_max' => 2},
- 'PI2600' => {'min' => 1.65 , 'max' => 2.0 },
- 'VG3000' => {'min' => -6.5 , 'max' => -5.5 },
- 'PI1600' => {'min' => 2.94 , 'max' => 3.03 },
- 'PI1602' => {'min' => 1.30 , 'max' => 1.37 },
- 'PI1604' => {'min' => 2.7 , 'max' => 2.99 },
- 'PI1612' => {'min' => 0 , 'max' => 12.0 },
- 'EV1100R' => {'min' => 27 , 'max' => 45 },
- 'EV1122R' => {'min' => 55 , 'max' => 61 },
- 'EV1128R' => {'min' => 73 , 'max' => 88 },
- 'TC1200M' => {'min' => 6.5 , 'max' => 8.5 },
- 'PI1600I' => {'min' => 1.28 , 'max' => 1.37 },
- 'MV2102X' => {},
- 'MV2102L' => {},
- 'MV2102LUX(a)' => {'min' => .8 , 'max' => 8.0 },
- 'MV2102U' => {},
- 'EV2128E' => {},
- 'EV2128F' => {},
- 'EV2128FG(a)' => {},
- 'EV2128G' => {},
- 'EV2128L' => {},
- 'EV2128LUX(a)' => {},
- 'EV2128U' => {},
- 'EV2128X' => {},
- 'HR3104(a)' => {},
- 'HR3108R' => {},
- 'MV1106R' => {},
+ 'HAD:MAGNET:Time' => {},#{},
+ 'HAD:MAGNET:TC1200' => {},#{'min' => 5.2 , 'max' => 5.6 },
+ 'HAD:MAGNET:TC1266' => {},#{'min' => 4.9 , 'max' => 5.1 },
+ 'HAD:MAGNET:TC1202' => {},#{'min' => 4.4 , 'max' => 4.6 },
+ 'HAD:MAGNET:TC1208' => {},#{'min' => 4.5 , 'max' => 4.8 },
+ 'HAD:MAGNET:TC1214' => {},#{'min' => 4.4 , 'max' => 4.6 },
+ 'HAD:MAGNET:TC1220' => {},#{'min' => 4.4 , 'max' => 4.6 },
+ 'HAD:MAGNET:TC1226' => {},#{'min' => 4.5 , 'max' => 4.8 },
+ 'HAD:MAGNET:TC1232' => {},#{'min' => 4.4 , 'max' => 4.6 },
+ 'HAD:MAGNET:TC1206' => {},#{'min' => 4.0 , 'max' => 6.0 },
+ 'HAD:MAGNET:TC1212' => {},#{'min' => 3.7 , 'max' => 6.0 },
+ 'HAD:MAGNET:TC1218' => {},#{'min' => 6.0 , 'max' => 7.0 },
+ 'HAD:MAGNET:TC1224' => {},#{'min' => 6.0 , 'max' => 8.0 },
+ 'HAD:MAGNET:TC1230' => {},#{'min' => 4.6 , 'max' => 8.0 },
+ 'HAD:MAGNET:TC1236' => {},#{'min' => 4.4 , 'max' => 6.0 },
+ 'HAD:MAGNET:TC1238' => {},#{'min' => 4.6 , 'max' => 4.9 },
+ 'HAD:MAGNET:TC1248' => {},#{'min' => 4.5 , 'max' => 4.7 },
+ 'HAD:MAGNET:FI1400' => {},#{'min' => 0.36 , 'max' => 0.62 },
+ 'HAD:MAGNET:PSUI_rbk' => {},#{'min' => 2990 , 'max' => 3210 },
+ 'HAD:MAGNET:PSUV_rbk' => {},#{'min' => 0 , 'max' => 1 },
+ 'HAD:MAGNET:BBI' => {},#{'min' => 419 , 'max' => 620 },
+ 'HAD:MAGNET:LL1708' => {'minerror' => 30, 'min' => 38, 'max' => 65, 'maxerror' => 65},
+ 'HAD:MAGNET:TP1240' => {},#{'min' => 75.5 , 'max' => 89.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:PI2610' => {},#{'min' => 1.7 , 'max' => 3.1 },
+ 'HAD:MAGNET:TP2200' => {},#{'min' => 83.0 , 'max' => 85.5 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2202' => {},#{'min' => 81.0 , 'max' => 87.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2204' => {},#{'min' => 81.0 , 'max' => 85.5 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2206' => {},#{'min' => 81.0 , 'max' => 85.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2208' => {},#{'min' => 87.0 , 'max' => 95.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2210' => {},#{'min' => 80.0 , 'max' => 85.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2212' => {},#{'min' => 82.0 , 'max' => 92.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2214' => {},#{'min' => 80.0 , 'max' => 85.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2216' => {},#{'min' => 80.0 , 'max' => 84.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2218' => {},#{'min' => 84.0 , 'max' => 90.5 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2220' => {},#{'min' => 80.0 , 'max' => 84.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2222' => {},#{'min' => 80.0 , 'max' => 86.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2224' => {},#{'min' => 81.0 , 'max' => 85.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2226' => {},#{'min' => 80.0 , 'max' => 100 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2228' => {},#{'min' => 85 , 'max' => 94.0 , 'cal_max' => 2},
+ 'HAD:MAGNET:TP2230' => {},#{'min' => 80.0 , 'max' => 85.5 , 'cal_max' => 2},
+ 'HAD:MAGNET:PI2600' => {},#{'min' => 1.65 , 'max' => 2.0 },
+ 'HAD:MAGNET:VG3000' => {},#{'min' => -6.5 , 'max' => -5.5 },
+ 'HAD:MAGNET:PI1600' => {},#{'min' => 2.94 , 'max' => 3.03 },
+ 'HAD:MAGNET:PI1602' => {},#{'min' => 1.30 , 'max' => 1.37 },
+ 'HAD:MAGNET:PI1604' => {},#{'min' => 2.7 , 'max' => 2.99 },
+ 'HAD:MAGNET:PI1612' => {},#{'min' => 0 , 'max' => 12.0 },
+ 'HAD:MAGNET:EV1100R' => {},#{'min' => 27 , 'max' => 45 },
+ 'HAD:MAGNET:EV1122R' => {},#{'min' => 55 , 'max' => 61 },
+ 'HAD:MAGNET:EV1128R' => {},#{'min' => 73 , 'max' => 88 },
+ 'HAD:MAGNET:TC1200M' => {},#{'min' => 6.5 , 'max' => 8.5 },
+ 'HAD:MAGNET:PI1600I' => {},#{'min' => 1.28 , 'max' => 1.37 },
+ 'HAD:MAGNET:MV2102X' => {},#{},
+ 'HAD:MAGNET:MV2102L' => {},#{},
+ 'HAD:MAGNET:MV2102LUX(a)' => {},#{'min' => .8 , 'max' => 8.0 },
+ 'HAD:MAGNET:MV2102U' => {},#{},
+ 'HAD:MAGNET:EV2128E' => {},#{},
+ 'HAD:MAGNET:EV2128F' => {},#{},
+ 'HAD:MAGNET:EV2128FG(a)' => {},#{},
+ 'HAD:MAGNET:EV2128G' => {},#{},
+ 'HAD:MAGNET:EV2128L' => {},#{},
+ 'HAD:MAGNET:EV2128LUX(a)' => {},#{},
+ 'HAD:MAGNET:EV2128U' => {},#{},
+ 'HAD:MAGNET:EV2128X' => {},#{},
+ 'HAD:MAGNET:HR3104(a)' => {},#{},
+ 'HAD:MAGNET:HR3108R' => {},#{},
+ 'HAD:MAGNET:MV1106R' => {},#{},
+ 'HAD:CRYO:TS105' => {'minerror' => 100, 'min' => 105, 'max' => 130 , 'maxerror' => 135 },
+ 'HAD:CRYO:TIC106' => {'minerror' => 8.5, 'min' => 8.7, 'max' => 10.2, 'maxerror' => 10.3 },
+ 'HAD:CRYO:UpdateCounter:roc' => {}#{},
);
my $fatal_error_counter = 0;
my $red_error_counter = 0;
my $yellow_error_counter = 0;
-my $interval = 60;
+my $interval = 20;
my $started = 1;
my $last_mod_time;
my $last_size;
my $ssh_fh;
foreach my $rh_val (keys %$range_list_href) {
- Perl2Epics::Connect("$rh_val", "HAD:MAGNET:$rh_val");
- #print("$rh_val HAD:MAGNET:$rh_val\n");
+ Perl2Epics::Connect("$rh_val", "$rh_val");
+ print("$rh_val $rh_val\n");
if (defined $range_list_href->{$rh_val}->{'cal_max'}) {
$range_list_href->{$rh_val}->{'max'} += $temperature_factor * $range_list_href->{$rh_val}->{'cal_max'};
}
}
-Perl2Epics::Connect("TS105", "HAD:CRYO:TS105");
-#print("TS105 HAD:CRYO:TS105\n");
-
my $callEmergency = 0;
-
while (1) {
my $fatal_error_string = "";
my $current = "OFF";
+ my $TIC106 = "";
+ my $TS105 = "";
+ my $LL1708 = "";
my $title = "Magnet";
my $value = "";
foreach my $name (keys %$range_list_href) {
my $val = $epics->{$name}->{val};
$time = $epics->{$name}->{tme} if ($epics->{$name}->{tme} < $time) or ($time == 0);
- if ($name eq 'PSUI_rbk') {
+ # print("$name $val\n");
+ if ($name eq 'HAD:MAGNET:PSUI_rbk') {
$current = $val;
+ # print("\t$name $val\n");
+ }
+ if ($name eq 'HAD:CRYO:TIC106') {
+ $TIC106 = $val;
+ # print("\t$name $val\n");
+ }
+ if ($name eq 'HAD:CRYO:TS105') {
+ $TS105 = $val;
+ # print("\t$name $val\n");
+ }
+ if ($name eq 'HAD:MAGNET:LL1708') {
+ $LL1708 = $val;
+ # print("\t$name $val\n");
}
$range_list_href->{$name}->{'value'} = $val;
if (defined $range_list_href->{$name}->{'max'} && $val > $range_list_href->{$name}->{'max'}) {
#print $yellow_error_counter . "\n";
$fatal_error_counter = $yellow_error_counter;
}
-#EPICS Loop
- my $val = $epics->{"TS105"}->{val} if $epics->{"TS105"}->{tme} != -1;
-# print Dumper $epics;
- if(defined $val && ($val < 116 || $val > 121)) {
- $red_error_counter++;
- $fatal_error_string .= " Value \"TS105\" has $val, range is 116 to 121";
- $callEmergency++;
- $fatal_error_counter=4;
- }
- elsif (defined $val) {
- $callEmergency=0;
- }
+# #EPICS Loop
+# my $val = $epics->{"TS105"}->{val} if $epics->{"TS105"}->{tme} != -1;
+# # print Dumper $epics;
+# if(defined $val && ($val < 116 || $val > 121)) {
+# $red_error_counter++;
+# $fatal_error_string .= " Value \"TS105\" has $val, range is 116 to 121";
+# $callEmergency++;
+# $fatal_error_counter=4;
+# }
+# elsif (defined $val) {
+# $callEmergency=0;
+# }
# #Make Calls
# printf "call Emergency: $callEmergency : not off: %d\n", !$QA::MagnetOff;
# if($callEmergency >= 60) {
# $callEmergency = 0;
# }
-
+
#Output
+ $value = "$current";
+ $value = "PW-ON($current)" if($current <= 6);
+ $value = "PW-OFF($current)" if($current <= 2);
+
if (!$magnet_on) {
- $fatal_error_string .= "-- MAGNET IS DEFINED TO BE OFF --"; $value = "$current";
+ $fatal_error_string .= "</br>-- MAGNET IS DEFINED TO BE OFF --</br>";
}
#print $fatal_error_string . "\n";
if ($fatal_error_counter>3) {
my $state = $magnet_on?(QA::WARN):(QA::NOTE);
QA::WriteQALog($flog,"misc","magnet",$interval+20,$state,$title,$value,$fatal_error_string);
} else {
- $longtext = "Checked at $time";
+ $longtext = "Checked at $time</br>";
+ $longtext .= "TIC106: 8.5 K < <b>$TIC106 K</b> < 10.3 K</br>";
+ $longtext .= "TS105: 100 K < <b>$TS105 K</b> < 135 K</br>";
+ $longtext .= sprintf("LL1708: 30%% < <b>%.2f%%</b> < 65%%",$LL1708);
QA::WriteQALog($flog,"misc","magnet",$interval+20,QA::OK,$title,$value,$longtext);
$last_good_time = $time;
}
my $currenterr = 0;
my $currenterrtimer = 0;
my $spikeString = "";
+my $speakString = "";
+my $speakSector = 0;
+my $speakPlane = 0;
my @errortimer = ();
###########
}
}
}
-
+
# my $logString = strftime("%Y.%m.%d %H:%M:%S",localtime())."\t";
my @mdcHvMin;
my @mdcHvMax;
my @qastate_chamber;
my $qastate = QA::OK;
my $chamberswitherror = 0;
+ my $currRound = "";
for my $p (1..4) {
for my $s (1..6) {
my $chamnum = ($p-1)*6+$s-1;
}
if(! defined $mdcHvMax[$p] || $mdcHvMax[$p] < $volt) {
$mdcHvMax[$p] = $volt;
- }
-
- if($current > 20.0 ) {
- $spikeString .= "P$p S$s F/C $i: HV = ".$volt." , I = ".$current." - ".localtime()."\n";
+ }
+ if($current > 10 ) {
+ $spikeString .= "P $p S $s F/C $i: HV = ".$volt." , I = ".$current." - ".localtime()."\n";
+ $speakPlane = $p;
+ $speakSector = $s;
$currenterr++;
}
}
my $ch_qastate = QA::OK;
my $chamberHVmin = min($data->{"$p-$s-0-V"}->{val},$data->{"$p-$s-1-V"}->{val});
-
- if($chamberHVmin < $QA::MdcNominalHV->[$p-1][$s-1] - $QA::MdcHVOffsetLimits->[$p-1][0]) {$ch_qastate = QA::WARN;}
- if($chamberHVmin < $QA::MdcNominalHV->[$p-1][$s-1] - $QA::MdcHVOffsetLimits->[$p-1][1]) {$ch_qastate = QA::WARN_2;}
- if($chamberHVmin < $QA::MdcNominalHV->[$p-1][$s-1] - $QA::MdcHVOffsetLimits->[$p-1][2]) {$ch_qastate = QA::ERROR;}
-
+
+ if($chamberHVmin < $QA::MdcNominalHV->[$p-1][$s-1] - $QA::MdcHVOffsetLimits->[$p-1][0]) {$ch_qastate = QA::WARN; Hmon::Speak('MDC',"M D C high voltage drop in Plane $p Sector $s ?;");}
+ if($chamberHVmin < $QA::MdcNominalHV->[$p-1][$s-1] - $QA::MdcHVOffsetLimits->[$p-1][1]) {$ch_qastate = QA::WARN_2; Hmon::Speak('MDC',"M D C high voltage problem in Plane $p Sector $s ");}
+ if($chamberHVmin < $QA::MdcNominalHV->[$p-1][$s-1] - $QA::MdcHVOffsetLimits->[$p-1][2]) {$ch_qastate = QA::ERROR; Hmon::Speak('MDC',"M D C high voltage Off in Plane $p Sector $s ");}
+
if ($ch_qastate >= QA::WARN_2) {
$errortimer[$chamnum]++;
$ch_qastate = QA::ERROR if $errortimer[$chamnum] > 220 ;
$errortimer[$chamnum] = 0;
}
push(@qastate_chamber,$ch_qastate);
-
+
# if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1][$s-1] + $QA::MdcHVOffsetLimits->[$p-1][0]) {$qastate = max($qastate,QA::WARN);}
# if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1][$s-1] + $QA::MdcHVOffsetLimits->[$p-1][1]) {$qastate = max($qastate,QA::WARN_2);}
# if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1][$s-1] + $QA::MdcHVOffsetLimits->[$p-1][2]) {$qastate = max($qastate,QA::ERROR);}
+ #if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1][$s-1] + $QA::MdcHVOffsetLimits->[$p-1][0]) {Hmon::Speak('MDC',"M-D-C high voltage problem \n"); }
+
}
}
min(@{$QA::MdcNominalHV->[0]}),min(@{$QA::MdcNominalHV->[1]}),min(@{$QA::MdcNominalHV->[2]}),min(@{$QA::MdcNominalHV->[3]})
);
QA::WriteQALog($flog,"hv2","mdchv",10,$qastate,"MDC HV",$value,$longtext);
+
+ Hmon::Speak('MDC',"M D C teeest");
# print Dumper $QA::MdcHVOffsetLimits;
if($currenterr > 0 ) {
$currenterrtimer++;
if( $currenterrtimer == 10 && $currenterr < 6){
- Hmon::SendEmail('c.wendisch@gsi.de',"MDC Current Spike","Currents in MDC was spiking in\n$spikeString");
- $currenterrtimer = 0;
+
+ Hmon::SendEmail('c.wendisch@gsi.de',"MDC Current Spike","Currents in MDC was spiking in\n$spikeString"); Hmon::Speak('MDC',"M D C high voltage drop in Plane ");
+ $speakString .= "Plane $speakPlane Sector $speakSector . ! ";
+ Hmon::Speak('MDC',"M D C Current Spike : M D C was sparking in $speakString?:");
+
+ $currenterrtimer = 0;
}
if ($currenterrtimer == 20 && $currenterr >= 6 ){
- Hmon::SendEmail('c.wendisch@gsi.de',"MDC OVC","Current in MDC was too high in\n$spikeString");
+
+ Hmon::SendEmail('c.wendisch@gsi.de',"MDC OVC","Current in MDC was too high in $spikeString");
+ $speakString .= "Plane $speakPlane Sector $speakSector . ";
+ if($speakPlane == 2 && $speakSector == 4 ) { $speakString .= " stay relaxed, wait and observe current to go down wihtin some minutes ! \n"; }
+ Hmon::Speak('MDC',"M D C over Current : the Current in MDC was too high in $speakString ?:");
$currenterrtimer = 0;
}
if($currenterrtimer==0) {
$currenterr = 0;
$spikeString = "";
+ $speakString = "";
}
}
- my $fh;
+ #my $fh;
# $logString .= "\n";
# open($fh, ">>",Hmon::HMONDIR."/archive/mdcCurrentslog.csv");
$timer++;
sleep(1);
+ Hmon::Speak('MDC',"M D C sleep");
}
my $presserr = 0;
my $presserrtimer = 0;
+my $H2_run = 0;
HPlot::PlotInit({
name => "VacuumLow",
entries => 1000,
type => HPlot::TYPE_HISTORY,
output => HPlot::OUT_PNG,
- titles => ["low vacuum [1E-7 mbar]"],
+ titles => ["low vacuum"],
xlabel => "Minutes",
- ylabel => "",
+ ylabel => "mbar",
sizex => 600,
sizey => 250,
ymin => "40",
entries => 1000,
type => HPlot::TYPE_HISTORY,
output => HPlot::OUT_PNG,
- titles => ["high vacuum [1E-7 mbar]",],
+ titles => ["high vacuum"],
xlabel => "Minutes",
- ylabel => "",
+ ylabel => "1E-7 mbar",
# ymin => "*<3",
# ymax => "3.4<*",
sizex => 600,
Perl2Epics::Connect("p1CO2","HAD:MDC:GAS:CO2:concentration:average");
Perl2Epics::Connect("p2CO2","HAD:MDC:GAS:CO2:concentration2:average");
-Perl2Epics::Connect("Vachigh","HAD:VAC:tpg366-1:ch4");
-Perl2Epics::Connect("Vaclow" ,"HAD:VAC:tpg366-1:ch2");
+Perl2Epics::Connect("Vachigh","HAD:VAC:tpg366-1:ch1");
+Perl2Epics::Connect("Vaclow" ,"HAD:VAC:tpg366-1:ch4");
Perl2Epics::Connect("Gate" ,"HAD:VAC:beamlineGate");
print "Connected.\n";
}
}
- HPlot::PlotAdd("VacuumLow",$data->{"Vaclow"}->{val}*1E7,0);
+ HPlot::PlotAdd("VacuumLow",$data->{"Vaclow"}->{val},0);
HPlot::PlotAdd("VacuumHigh",$data->{"Vachigh"}->{val}*1E7,0);
HPlot::PlotDraw("VacuumLow");
HPlot::PlotDraw("VacuumHigh");
$str = Hmon::MakeTitle(8,12,"Vacuum",1);
$str .= qq@<img src="%ADDPNG files/VacuumHigh.png%" type="image/png">\n@;
$str .= qq@<img src="%ADDPNG files/VacuumLow.png%" type="image/png"><br>@;
- $str .= sprintf("Low Vacuum %.2fE-7 mbar</br>",$data->{"Vaclow"}->{val}*1E7);
- $str .= sprintf("High Vacuum %.2fE-7 mbar</br>",$data->{"Vachigh"}->{val}*1E7);
- $str .= "Beamline Gate ";
-
- $str .= "OPEN" if ($data->{"Gate"}->{val}==1);
- $str .= "CLOSED" if ($data->{"Gate"}->{val}==2);
- $str .= "undefined" if ($data->{"Gate"}->{val}==0);
-
+ my $vallow = $data->{"Vaclow"}->{val};
+ my $valhigh = $data->{"Vachigh"}->{val}*1E7;
+ print("vallow = $vallow\n");
+ print("valhigh = $valhigh\n");
+ $str .= sprintf("Low Vacuum %.2f mbar</br>",$vallow);
+ $str .= sprintf("High Vacuum %.2fE-7 mbar</br>",$valhigh);
+ if($H2_run) {
+ $str .= "Beamline Gate ";
+
+ $str .= "OPEN" if ($data->{"Gate"}->{val}==1);
+ $str .= "CLOSED" if ($data->{"Gate"}->{val}==2);
+ $str .= "undefined" if ($data->{"Gate"}->{val}==0);
+ }
+ else {
+ $str .= "Beamline Gate not of interest";
+ }
$str .= Hmon::MakeFooter();
- Hmon::WriteFile("Vacuum",$str);
-
+ Hmon::WriteFile("Vacuum",$str);
my $qastat = QA::OK;
my $msg = "";
- my $longmsg = "";
- $msg = sprintf("%s / %s",QA::SciNotation($data->{"Vaclow"}->{val}*1E7),QA::SciNotation($data->{"Vachigh"}->{val}*1E7));
-
- $longmsg = sprintf("%s E-7 mbar low vacuum <br> %s E-7 high vacuum",QA::SciNotation($data->{"Vaclow"}->{val}*1E7),QA::SciNotation($data->{"Vachigh"}->{val}*1E7));
-
- if ($data->{"Gate"}->{tme}==-1) {
- $msg="ERROR";
- $longmsg.="<br>No Data";
+ my $longmsg = "";
+ if($vallow < 30 || $vallow > 110){
$qastat = QA::ERROR;
- }
- elsif ($data->{"Gate"}->{val}!=1) {
- $msg="ERROR";
- $longmsg.="<br>Valve not open";
+ $msg .= "VacLow LOLO </br>" if $vallow < 30;
+ $msg .= "VacLow HIHI </br>" if $vallow > 110;
+ $longmsg .= "VacLow LOLO </br>" if $vallow < 30;
+ $longmsg .= "VacLow HIHI </br>" if $vallow > 110;
+ }
+ if($qastat != QA::ERROR && ($vallow < 50 || $vallow > 90)){
+ $qastat = QA::WARN;
+ $msg .= "VacLow LO </br>" if $vallow < 50;
+ $msg .= "VacLow HI </br>" if $vallow > 90;
+ $longmsg .= "VacLow LO </br>" if $vallow < 50;
+ $longmsg .= "VacLow HI </br>" if $vallow > 90;
+ }
+ if($valhigh > 70){
$qastat = QA::ERROR;
- }
+ $msg .= "VacHigh HIHI </br>";
+ $longmsg .= "VacHigh HIHI </br>";
+ }
+ if($qastat != QA::ERROR && $valhigh > 7){
+ $qastat = QA::WARN if $qastat != QA::ERROR;
+ $msg .= "VacHigh HI </br>";
+ $longmsg .= "VacHigh HI </br>";
+ }
+ if($qastat == QA::OK) {
+ $msg = sprintf("%s / %s",QA::SciNotation($vallow),QA::SciNotation($valhigh));
+ }
+ $longmsg .= sprintf("low vacuum: 30 mbar << 50 mbar < <b>%s mbar</b> < 90 mbar << 110 mbar </br>",QA::SciNotation($vallow));
+ $longmsg .= sprintf("high vacuum: <b>%s mbar</b> < 7 mbar << 70 mbar </br>",QA::SciNotation($valhigh));
+
+ if($H2_run) {
+ if ($data->{"Gate"}->{tme}==-1) {
+ $msg="Gate ERROR";
+ $longmsg.="<br>No Data";
+ $qastat = QA::ERROR;
+ }
+ elsif ($data->{"Gate"}->{val}==2) {
+ $msg="Gate Closed";
+ $longmsg.="<br>Valve not open";
+ $qastat = QA::ERROR;
+ }
+ else{
+ $msg="Gate ERROR";
+ $longmsg.="<br>Valve undefined";
+ $qastat = QA::ERROR;
+ }
+ }
QA::WriteQALog($fqa, "misc", "valve", 60, $qastat, "Vacuum", $msg, $longmsg);
entries => 1200,
type => HPlot::TYPE_HISTORY,
output => HPlot::OUT_PNG,
- titles => ["Isobutan reflow ratio"],
+ titles => ["Isobutan ratio at outlet"],
xlabel => "Minute",
- ylabel => "Isobutan reflow ratio [%]",
+ ylabel => "Isobutan ratio at outlet [%]",
sizex => 400,
sizey => 180,
curves => 1,
HPlot::PlotInit($plotScale);
my $timer = 0;
+my $offset_o2 = 0;
my $str = "";
my $s = "HAD:RICH:GAS:pipePressureIsoB";
my $IsobPress = $data->{"IsoPress"}->{val};
my $IsobPressStr = sprintf("Isobutan pressure: %.2f bar",$IsobPress);
- my $IsobO2 = ($data->{"IsoO2Concentr"}->{val}/10);
- my $IsobO2Str = sprintf("O2 concentration: %.1f dppm",$IsobO2);
+ my $IsobO2 = ($data->{"IsoO2Concentr"}->{val}/10)-$offset_o2;
+ my $IsobO2Str = sprintf("O2 concentration: %.1f ppm",$IsobO2);
my $IsobRefR = $data->{"IsoRefRatio"}->{val};
my $IsobRefRStr = sprintf("Isobutan reflow ratio: %.1f %",$IsobRefR);
$qastate = QA::OK if ($IsobPress <= 2.0 && $IsobPress >= 0.9);
$qastate = QA::WARN_2 if (($IsobPress < 0.9) || ($IsobO2 >300.0) || ($IsobRefR < 70.0));
$qastate = QA::ERROR_2 if (($IsobPress > 2.0) || ($IsobPress < 0.7) || ($IsobO2 > 800.0) || ($IsobRefR < 50.0));
+ # $qastate = QA::WARN_2 if (($IsobPress < 0.9) || ($IsobO2 >300.0) || ($IsobRefR < 70.0) || ($IsobScale1 < 40) || ($IsobScale2 < 40));
+ # $qastate = QA::ERROR_2 if (($IsobPress > 2.0) || ($IsobPress < 0.7) || ($IsobO2 > 800.0) || ($IsobRefR < 50.0) || ($IsobScale1 < 37) || ($IsobScale2 < 37));
$qastate = min(QA::WARN_2,$qastate) if $QA::RichHvOff;
$qastate = QA::NOTE if $QA::RichGasOff;
cbmax => "100<*<1E5",
cbmin => 1,
noinit => 1,
- additional => "set logscale cb;set format cb \"_{10}{\%L}\"",
+# additional => "set logscale cb;set format cb \"_{10}{\%L}\"",
showvalues => 0,
});
Hmon::WriteFile("MicroSpillStructureLong",$str);
$str = Hmon::MakeTitle(5, 7, "StartMap",0);
-$str .= qq@<div style="padding-top:35px;padding-left:15px;overflow:hidden;height:500px;width:90%;text-align:center;"><img src="%ADDPNG files/StartMap.png%" type="image/png" style="transform:rotate(45deg);"></div>\n@;
+$str .= qq@<div style="padding-top:35px;padding-left:15px;overflow:hidden;max-height:400px;width:90%;text-align:center;"><img src="%ADDPNG files/StartMap.png%" type="image/png" style="transform:rotate(45deg);"></div>\n@;
$str .= Hmon::MakeFooter();
Hmon::WriteFile("StartMap",$str);
<td class="dirich" rowspan="1" colspan="3" id="0x7056"><span class="tooltiptext" id="0x7056_s">0x7056</span></td>
<td class="dirich" rowspan="1" colspan="3" id="0x7050"><span class="tooltiptext" id="0x7050_s">0x7050</span></td>
- <td class="power" rowspan="6" colspan="1" ></td>
+ <td class="power-v" rowspan="6" colspan="1" ></td>
<td class="dirich" rowspan="3" colspan="1" id="0x7150"><span class="tooltiptext" id="0x7150_s">0x7150</span></td>
<td class="dirich" rowspan="3" colspan="1" id="0x7151"><span class="tooltiptext" id="0x7151_s">0x7151</span></td>
<td class="dirich" rowspan="3" colspan="1" id="0x7250"><span class="tooltiptext" id="0x7250_s">0x7250</span></td>
<td class="dirich" rowspan="3" colspan="1" id="0x7351"><span class="tooltiptext" id="0x7351_s">0x7351</span></td>
<td class="combiner-v" id="0x8242" rowspan="6" colspan="2"><span class="tooltiptext" id="0x8242_s">0x8242</span></td><!-- Combiner -->
- <td class="power" rowspan="6" colspan="1" ></td>
+ <td class="power-v" rowspan="6" colspan="1" ></td>
<td class="dirich" rowspan="3" colspan="1" id="0x7450"><span class="tooltiptext" id="0x7450_s">0x7450</span></td>
<td class="dirich" rowspan="3" colspan="1" id="0x7451"><span class="tooltiptext" id="0x7451_s">0x7451</span></td>
<td class="dirich" rowspan="3" colspan="1" id="0x7550"><span class="tooltiptext" id="0x7550_s">0x7550</span></td>
use QA;
my $inhibit = 0;
-$SIG{USR1} = sub { $inhibit = 1; };
-$SIG{USR2} = sub { $inhibit = 0; system("killall larynx");}; #system("espeak -ven-male2 -s 130 -g 1 \"Speech daemon is online\" 2>/dev/null");
+$SIG{USR1} = sub { $inhibit = 1; }; #system("killall larynx");};
+$SIG{USR2} = sub { $inhibit = 0; }; #system("espeak -ven-male2 -s 130 -g 1 \"Speech daemon is online\" 2>/dev/null");
# my $fq = QA::OpenQAFile();
-my $cmd = "ssh hades33 /home/hadaq/trbsoft/daq/hmon/hmon_tail -n 0 -F /home/hadaq/trbsoft/hadesdaq/hmon/files/speaklog_mdc";
+my $cmd = "LANG=en_US.UTF-8 ssh hadesp33 /home/hadaq/trbsoft/daq/hmon/hmon_tail -n 0 -F /home/hadaq/trbsoft/hadesdaq/hmon/files/speaklog_mdc";
# my $fq = "remote";
# my $cmd = "./hmon_ssh -T $QA::QAServer \"tail -n 0 -F /home/hadaq/trbsoft/daq/tools/hmon/files/speaklog\" </dev/null";
# system("espeak -s120 -p 90 \"$a\" 2>/dev/null");
-# if($f) {
- my $fn = "larynx -v southern_english_male --length-scale 1.2 --interactive 2>&1";
+#while(1) {
+ my $fn = "LANG=en_US.UTF-8 larynx -v southern_english_female --length-scale 1 --interactive 2>&1";
open my $fh, "|$fn" or die "error: no larynx";
$fh->autoflush(1);
open(FTRB, "$cmd|");
while(my $a = <FTRB>) {
if ($inhibit == 0) {
- print $fh $a ;
+ print $fh ": ".$a ;
+ sleep 3;
}
}
}
#pkill -f "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/pics"
fusermount -u qa
-timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/feb24/pics `pwd`/qa"
+timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp67:/home/hades-qa/online/5.34.38/feb24/pics `pwd`/qa"
fusermount -u vertex
-timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/feb24/vertex/pics `pwd`/vertex"
+timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp67:/home/hades-qa/online/5.34.38/feb24/vertex/pics `pwd`/vertex"
#pkill -f "sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal"
fusermount -u calibration
#ssh hadesp57 'cd /home/hadaq/trbsoft/daq/hmon/; PERL5LIB=. ./speakdaemon.pl 1>/dev/null 2>>/home/hadaq/trbsoft/hadesdaq/hmon/logs/perlerror_speakdaemon' &
-ssh hadesp33 'cd /home/hadaq/trbsoft/daq/hmon/; PERL5LIB=. ./speakdaemon.pl 1>/dev/null 2>>/home/hadaq/trbsoft/hadesdaq/hmon/logs/perlerror_speakdaemon' &
+ssh hadesp33 'cd /home/hadaq/trbsoft/daq/hmon/; PERL5LIB=. ./speakdaemon.pl 1>/dev/null 2>>/home/hadaq/trbsoft/hadesdaq/hmon/logs/perlerror_speakdaemon' &
ssh hadesp33 'cd /home/hadaq/trbsoft/daq/hmon/; PULSE_SINK=Virtual1 PERL5LIB=. ./speakdaemon_mdc.pl 1>/dev/null 2>>/home/hadaq/trbsoft/hadesdaq/hmon/logs/perlerror_speakdaemon_mdc' &
sleep 1;
/*box-shadow:1px 1px 4px 4px #eee;/*, inset 3px 3px 3px 3px #eee, inset -3px -3px 3px 3px #eee;*/
border-radius: 5px 5px 5px 5px;
background:#fff;
- overflow-y:hidden;
+ .overflow-y:hidden;
}
}
-.textbox, #logbox, table.data {
+.textbox, body>div>div#logbox {
margin:auto;
background:white;
font-family: monospace;
text-align:left;
- overflow-y:scroll;
+ overflow-y:scroll !important;
overflow-x:hidden;
}
text-align:right;
}
-table.logfile tr>td {
+table.logfile tr>td, #logbox table.data tr>td {
width:150px;
vertical-align:top;
}
-table.logfile td+td {
+table.logfile td+td, #logbox table.data td+td{
width:100px;
}
-table.logfile td+td+td {
+table.logfile td+td+td, #logbox table.data td:nth-child(6) {
width:1000px;
font-family:monospace;
}
-table.logfile {
+table.logfile, #logbox table.data {
width:100%;
font-size:12px;
font-family:sans-serif;
}
-.greenbutton, .redbutton {
+.greenbutton, .darkgreenbutton, .redbutton, .yellowbutton, .graybutton {
width: 20px;
height:20px;
border-radius:10px;
- margin:5px 0px 5px 30px;
+ margin:5px 0px 5px 10px;
}
.greenbutton {
- background:green;
+ background:#4f4;
}
+.darkgreenbutton {
+ background:#282;
+}
+
+.yellowbutton {
+ background:yellow;
+}
+.graybutton {
+ background:#99c;
+}
.redbutton {
background:red;
}
+.inline {
+ display:inline-block;
+ vertical-align:middle;
+ padding-right:10px;
+ margin-right:10px;
+}
+
+.expertlist {
+ font-size:150%;
+ width:100%;
+}
+
+.expertlist td:nth-child(3) {
+ text-align:left;
+}
+
+.expertlist span:nth-child(odd of span){
+ display:inline-block;
+ width: 50px;
+ text-align:left;
+ }
+.expertlist tr:nth-child(even of tr){
+ background:#eee;
+ }
+.expertlist tr:nth-child(odd of tr){
+ background:#ddd;
+ }
+/*.expertlist td:nth-child(3){
+ width:150px;
+ margin:0;
+ padding:0;
+ }*/
+.expertlist td:nth-child(2){
+ width:50px;
+ margin:0;
+ padding:0;
+ }
+.expertlist td:nth-child(1){
+ width:80px;
+ margin:0;
+ padding:0;
+ }
+
+.redbutton ~ span {
+ color:#aaa;
+}
+
+
table.status td {
text-align:center;
}