]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
update hmon scripts
authorhadaq <jan@lxhadeb07>
Mon, 12 Aug 2024 13:53:00 +0000 (15:53 +0200)
committerhadaq <jan@lxhadeb07>
Mon, 12 Aug 2024 13:53:00 +0000 (15:53 +0200)
38 files changed:
hmon/QA.pm
hmon/doc/misc-magnet.htt
hmon/doc/misc-seu.htt
hmon/doc/misc2-tdctot.htt
hmon/hmon_cosmic_alarms.pl [deleted file]
hmon/hmon_endpoints.pl
hmon/hmon_fwrate.pl
hmon/hmon_ipcheck.pl [changed mode: 0755->0644]
hmon/hmon_itofrate.pl
hmon/hmon_lvl1mismatch_autorestart.pl
hmon/hmon_richrate.pl
hmon/hmon_rpcrate.pl
hmon/hmon_rpctof_sectorwise_highres.pl
hmon/hmon_seu.pl
hmon/hmon_spill.pl
hmon/hmon_startratesimple.pl
hmon/hmon_timeout.pl
hmon/hmon_tofrate.pl
hmon/hmon_veto.pl
hmon/hmon_waterfall.pl
hmon/index.cgi
hmon/monitor.cgi
hmon/permanent/Perl2Epics2.pm [new symlink]
hmon/permanent/hmon_beamabort.pl
hmon/permanent/hmon_eb_missing_data.pl
hmon/permanent/hmon_eb_run.pl
hmon/permanent/hmon_expertsoncall.pl
hmon/permanent/hmon_logbook.pl
hmon/permanent/hmon_magnet.pl
hmon/permanent/hmon_mdcpressure.pl
hmon/permanent/hmon_qa.pl
hmon/permanent/hmon_richIsobutan.pl
hmon/permanent/hmon_rpchv.pl
hmon/permanent/hmon_spillmon.pl
hmon/permanent/hmon_tofhv.pl
hmon/qawindows/emc-main.htm
hmon/qawindows/mdcexpert-mb.htm
hmon/styles.css

index afc62c17ac9ba0608d8106e00460c2870c60525d..d12798b10415ebedbf54417485df13fb2d884716 100644 (file)
@@ -48,8 +48,8 @@ our $entries->{'cats'} = ["main",
 $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','','pt8'];
-$entries->{'server'}  = ['fill', 'cpu', 'ip', 'ebinputs', 'onlineqa']; #icinga, pwrsup
+$entries->{'rate'}    = ['pt1','pt2','pt3','pt8','veto'];
+$entries->{'server'}  = ['fill', 'cpu', '', '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'];
@@ -96,10 +96,10 @@ our @RichInnerTempLimits = (37.5,38.5,39);
 our @TrgErrLimits     = (100, 1000, 10000);
 our @CPULimits        = (95, 100, 100);
 our @TimeoutLimits    = (0, 0, 1);
-our @TimeoutLimitsOnlyRICHMDC = (1, 5, 10);
+our @TimeoutLimitsOnlyRICHMDC = (4, 6, 10);
 our @LinkErrLimits     = (50, 500, 1000);
 our @MdcEndpMissingLimits   =  (4, 5, 6);  #(0, 4, 5)!!! Oh dear.
-our @RichEndpMissingLimits   = (0, 3, 4);
+our @RichEndpMissingLimits   = (1, 3, 4);
 our @TofEndpMissingLimits   = (0, 0, 0);
 our @RpcEndpMissingLimits   = (0, 0, 0);
 our @OtherEndpMissingLimits   = (0, 0, 0);
@@ -140,7 +140,7 @@ our $PadiwaHodoNumber = 2;
 our @PadiwaHodoLimits    = (0, 0, 0);
 
 our @LimitTriggerPerSpill = (1000, 0, 0);
-our $AcceleratorCycle = 9;
+our $AcceleratorCycle = 20;
 use constant {CTSAddress => 0x0003};
 
 ###############################################################################
@@ -165,7 +165,7 @@ our $QAServerOff = 0;
 #  Missing Boards
 ###############################################################################
 
-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_boards_removed =(); # 2333 added 2024-03-01 #(0x2203, 0x2027, 0x2057); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23
 our @mdc_chambers_removed =();
 our @rich_boards_removed =();#(0x71a4,0x71a5,0x71b4,0x71b5,0x72a4,0x72a5,0x72b4,0x72b5,0x73a4,0x73a5,0x73b4,0x73b5,0x826a);
 our @tof_boards_removed =();
@@ -341,6 +341,30 @@ sub SciNotation {
     }
 }
 
+# Tries to nicely format an integer
+sub SciNotation2 {
+  my $v = shift;
+  return "undef" if (!defined $v);
+  return "0" if $v == 0;
+#   print $v."\n";
+  if(abs($v) >= 1) {
+    return  sprintf("%.1f", $v) if (abs($v) < 10) ;
+    return  sprintf("%i", $v) if (abs($v) < 1000) ;
+    return  sprintf("%.1f&times;10<sup>3</sup>", $v / 1000.) if (abs($v) < 20000) ;
+    return  sprintf("%i&times;10<sup>3</sup>", $v / 1000.) if (abs($v) < 1E6) ;
+    return  sprintf("%.1f&times;10<sup>6</sup>", $v / 1000000.) if (abs($v) < 20E6) ;
+    return  sprintf("%i&times;10<sup>6</sup>", $v / 1000000.) if (abs($v) < 1E9) ;
+    return  sprintf("%.2f&times;10<sup>9</sup>", $v / 1E9) if (abs($v) < 20E9) ;
+    return  sprintf("%.1f&times;10<sup>9</sup>", $v / 1E9) if (abs($v) < 100E9) ;
+    return  sprintf("%i",$v);
+    }
+  else {
+    return sprintf("%i&times;10<sup>-9</sup>", $v*1E9) if (abs($v) < 1E-6) ;
+    return sprintf("%i&times;10<sup>-6</sup>", $v*1E6) if (abs($v) < 1E-3) ;
+    return sprintf("%.1f&times;10<sup>-3</sup>", $v*1E3);
+    }
+}
+
 ############################################
 # A simple date string
 sub getTimeString {
index 1f4785c98d79508f7852242a2100e8b14c36679c..20ef0b3f2babc7b95922eb180c366aff23c6dfd2 100644 (file)
@@ -6,7 +6,7 @@ This button shows the status of the Magnet system.
 <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>Call <b>Torsten Heinz</b> (mobile: 0176 579 39435 or home: 06162 982292 or work: 1818<br>
 
 
 
index 71d4b69ad5caf512dc616d7160d368138419ca94..bcf8de758e73537d1ad80efd6aa66cb3015959ab 100644 (file)
@@ -6,9 +6,11 @@ front-ends (the most exposed systems!) can be included here.
 
 
 <h4>Error Handling</h4>
+There's no need to react immediately, but some steps should be taken whenever the next
+DAQ restart is needed.
+Doing so before an actual failure of a board is always simpler and quicker. 
 
-The full message contains the addresses of affected boards - consider rebooting the
-coresponding subsystem at your convenience. Doing so before an actual failure of
-the board is always simpler and quicker.
+<p>Suggestion: Use reboot "Quite-a-lot" first, and then see if any reported errors remain.
+<p>The full message contains the addresses of affected boards - consider rebooting the
+coresponding subsystem at your convenience. 
 
-<br>If many RICH Combiner boards show up, do a reboot RICH and reboot RICH combiners before the next DAQ restart.
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2a28d293cedc9db6bef35e0ff1cf5b89faca2baa 100644 (file)
@@ -0,0 +1,8 @@
+<h3>TDC Monitoring</h3>
+Checks the correct order of data words in TDCs. This sometimes can get corrupted with the "wrong" kind of noise from the detector.
+
+<h4>Error Handling</h4>
+Problems in ECal should be automatically corrected within one minute.<br>
+For other subsystems, check if there is noise in the reported channels, discuss with detector experts.
+<p>If the problem does not vanish, try a reboot of the sub-system with the next DAQ restart. Few errors are acceptable and don't need immediate action.
+
diff --git a/hmon/hmon_cosmic_alarms.pl b/hmon/hmon_cosmic_alarms.pl
deleted file mode 100644 (file)
index 57776cb..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/usr/bin/perl
-
-use warnings;
-use strict;
-use Data::Dumper;
-use HADES::TrbNet;
-use List::Util qw[min max];
-use Email::Sender::Simple qw(sendmail);
-use Email::Simple;
-use Email::Simple::Creator;
-
-use Log::Log4perl qw(get_logger);
-
-################################
-# To disable script: just uncomment
-# the following line with "exit"
-################################
-exit;
-################################
-
-
-my $HADESDAQ="/home/hadaq/trbsoft/hadesdaq/";
-
-Log::Log4perl::init($HADESDAQ . "hmon/automatic_restart_logger.conf");
-my $logger = get_logger("automatic_restart");
-
-$logger->info("startup");
-
-print STDERR "restarted. The log file is here: 
-/home/hadaq/trbsoft/hadesdaq/hmon/logs/automatic_restart.log
-";
-
-trb_init_ports() or die trb_strerror();
-
-my $mail_fn = $HADESDAQ . "main/alarm_mail_list.txt";
-
-my $number_of_reset_retries = 4;
-
-my $num_of_entries = 10; # loop 10 times and build average
-
-# number of MDC OEPs which are allowed to be misssing before alarm
-my $max_allowed_mdc_oeps_missing = 1;
-
-# minimal average DAQ rate allowed before an alarm
-my $lower_rate_limit = 150;
-my $upper_rate_limit = 450;
-
-
-my $beep_intervall = 10;
-my $mail_intervall = 600;
-
-my $rh_data = {};
-
-my $fh;
-
-open ($fh, "<", "/tmp/mdc_number_missing_boards") || die "could not open /tmp/mdc_number_missing_boards";
-$fh->autoflush(1);
-
-
-my $time_last_beep_alarm=0;
-my $time_last_mail_alarm=0;
-
-my $CURRENT_STATE = "idle";
-my $NEXT_STATE = "idle";
-my $reset_counter = 0;
-my $iterator = 0;
-while (1) {
-
- STATE_SWITCH:
-  for ($CURRENT_STATE) {
-    if (/idle/) {
-      last STATE_SWITCH;
-    }
-    if (/error/) {
-      last STATE_SWITCH;
-    }
-    if (/reset/) {
-      if ($reset_counter < $number_of_reset_retries
-          && $iterator >= $num_of_entries) {
-        $reset_counter++;
-        $logger->debug("doing a reset now: number of resets: $reset_counter");
-        my $c = q|echo "<div style='position:absolute;top:5px;left:15px;color:red;font-weight:bold;z-index:100'>Doing an automatic TrbNet reset</div>" > ~/trbsoft/hadesdaq/hmon/files/note.htt; ssh lxhadesdaqp 'cd ~/trbsoft/daq/main; ./startup_briccolage.sh dont_restart_monitoring'; rm ~/trbsoft/hadesdaq/hmon/files/note.htt|;
-        #print STDERR localtime() . ": command: $c\n";
-        qx($c);
-        $c=q|ssh lxhadesdaqp '/usr/bin/wget  -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt "http://lxhadeb12:8099/Master/BNET/StartRun/execute?prefix=co&oninit=10"'|;
-        #print STDERR localtime() . ": command: $c\n";
-        qx($c);
-        $iterator = 0;
-        @{$rh_data->{'rates'}} =();
-        last STATE_SWITCH;
-      }
-    }
-  }
-
-  my $daq_rate;
-
-  my $rh_rate = trb_register_read(0x0003, 0xa001) or sleep 5 and next;
-
-  if ( !defined $rh_rate) {
-    $daq_rate = 0;
-  }
-  else {
-    $daq_rate = $rh_rate->{0x0003} & 0xfffff; # only 20bits
-  }
-
-  #print STDERR "daq_rate: $daq_rate\n";
-  push(@{$rh_data->{'rates'}}, $daq_rate);
-  $iterator++;
-  my $num_datapoints = scalar @{$rh_data->{'rates'}};
-  #print STDERR "iterator: $iterator: num_data_points: $num_datapoints\n";
-  if ($iterator >= $num_of_entries) {
-    shift @{$rh_data->{'rates'}};
-  }
-
-  my $sum = 0;
-  foreach (@{$rh_data->{'rates'}}) {
-    $sum += $_;
-  }
-  my $average_rate = $sum / $num_of_entries;
-  #print STDERR "average_rate: $average_rate\n";
-  seek($fh, 0, 0);
-  my $num_mdc_missing = <$fh>;
-  chomp $num_mdc_missing;
-
-  my $state_string = "num missing: $num_mdc_missing , average_rate: $average_rate";
-  #print "state_string: $state\n";
-
-  if($iterator >= $num_of_entries ) {
-    # ($average_rate > $upper_rate_limit) ||
-    if ( ($average_rate < $lower_rate_limit) ||
-          ($num_mdc_missing > $max_allowed_mdc_oeps_missing) ) {
-      my $time = time();
-      $logger->debug("going to state in_error: average_rate: $average_rate, mdc_missing: $num_mdc_missing, iterator: $iterator\n");
-      $NEXT_STATE = "reset";
-      if ($time - $time_last_beep_alarm > $beep_intervall) {
-        $time_last_beep_alarm=$time;
-        $logger->debug("beep: state: $state_string");
-        my $c;
-        $c = q|ssh -X hadesp30 'DISPLAY=:1 xterm -iconic  -e bash -c "~/bin/bell;"' &|;
-        print "command: $c\n";
-        qx($c);
-
-        $c = "mpv --audio-device=auto ~/Documents/foghorn-daniel_simon.mp3 >/dev/null 2>/dev/null </dev/null &";
-        qx($c);
-      }
-
-
-      if ( ($time - $time_last_mail_alarm) > $mail_intervall && $reset_counter >= $number_of_reset_retries) {
-
-        $time_last_mail_alarm = $time;
-
-        my $mail_fh;
-        open ($mail_fh, "<", "$mail_fn") || print "could not open file: $mail_fn\n";
-
-        my @mails = <$mail_fh>;
-        $mail_fh->close;
-        chomp @mails;
-        foreach my $cur_mail (@mails) {
-
-          next if($cur_mail=~/^#/ || $cur_mail=~/^\s+/ || $cur_mail=~/^\n/);
-          next unless $cur_mail=~/\w+@\w+/;
-          $logger->debug("current mail sent to: $cur_mail" );
-          my $reset_counter_str = $reset_counter;
-          my $email = Email::Simple->create(
-                                            header => [
-                                                       To      => "$cur_mail",
-                                                       From    => '"HADES DAQ" <hades33@gsi.de>',
-                                                       Subject => 'Alarm during cosmic data-taking',
-                                                      ],
-                                            body => "Error Condition:
-- MDC-missing-OEPs: $num_mdc_missing
-- average DAQ-rate: $average_rate
-  - lower_limit: $lower_rate_limit: upper_limit: $upper_rate_limit
-  - if it is outside the limits it might be due to some issue in the RPC.
-- number of resets already tried: $reset_counter_str
-",
-                                           );
-
-          sendmail($email)  or $logger->error("error sending mail to $cur_mail");
-
-        } # loop over mail addresses
-
-      }                         # if mail intervall
-
-    }  # error condition
-    else {
-      if($CURRENT_STATE eq "reset") {
-        $NEXT_STATE = "idle";
-        $reset_counter=0;
-        $iterator = 0;
-        @{$rh_data->{'rates'}} =();
-        $logger->info("leaving error state after $reset_counter number of resets: state: $state_string");
-      }
-    }
-
-
-    if($iterator%60==0) {
-      $logger->debug("still alive signal: $state_string, state: $CURRENT_STATE, iterator: $iterator");
-    }
-
-  }                # only if iterator is large enough make error meesages.
-
-  sleep 1;
-  $CURRENT_STATE = $NEXT_STATE;
-} #endless loop
-
-
-
index e68f411e8aa1e08dfef47258e07225660b7cf4bb..ae14682aad829e8d2a491a8a9fb9b5d3d8795691 100755 (executable)
@@ -385,7 +385,7 @@ while(1) {
 
     
     $qastate = QA::GetQAState('below',$num_rich_missing,@QA::RichEndpMissingLimits);
-    $qastate = QA::NOTE if $num_rich_missing > 900;
+    $qastate = QA::NOTE if $num_rich_missing > 900;
     if($qastate > 60) {
       system("logger -p local1.info -t DAQ Endp \\<E\\> $rich_longtext") unless (($timecnt->{rich}++)%$loggerperiod);
       }    
index 2c19d7691eabdc6eaef38ac34490bac3abba01ae..25cc1340c877b2bc4172103068813bad6b5575ce 100755 (executable)
@@ -22,9 +22,9 @@ my @x = (0,16,17,18,19,20,21,22,23,24,25,26,27,16,17,18,19,20,21,22,23,24,25,26,
 my @y = (0,
 16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,12,12,12,12,12,12,12,12,12,12,14,14,14,14,14,14,14,14,14,14,16,16,16,16,18,18,18,18,20,20,20,20,22,22,22,22,24,24,24,24,26,26,26,26,28,28,28,28,28,28,28,28,28,28,30,30,30,30,30,30,30,30,30,30,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,8,8,8,8,8,8,8,8,8,8,8,12,12,12,12,12,12,16,16,16,16,16,16,20,20,20,20,20,20,24,24,24,24,24,24,28,28,28,28,28,28,32,32,32,32,32,32,32,32,32,32,32,36,36,36,36,36,36,36,36,36,36,36,40,40,40,40,40,40,40,40,40);
 
-my @bo = (0,0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6723, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6723, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6700, 0x6723, 0x6700, 0x6700, 0x6700, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6723, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6720, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6701, 0x6702, 0x0000, 0x0000, 0x6702, 0x6720, 0x6702, 0x6723, 0x6723, 0x6723, 0x6723, 0x6702, 0x6702, 0x6702, 0x0000, 0x0000, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6702, 0x6703, 0x6703, 0x6703, 0x6703, 0x6722, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6703, 0x6723, 0x6723, 0x6723, 0x6723, 0x6703, 0x6703, 0x6703, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6723, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6710, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6711, 0x6712, 0x6712, 0x6712, 0x6712, 0x6723, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x0000, 0x0000, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x0000, 0x0000, 0x0000, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x6712, 0x0000, 0x6712, 0x6712, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6713, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x6720, 0x0000, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x0000, 0x0000, 0x0000, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x6722, 0x0000, 0x0000);
+my @bo = (0,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6723,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6723,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6700,0x6723,0x6700,0x6700,0x6700,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6723,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6720,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6701,0x6702,0x0000,0x0000,0x6702,0x6720,0x6702,0x6723,0x6723,0x6723,0x6723,0x6702,0x6702,0x6702,0x0000,0x0000,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6702,0x6703,0x6703,0x6703,0x6703,0x6722,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6703,0x6723,0x6723,0x6723,0x6723,0x6703,0x6703,0x6703,0x6710,0x6710,0x6710,0x6710,0x6710,0x6723,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6710,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6711,0x6712,0x6712,0x6712,0x6712,0x6723,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x0000,0x0000,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x0000,0x0000,0x0000,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x6712,0x0000,0x6712,0x6712,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6713,0x6722,0x6722,0x6722,0x6722,0x6722,0x6722,0x6722,0x6722,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x6720,0x0000,0x6722,0x6722,0x6722,0x6722,0x6722,0x6722,0x6722,0x6722,0x6722,0x0000,0x0000,0x0000,0x6722,0x6722,0x6722,0x6722,0x6722,0x6722,0x6722,0x0000,0x0000);
 
-my @ch = (0,2,3,4,5,6,7,8,9,10,26,12,13,14,15,16,17,18,19,20,30,22,23,24,25,26,27,28,28,30,31,32,1,2,3,4,5,6,27,8,9,10,11,12,13,14,15,16,24,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,1,0,0,2,31,4,29,13,14,15,9,10,11,0,0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,1,2,3,4,16,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,9,10,11,12,30,31,32,1,2,3,4,5,31,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,1,2,3,4,32,6,7,8,9,10,11,12,13,14,0,0,15,16,17,18,19,20,21,0,0,0,22,23,24,25,26,27,28,29,30,0,31,32,1,2,3,4,5,6,8,10,11,13,14,15,17,18,19,20,21,22,17,18,19,20,21,22,23,24,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,32,0,1,2,3,4,5,6,7,8,9,0,0,0,10,11,12,13,14,15,32,0,0);
+my @ch = (0,1,2,3,4,5,6,7,8,9,10,26,12,13,14,15,16,17,18,19,20,30,22,23,24,25,26,27,28,28,30,31,32,1,2,3,4,5,6,27,8,9,10,11,12,13,14,15,16,24,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,1,0,0,2,31,4,29,13,14,15,9,10,11,0,0,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,1,2,3,4,16,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,9,10,11,12,30,31,32,1,2,3,4,5,31,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,1,2,3,4,32,6,7,8,9,10,11,12,13,14,0,0,15,16,17,18,19,20,21,0,0,0,22,23,24,25,26,27,28,29,30,0,31,32,1,2,3,4,5,6,8,10,11,13,14,15,17,18,19,20,21,22,17,18,19,20,21,22,23,24,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,32,0,1,2,3,4,5,6,7,8,9,0,0,0,10,11,12,13,14,15,32,0,0);
 
 HPlot::PlotInit({
     name    => "FwRate",
@@ -119,15 +119,15 @@ while(1) {
   my $o = trb_register_read_mem(0xfe47,0xdfc0,0,32) or die trb_strerror() or sleep 5 and next;
 
   if (defined $old) {
-    my $tdiff = (time() - $oldtime)|1;
+    my $tdiff = (time() - $oldtime)||1;
     foreach my $b (keys %$o) {
       #my $ratesum = 0;
       next unless ($b>=0x6700 && $b<=0x67ff);
 
       for my $v (0..31) {
-        my $vdiff = ($o->{$b}->[$v]&0xfffffff) - ($old->{$b}->[$v]&0xfffffff);
+        my $vdiff = ($o->{$b}->[$v]&0xffffff) - ($old->{$b}->[$v]&0xffffff);
         
-        if ($vdiff < 0) { $vdiff += 2**28;}
+        if ($vdiff < 0) { $vdiff += 2**24;}
         $diff->{$b}->[$v] = $vdiff/$tdiff;
 
         HPlot::PlotFill('FwRateSimple',$diff->{$b}->[$v],$v,($b%4)+((($b>>4)%4)*4-($b>=0x6722?1:0)));
old mode 100755 (executable)
new mode 100644 (file)
index c186fd3..5176371
@@ -81,7 +81,7 @@ while(1) {
     if($err) {
       $errorcnt++;
       $longstatus .= "Hub $b ($det) not reached<br>";
-      print $longstatus."\n";
+      print $longstatus."\n";
       $qastate = QA::ERROR;
       }      
     }
index 08f7610f98673b25e041a1294a8d000ac2e7c1cb..0ec848f44c8846172ad51b069c9aa30a04ffb0a4 100644 (file)
@@ -92,7 +92,7 @@ while(1) {
   #my $min = 5E9;
   
   my $o = trb_register_read_mem(0xfe74,0xdfc0,0,48) or die trb_strerror() or sleep 5 and next;
-  my $tdiff = (time() - $oldtime)|1;
+  my $tdiff = (time() - $oldtime)||1;
 
   if (defined $old) {
     foreach my $board (keys %$o) {
index 90149037044d8bfbce4445b4c15715017a09cd0f..ccd1eb7bfc04b3e37a14104632f2c223e357cda3 100755 (executable)
@@ -42,6 +42,7 @@ while(1){
         $cnt--;
         $msg .= "->AR";
         $cnt2++;
+        system("logger -p local1.info -t DAQ 'RICH <I> Re-Included DiRich to DAQ: $msg'");
       }
     }
   }
index c65cd193789dcdf4d9315127fab027cc39244606..96fcdfd8cb11f54e4ba85ab77a7ae78c52746bdf 100755 (executable)
@@ -141,7 +141,7 @@ while(1) {
   my $o = trb_register_read_mem(0xfe51,0xc000,0,33) or die trb_strerror() or sleep 5 and next;
 
   if (defined $old) {
-    my $tdiff = (time() - $oldtime)|1;
+    my $tdiff = (time() - $oldtime)||1;
     foreach my $b (keys %$o) {
       #my $ratesum = 0;
       my $sec  = ($b>>1) & 0x3;
index 6564092ba793d6b4fe1874f1e916d3d45343341f..1f1be21d18ee7a0195b08cb57b00c89e5196041a 100755 (executable)
@@ -76,7 +76,7 @@ while(1) {
   my $o = trb_register_read_mem(0xfe73,0xdfc0,0,48) or die trb_strerror() or sleep 5 and next;
 
   if (defined $old) {
-    my $tdiff = (time() - $oldtime)|1;
+    my $tdiff = (time() - $oldtime)||1;
     foreach my $b (keys %$o) {
       #my $ratesum = 0;
       next unless ($b>=0x5800 && $b<=0x58ff);
index 033b495100920bc50294905b29eb0393b7b5f063..fa2a0511d91fe25aebd46d18bae7ab0423588999 100755 (executable)
@@ -23,13 +23,14 @@ HPlot::PlotInit({
   sizex   => 950,
   sizey   => 330,
   xmin    => 0,
-  curvewidth  => .9,  
-  xmax    => 2000,  
+                 ymin    => 0,
+  curvewidth  => .9,
+  xmax    => 2000,
 #   nokey   => 1,
   buffer  => 1,
-  storable=> 1
+  storable=> 1
   }
-  );  
+  );
   
 my  $str = Hmon::MakeTitle(12,7,"RpcTofSectorRate_highres",0);
   $str .= qq@<img src="%ADDPNG files/RpcTofSectorRateHist_highres.png%" type="image/png">@;
@@ -49,7 +50,7 @@ my $diff;
   
 while (1) {
   $iter++;
-  
+
   my $rpc = trb_registertime_read(0xfe61,0xdfe6);  
   my $tof = trb_registertime_read(0xfe40,0xdfd3);
 
@@ -62,7 +63,9 @@ while (1) {
       $vdiff += 2**24 if ($vdiff < 0);
       $diff->{$b} = $vdiff/$tdiff;
       if ($b >= 0x84c0 && $b <= 0x84c5) {
+        #print Dumper $diff->{$b}, $b&0xF;
         HPlot::PlotAdd( 'RpcTofSectorRateHist',$diff->{$b},$b&0xF);
+        #HPlot::PlotAdd( 'RpcTofSectorRateHist', 100);
         }
       }  
     foreach my $b (keys %$tof) {
@@ -73,6 +76,7 @@ while (1) {
       $vdiff += 2**24 if ($vdiff < 0);
       $diff->{$b} = $vdiff/$tdiff;
       if ($b >= 0x86c0 && $b <= 0x86c5) {
+        #print Dumper $diff->{$b}, ($b&0xF)+6;
         HPlot::PlotAdd( 'RpcTofSectorRateHist',$diff->{$b},($b&0xF)+6);
         }      
       }
@@ -82,6 +86,7 @@ while (1) {
   $oldtof = $tof;
   
   HPlot::PlotDrawFork('RpcTofSectorRateHist') if $iter == 10;
+  #HPlot::PlotDrawFork('RpcTofSectorRateHist');
   $iter = 0 if $iter == 10;
   usleep(100000);
   }
index 9365735160e5444db15de6b1d089b75bb02b8cf5..5b24f07294ebe0067b0b9cdfc509c52584873163 100755 (executable)
@@ -57,7 +57,8 @@ while(1) {
   $longtext = "$seuboards out of $totalboards monitored report some radiation issues<br>";  
   $longtext .= sprintf("%04x (%s)<br>",$_,Hmon::getsystem($_)) for sort @boards;
   
-  if($seuboards >= 12) {
+  if($seuboards >= 8) {
+    $longtext .= "<br>Quite many boards seem to be affected by radiation. It's suggested to reboot \"Quite-a-lot\" before the next DAQ restart.";
     $qastate = QA::WARN;
     }
   if($seuboards >= 16) {
index f92fac20cc317033e6646d303a4aeaf69c1932c5..e7b32918c0ec5f7cb930ace49f45018bb538a754 100755 (executable)
@@ -106,7 +106,6 @@ while (1) {
        my $qashort;
        my $qalong;
        
-       
 
        if (!$spillsignal && $lastspillsignal) {
            $spillcount++;
@@ -135,7 +134,13 @@ while (1) {
                           $qashort, $qalong) unless $opt_debug>0;
             HPlot::PlotAdd("EvtsPerSpill",$events/1E3) unless $opt_debug>0;
             HPlot::PlotDraw("EvtsPerSpill")  unless $opt_debug>0;
-           $events = 0;
+                       if(($events < $QA::LimitTriggerPerSpill[0] && $qastate > QA::OK)) {
+        my $prefix = get ($url_prefix);
+                               Hmon::Speak('nobeam', "No beam") if ($prefix =~ 'be');
+                               }
+
+            
+                       $events = 0;
            $spilllength = 0;
        } elsif ($spilllength > 30) {
               QA::WriteQALog($fqa, "trg", "spill", 30, QA::NOTE, "Spill Sum",
@@ -182,7 +187,7 @@ if ($iter%2) {
                       $qashort, $qalong) unless $opt_debug>0;
 }
         my $spillcountstate = QA::OK;
-        if ($countnochange > 50) {
+        if ($countnochange > $QA::AcceleratorCycle * 4) { #double normal duration
           $spillcountstate = QA::WARN;
 #           my $prefix = get ($url_prefix);
 #           $prefix = "--" unless defined $prefix;            
index b3e2bf6a212939123743f06bb339bb1ef4b3b860..8c9837ad380e338c6cfe0837df87c50070e68eec 100755 (executable)
@@ -98,7 +98,7 @@ while (1) {
 
   #print Dumper $o;
   if (defined $old) {
-    my $tdiff = (time() - $oldtime)|1;
+    my $tdiff = (time() - $oldtime)||1;
     foreach my $endpoint (sort keys %$current) {
     #foreach my $endpoint (0x5000, 0x5001, 0x5002, 0x5003, 0x5004) {
       #my $ratesum = 0;
index 15dcbca768d5a2c714a4ea74ccf7288fc40aa1ec..58edfbfc9b8732520c68afcb9c12e0c663dccaf6 100755 (executable)
@@ -71,11 +71,11 @@ while (1) {
     $qastate = QA::GetQAState('below', $cnt+$cnt2, @QA::TimeoutLimitsOnlyRICHMDC);
   }
   
-  if($boardlist1 ne "") {
+  if($boardlist1 ne "" && $qastate > QA::NOTE) {
     Hmon::Speak('timeout'.(($qastate<QA::ERROR)?'once':''),"$cnt Frontend had a timeout: $boardlist1 ") if $cnt < 3;
     Hmon::Speak('timeout',"$cnt Frontends had a timeout ") if $cnt >= 3;
     }
-  if($boardlist2 ne "" && $boardlist1 eq "" ) {
+  if($boardlist2 ne "" && $boardlist1 eq "" && $qastate > QA::NOTE) {
     Hmon::Speak("timeout".(($qastate<QA::ERROR)?'once':''),"$cnt2 Frontend disabled after a timeout: $boardlist2") if $cnt2 < 3;
     Hmon::Speak('timeout',"$cnt2 Frontends had a timeout ") if $cnt2 >= 3;
     }
index 980493faff9002dffa24d84d0557f753216967e2..188390fd03f9f549034000fcba8714d0d3b277d3 100755 (executable)
@@ -75,7 +75,7 @@ while(1) {
   my $o = trb_register_read_mem(0xfe47,0xdfc0,0,32) or die trb_strerror() or sleep 5 and next;
 
   if (defined $old) {
-    my $tdiff = (time() - $oldtime)|1;
+    my $tdiff = (time() - $oldtime)||1;
     foreach my $b (keys %$o) {
       #my $ratesum = 0;
       next unless ($b>=0x5c00 && $b<=0x5cff);
index ba206b480c4a06d81cc6356989c77518c9bab456..97c0b9113272c7e1b06c65a27d1678a649539760 100755 (executable)
@@ -40,12 +40,44 @@ HPlot::PlotInit({
     showvalues => 0, 
     });
 
+HPlot::PlotInit({
+    name    => "Veto_histbar",
+    file    => "files/Veto_histbar",
+    entries => 200,
+    type    => HPlot::TYPE_BARGRAPH,
+    output  => HPlot::OUT_PNG,
+#     titles  => ["0","1","2","3","4","5","6","7","8","9","10","11"],
+    xlabel  => "Time / 1 s",
+    ylabel  => "Hitrate [Hz]",
+    sizex   => 950,
+    sizey   => 330,
+    xmin    => 0,
+    xmax    => 200,
+    ymin    => "0",
+    ymax    => "100<*",
+    curves  => 8,
+#     xscale  => 10, # xscale does not work with TYPE_BARGRAPH
+    buffer  => 1,
+    stacked => 1,
+    curvewidth  => .9,
+#     additional => "
+#   set obj 1 rect from   -1, 7E7 to  2000, 10E7 fc rgb '#ffffbb' behind \n
+#   set obj 2 rect from   -1, 10E7 to  2000, 100E7 fc rgb '#ffdddd' behind
+#     "
+    });
+
 
 my $str  = Hmon::MakeTitle(4, 6, "Veto Hit Rate",0);
 $str .= qq@<img src="%ADDPNG files/VetoMap.png%" type="image/png"><br>\n@;
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("VetoMap",$str);
 
+$str  = Hmon::MakeTitle(12, 7, "Veto Summed Rates",0);
+$str .= qq@<img src="%ADDPNG files/Veto_histbar.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("Veto_histbar",$str);
+
+
 my $old;
 my $oldtime = time();
 my $time = time();
@@ -53,12 +85,13 @@ my $diff;
 my $iter = 0;
 
 
+my $flog = QA::OpenQAFile();
 
 trb_init_ports() or die trb_strerror();
 
 
 while(1) {
-
+  my $vetosum = 0;
   
   my $o = trb_register_read_mem(0x5004,0xc000,0,9) or die trb_strerror() or sleep 5 and next;
 
@@ -72,7 +105,10 @@ while(1) {
         
         if ($vdiff < 0) { $vdiff += 2**24;}
         my $d = $vdiff/$tdiff;
-
+        
+        HPlot::PlotAdd('Veto_histbar',$d,$v);
+        $vetosum += $d;
+        
         if($v == 1) {
           HPlot::PlotFill('VetoMap',$d,3,0);
           HPlot::PlotFill('VetoMap',$d,3,1);
@@ -121,12 +157,14 @@ while(1) {
         }
       }
     HPlot::PlotDrawFork('VetoMap');    
-    
-    
+    HPlot::PlotDrawFork('Veto_histbar');    
 
-   }
+    my $vetomsg = QA::SciNotation($vetosum);
+    my $vetolongmsg = sprintf("counts per second %s/s", QA::SciNotation($vetosum));
+    QA::WriteQALog($flog, "rate", "veto", 30, QA::OK, "Veto", $vetomsg, $vetolongmsg);
+  }
     
   $old = $o;
   $oldtime = time();
-  sleep 1;
+  usleep(1000000);
   }
index 1ccd587f47d37330c33404b6a7d5ae69dbc81216..6b7f944c0d1b13497b09efa6d0d93ace406ee07e 100755 (executable)
@@ -47,56 +47,58 @@ my $str  = Hmon::MakeTitle(12, 10, "Start Falls");
 
    
 trb_init_ports() or die trb_strerror();
+
 my $channels_x_1 = [
-                  { 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}
+                  { pch =>   2,  tdc => 2, ch => 7},                  # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+                  { pch =>   4,  tdc => 2, ch => 6},                  # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+                  { pch =>   6,  tdc => 2, ch => 5},                  # pch: physical channel. The thing which will be plotted
+                  { pch =>   8,  tdc => 2, ch => 4},                  # tdc: tdc number
+                  { pch =>   10,  tdc => 2, ch => 3},                  # ch: channel in the TDC
+                  { pch =>  12,  tdc => 2, ch => 2},
+                  { pch =>  14,  tdc => 2, ch => 1},
+                  { pch =>  16,  tdc => 2, ch => 0}
 
                  ];                              
                                                  
 my $channels_x_0 = [
-                  { 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 }
+                  { pch =>  1 ,  tdc => 0, ch => 0 },               # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+                  { pch =>  3 ,  tdc => 0, ch => 1 },               # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+                  { pch =>  5 ,  tdc => 0, ch => 2 },
+                  { pch =>  7 ,  tdc => 0, ch => 3 },
+                  { pch =>  9,  tdc => 0, ch => 4 },
+                  { pch =>  11,  tdc => 0, ch => 5 },
+                  { pch =>  13,  tdc => 0, ch => 6 },
+                  { pch =>  15,  tdc => 0, ch => 7 }
 
                  ];
 my $channels_y_1 = [
-                  { 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 }
+                  { pch =>  1 ,  tdc => 3, ch => 0 },                 # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+                  { pch =>  3 ,  tdc => 3, ch => 1 },                 # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+                  { pch =>  5 ,  tdc => 3, ch => 2 },
+                  { pch =>  7 ,  tdc => 3, ch => 3 },
+                  { pch =>  9,  tdc => 3, ch => 4 },
+                  { pch =>  11,  tdc => 3, ch => 5 },
+                  { pch =>  13,  tdc => 3, ch => 6 },
+                  { pch =>  15,  tdc => 3, ch => 7 }
                  ];
                  
                  
 my $channels_y_0 = [
-                  { 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}
+                  { pch =>   2,  tdc => 1, ch => 7},             # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+                  { pch =>   4,  tdc => 1, ch => 6},             # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+                  { pch =>   6,  tdc => 1, ch => 5},
+                  { pch =>   8,  tdc => 1, ch => 4},
+                  { pch =>   10,  tdc => 1, ch => 3},
+                  { pch =>  12,  tdc => 1, ch => 2},
+                  { pch =>  14,  tdc => 1, ch => 1},
+                  { pch =>  16,  tdc => 1, ch => 0}
                  ];
 
 
 
 
 
+
 while (1) {
  my $st = trb_registertime_read_mem(0xfe58,0xc001,0,8);
   
index 7bbe1535d8eef99544ce7a965b5eea63542c7d4a..88bdf4096d9763dcbb84babebeecc9ec76157f23 100755 (executable)
@@ -35,7 +35,7 @@ function openwin(url) {
 <li><a href="../daqtools/index.pl" target="_blank">Web Tools (daqtools)</a></li>
 <li><a href="../eb/?browser=fix" target="_blank">Eventbuilder Monitor</a></li>
 <li><a href="../rawmon/" target="_blank">Raw Data Monitor</a></li>
-<li class="outdated"><a href="https://web-docs.gsi.de/~webhades/onlineMon/feb22/hades-online.html" target="_blank">Accumulated Run Statistics</a>
+<li><a href="https://web-docs.gsi.de/~webhades/onlineMon/feb24/hades-online-auau800.html" target="_blank">Accumulated Run Statistics</a>
 </ul></div>
 
 <div class="linkbox" style="float:right"><h4>Documents</h4><ul>
@@ -46,7 +46,7 @@ function openwin(url) {
 <li><a href="https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.form_selection">Beamtime Logbook</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>
+<li><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>
@@ -71,6 +71,7 @@ function openwin(url) {
 <!--<li class="outdated"><a href="http://hades63/icingaweb2/dashboard">Icinga Server Monitoring (local access only)</a>-->
 <li><a href="/munin">Munin Server Monitoring</a></li>
 <li style="width:600px;"><a href="archive/?C=M;O=D">Archive of Hmon Windows (updated every 10 minutes)</a></li>
+<li><a href="http://hadesp33:2222">Access all POWER!</a></li>
 </ul></div>
 
 
index 10ac4e4cd170c7a738cacc41c616e8e242321677..dc3e3c0d473c9a541fbbb029062ef6eaf7517a93 100755 (executable)
@@ -221,6 +221,7 @@ setInterval("resize()",1000);*/
 </script>$;
              }
 $out .= qq$
+<div id='duck'></div>
 </body>
 </html>
 $;
diff --git a/hmon/permanent/Perl2Epics2.pm b/hmon/permanent/Perl2Epics2.pm
new file mode 120000 (symlink)
index 0000000..1e81d36
--- /dev/null
@@ -0,0 +1 @@
+../Perl2Epics2.pm
\ No newline at end of file
index e039a8936d4ef060b956ae11fa8c3f5a2ecca2ed..91766927f0b1febcf217fa26c7e9148df3837518 100755 (executable)
@@ -66,8 +66,8 @@ while (1) {
     $longtext .= "none"     if (substr($res[3],3,1) ne "1");
     $longtext .= "ABORTED"  if (substr($res[3],3,1) eq "1");
 
-    $value = "ABORTED"   if $longtext =~ /ABORTED/;
     $value = "ABORT"     if $longtext =~ /ABORT/ && $value ne "";
+    $value = "ABORTED"   if $longtext =~ /ABORTED/;
     $value = "inactive"  if $longtext =~ /inactive/;
     $qastate = QA::WARN  if $longtext =~ /inactive/;
     $qastate = QA::FATAL if $longtext =~ /ABORT/;
@@ -110,6 +110,7 @@ while (1) {
 
   if($qastate >= QA::ERROR && $laststate == QA::OK) {
     system("ssh hadaq\@hadesp33 'cd /home/hadaq/trbsoft/daq/hmon; PERL5LIB=. perl ./permanent/hmon_archiver.pl once'");
+    system("logger -p local1.info -t DAQ Abort \\<E\\> Beam abort triggered");    
     Hmon::Speak('beamabort',"Beam abort. Beam abort.");
   }
 
index ceb9d2c2f37a5ded3cac6548887821364908b02b..da1c561cfbe64d865123555c0278b196019a978c 100755 (executable)
@@ -24,6 +24,7 @@ my @state;
 # with this switch disable qalog and enable printout only JAM
 my $opt_debug = 0;
 my $speak_counter =0;
+my $noData_counter =0;
 
 
 my $fqa = QA::OpenQAFile();
@@ -161,33 +162,48 @@ my $qamsgshort = "";
   }
   
   
-  
-
-  
   if (index($masterstate, 'NoData') != -1) {
-     $qastate = QA::ERROR;
+    $noData_counter++;
+    if($noData_counter > 5) {
+      $qastate = QA::ERROR;
+    }
+    else {
+      $qastate = QA::NOTE;
+    }
     $qamsgshort = "All inputs get no data!"; 
-     
-    $qamsg =  "All eventbuilder inputs do not get any data. Check DAQ or accelerator!";#   if ($opt_debug<1) {
-
+    $qamsg =  "All eventbuilder inputs do not get any data. Check DAQ or accelerator!";
   }
-  if (index($masterstate, 'Mismatch') != -1) {
+  elsif (index($masterstate, 'no_data') != -1) {
+    $qastate = QA::ERROR;
+    my $missingin = substr($masterstate, rindex($masterstate,'_')+1);
+    $qamsgshort = "Input $missingin get no data!";
+    $qamsg =  "Eventbuilder input $missingin does not get any data. Try fix missing IP or EB reset.";
+  }
+  elsif (index($masterstate, 'blocked') != -1) {
+    $qastate = QA::ERROR;
+    my $blockedin = substr($masterstate, rindex($masterstate,'_')+1);
+    $qamsgshort = "Input $blockedin get no data!";
+    $qamsg =  "Eventbuilder input $blockedin is blocked. Try EB reset.";
+  }
+  elsif (index($masterstate, 'Mismatch') != -1) {
     $qamsgshort = "Server mismatch!"; 
      $qastate = QA::ERROR;
      $qamsg .=  "An eventbuilder server node is missing! Please restart eventbuilders.";
- }
+  }
+  else {
+    $noData_counter = 0;
+  }
 
   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;
-    }
+    # $speak_counter++ if $qastate > 60;
+    # $speak_counter = 0 if $qastate < 60;
+    # if($speak_counter>10)
+    # {
+    #   $speak_counter=-10;
+      Hmon::Speak('ebmissing',"Event builders are missing input data.") if $qastate > 60;
+    }
   # dracones
   QA::WriteQALog($fqa, "server", "ebinputs", 10, $qastate, $qatitle,
                    $qamsgshort, $qamsg);
index c97533d821d0057c5e924453902a711b5f9b015e..efdb918040d1f0484bd42573fc2c4e3541b799c7 100755 (executable)
@@ -429,15 +429,19 @@ while (1) {
     $evtavglong .= " <br> Number of special triggers is not correct (debug $cnterrtype9 $cnterrtypeE)";
   }
   if ($totalbytes < 20 && $lasttotalbytes <20) {
-    $qastate = QA::WARN_2;
+    $qastate = QA::NOTE;
     $speak_counter++;
-    if($speak_counter>20)
+    if($speak_counter>10)
     {
-     $speak_counter=-20;
+     $speak_counter=-10;
+     $qastate = QA::WARN_2;
      Hmon::Speak('ebfiles', "Event building not writing files to disk.") unless $opt_debug>0 ||($masterstate =~ /NoNodes/);
      print "No files are written by eventbuilders.\n" unless $opt_debug<1;
     }
   }
+  else {
+    $speak_counter = 0;
+  }
 
   if ($trbneterr == 0) {
 
index 8c08ebc5bd1374fb24c6c686a2b0f9fddb198d3d..c5391682442ce48d742386635e5d99f322acdfd3 100755 (executable)
@@ -47,25 +47,25 @@ while(1) {
   my $hour = strftime ("%H", localtime(time+$offset*86400+150));
      $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 == 29 &&  $s[0] ne '') {
-      my $exp = $store->{contact}{$s[0]}{expert} //'';
-      if($nowmonth eq $s[2] && $nowday eq $s[3]) {
-        $store->{onshift}{$exp}{$s[0]} = $s[$hour+4];
-        }
-      }
-    }
+#  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 == 29 &&  $s[0] ne '') {
+#      my $exp = $store->{contact}{$s[0]}{expert} //'';
+#      if($nowmonth eq $s[2] && $nowday eq $s[3]) {
+#        $store->{onshift}{$exp}{$s[0]} = $s[$hour+4];
+#        }
+#      }
+#    }
 
 
   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" ;
index 7825b2e885a95c28e64cba19c33e2800d40cf3d8..c0dcc45bbd3e5a6de66ff89c581c31df08ba6703 100755 (executable)
@@ -15,7 +15,7 @@ use QA;
 
 
 my $firstrun =1; 
-my $command = "curl 'https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.show' -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.hlogbook2.form_selection' -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=&p_end=&p_num_days=&p_num_entries=5&p_author=&p_action=Show&p_log_type=All&p_run_type=None&p_current=&p_filename=*&p_search_text=*'  -u hades:6\\\$ectors   2>/dev/null | iconv -f ISO-8859-1 -t UTF-8";
+my $command = "curl 'https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.show' -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.hlogbook2.form_selection' -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=APR24TEST&p_begin=&p_end=&p_num_days=&p_num_entries=5&p_author=&p_action=Show&p_log_type=All&p_run_type=None&p_current=&p_filename=*&p_search_text=*'  -u hades:6\\\$ectors   2>/dev/null | iconv -f ISO-8859-1 -t UTF-8";
 
 my $store;
 my $hash;
index 2e1070244340f52609ca8f7fb294afba4b186b9a..a2396c034b133e2e982fe5e79d3efcd6a8f0473e 100755 (executable)
@@ -31,10 +31,10 @@ my %range_list = (
                   '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' => 1840   , 'max' => 1860 },
+                  'HAD:MAGNET:MCS:PSUI_rbk'     => {'min' => 1840   , 'max' => 1860 },
                   '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:MCS: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},
@@ -134,7 +134,7 @@ while (1) {
     my $val  = $epics->{$name}->{val};
     $time = $epics->{$name}->{tme} if ($epics->{$name}->{tme} < $time) or ($time == 0);
     # print("$name $val\n");
-    if ($name eq 'HAD:MAGNET:PSUI_rbk') {
+    if ($name eq 'HAD:MAGNET:MCS:PSUI_rbk') {
       $current = $val;
       # print("\t$name $val\n");
     }
@@ -146,7 +146,7 @@ while (1) {
       $TS105 = $val;
       # print("\t$name $val\n");
     }
-    if ($name eq 'HAD:MAGNET:LL1708') {
+    if ($name eq 'HAD:MAGNET:MCS:LL1708') {
       $LL1708 = $val;
       # print("\t$name $val\n");
     }
@@ -208,15 +208,15 @@ while (1) {
   }
   #print $fatal_error_string . "\n";
   if ($fatal_error_counter>3) {
-    $fatal_error_string .= " (last good check at $last_good_time)";
+    $fatal_error_string .= "\n(last good check at $last_good_time, last check at $time)";
     my $state = $magnet_on?(QA::FATAL):(QA::NOTE);
     QA::WriteQALog($flog,"misc","magnet",$interval+20,$state,$title,$value,$fatal_error_string);
   } elsif ($red_error_counter > 0) {
-    $fatal_error_string .= " (last good check at $last_good_time)";
+    $fatal_error_string .= "\n(last good check at $last_good_time, last check at $time)";
     my $state = $magnet_on?(QA::ERROR):(QA::NOTE);
     QA::WriteQALog($flog,"misc","magnet",$interval+20,$state,$title,$value,$fatal_error_string);
   } elsif ($yellow_error_counter > 0) {
-    $fatal_error_string .= " (last good check at $last_good_time)";
+    $fatal_error_string .= "\n(last good check at $last_good_time, last check at $time)";
     my $state = $magnet_on?(QA::WARN):(QA::NOTE);
     QA::WriteQALog($flog,"misc","magnet",$interval+20,$state,$title,$value,$fatal_error_string);
   } else {
index f65dda9a675a5ad39f5a0213887fd654ea743937..6c0bc5706a9af546b79312f6b9c7a9be01ed73d1 100755 (executable)
@@ -429,10 +429,10 @@ while(1) {
     $longmsg .= "VacHigh HI </br>";
   }
   if($qastat == QA::OK) {
-    $msg = sprintf("%s / %s",QA::SciNotation($vallow),QA::SciNotation($valhigh));
+    $msg = sprintf("%s / %s",QA::SciNotation($vallow),QA::SciNotation2($valhigh));
   }
   $longmsg .= sprintf("low vacuum: 20 mbar << 25 mbar < <b>%s mbar</b> < 80 mbar << 110 mbar </br>",QA::SciNotation($vallow));
-  $longmsg .= sprintf("high vacuum: <b>%s mbar</b> < 60u mbar << 150u mbar </br>",QA::SciNotation($valhigh));
+  $longmsg .= sprintf("high vacuum: <b>%s mbar</b> < 60&times;10<sup>-6</sup> mbar << 150&times;10<sup>-6</sup> mbar </br>",QA::SciNotation2($valhigh));
 
   if($H2_run) {  
     if ($data->{"Gate"}->{tme}==-1) {
index 797353d6d0fac0345f0cad81c098510337909028..9fda6d1cafd39a02063c138c0adb363c99da0667 100755 (executable)
@@ -74,6 +74,7 @@ while($a = <FLOG>) {
         }
       }
     $str .="<div id=\"footer\" class=\"footer\"></div></div>";
+#    $str .= '<div id="duck"></div>';
 
     $str .= Hmon::MakeFooter();
     Hmon::WriteFile("QA",$str);      
index 355dcc2c9e236f6f04625e9c626e361dbc6d97a6..a450bfbb362509b14d800f14fc399fd69062b1d4 100755 (executable)
@@ -101,6 +101,11 @@ HPlot::PlotInit($plotScale);
 my $timer = 0;
 my $offset_o2 = 0;
 my $str = "";
+#my @emailAddrs = ("juergen.friese\@ph.tum.de", "foertsch\@uni-wuppertal.de", "pauly\@physik.uni-wuppertal.de");
+my @emailAddrs = ();
+my $mailoutWarn = 0;
+my $mailoutErr = 0;
+my $mailoutDaily = 0;
 
 my $s = "HAD:RICH:GAS:pipePressureIsoB";
 Perl2Epics::Connect("IsoPress",$s);
@@ -111,6 +116,8 @@ Perl2Epics::Connect("IsoScale1","HAD:scale:1:net");
 Perl2Epics::Connect("IsoScale2","HAD:scale:2:net");
 
 print "Connected.\n";
+usleep 1E6;
+Perl2Epics::GetAll();
 
 while(1) {
   my $data = Perl2Epics::GetAll();
@@ -173,6 +180,49 @@ while(1) {
   $qastate = min(QA::WARN_2,$qastate) if $QA::RichHvOff;
   $qastate = QA::NOTE    if $QA::RichGasOff;
 
+  if($qastate == QA::WARN_2 && time()-$mailoutWarn > 60*60) {
+    foreach my $currEmailAddr (@emailAddrs) {
+      my $body = "";
+      $body .= "The RICH gas system warns:\n";
+      $body .= sprintf("Isobutan pressure    : %.2f bar Warn(<0.9)\n",$IsobPress);
+      $body .= sprintf("O2 concentration     : %.1f ppm Warn(>2000.0)\n",$IsobO2);
+      $body .= sprintf("Isobutanoutput ratio : %.2f Warn(<70.0)\n", $IsobRefR);
+      $body .= sprintf("Scales: %.1fkg / %.1fkg\n",,$IsobScale1,$IsobScale2);
+      Hmon::SendEmail($currEmailAddr,"GAS WARNING IN RICH",$body);
+    }
+    $mailoutWarn = time();
+  }
+
+  if($qastate == QA::ERROR_2 && time()-$mailoutErr > 60*60) {
+    foreach my $currEmailAddr (@emailAddrs) {
+      my $body = "";
+      $body .= "The RICH gas system went in error state:\n";
+      $body .= sprintf("Isobutan pressure    : %.2f bar Error(<0.7, >2.0)\n",$IsobPress);
+      $body .= sprintf("O2 concentration     : %.1f ppm Error(>5000.0)\n",$IsobO2);
+      $body .= sprintf("Isobutanoutput ratio : %.2f Error(<50.0)\n", $IsobRefR);
+      $body .= sprintf("Scales: %.1fkg / %.1fkg\n",,$IsobScale1,$IsobScale2);
+      Hmon::SendEmail($currEmailAddr,"GAS ERROR IN RICH",$body);
+    }
+    $mailoutErr = time();
+  }
+  
+  my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time());
+  if(!$QA::RichGasOff && $hour==12 && $min==15 && $mailoutDaily==0) {
+    foreach my $currEmailAddr (@emailAddrs) {
+      my $body = "";
+      $body .= "It is 12:15 and time for your daily RICH gas mail:\n";
+      $body .= sprintf("Isobutan pressure    : %.2f bar\n",$IsobPress);
+      $body .= sprintf("O2 concentration     : %.1f ppm\n",$IsobO2);
+      $body .= sprintf("Isobutanoutput ratio : %.2f\n", $IsobRefR);
+      $body .= sprintf("Scales: %.1fkg / %.1fkg\n",,$IsobScale1,$IsobScale2);
+      Hmon::SendEmail($currEmailAddr,"Daily RICH gas mail",$body);
+    }
+    $mailoutDaily = 1;
+  }
+  if(!$QA::RichGasOff && $hour==12 && $min==16) {
+    $mailoutDaily = 0;
+  }
+
   if( $timer % 4 == 0) {
     $value    = sprintf("%.1f|%.0f|%.0f",$IsobPress,$IsobO2,$IsobRefR);
     $longtext = sprintf("isobutan pressure : %.2f bar | O2 concentration: %.1f ppm <br>|Isobutanoutput ratio: %.2f | Scales: %.1fkg / %.1fkg",$IsobPress,$IsobO2,$IsobRefR,$IsobScale1,$IsobScale2);
index 0434fd3fbbfe2c00a04d0c16d2494c70223bcd37..a546fbd273acd928054af558ad79441091df5ae2 100755 (executable)
@@ -67,7 +67,6 @@ while(1) {
           $cnt = ($i*2)+$j;
           if ($data->{"U$cnt"}->{val}>=5490){$ChnlsOn++;}
           elsif ($data->{"U$cnt"}->{val}>=4990){$ChnlsLow++;}
-          print $data->{"U$cnt"}->{val}."\n";
         }
     }
   
index fe698ec470c9907721abbf61f93b10d1a4e6b0de..ab7870291510cc0f0f92685c553d3cb528b06068 100755 (executable)
@@ -177,10 +177,13 @@ my $round = 0;
 #my @xpos = (15,13,11,9,7,5,3,1,0,2,4,6,8,10,12,14);
 #my @ypos = (0,2,4,6,8,10,12,14,15,13,11,9,7,5,3,1);
 
-my @xpos = (1,3,5,7,9,11,13,15,14,12,10,8,6,4,2,0);
+#my @xpos = (1,3,5,7,9,11,13,15,14,12,10,8,6,4,2,0);
+my @xpos = (15,13,11,9,7,5,3,1,0,2,4,6,8,10,12,14);
 my @ypos = (15,13,11,9,7,5,3,1,0,2,4,6,8,10,12,14);
 
 
+
+
 while(1) {
 
   
index 8655f8edf69b4577832e7be679024c56523f5176..84f23c7ea5a1368a60410d1d75a927fa59695680 100755 (executable)
@@ -141,7 +141,7 @@ while(1) {
        $value    = sprintf("HV is OFF");
        $longtext = sprintf("HV is OFF");
      }
-       QA::WriteQALog($flog,"hv","tofhv",30,$qastate,"TOF HV",$value,$longtext);
+       QA::WriteQALog($flog,"hv","tofhv",50,$qastate,"TOF HV",$value,$longtext);
    }
   
 
index 405704ad4eedd48a2d4e6806ac84d824efb59ddc..6046203b3b8735984cfcff537f6805f1d0ffcb8a 100644 (file)
@@ -12,7 +12,6 @@
        , "HadesQA/EMC/hEmc_mult_raw_sec/hEmc_mult_raw_sec__0__0_+HadesQA/EMC/hEmc_mult_raw_sec/hEmc_mult_raw_sec__0__1_+HadesQA/EMC/hEmc_mult_raw_sec/hEmc_mult_raw_sec__0__2_+HadesQA/EMC/hEmc_mult_raw_sec/hEmc_mult_raw_sec__0__3_+HadesQA/EMC/hEmc_mult_raw_sec/hEmc_mult_raw_sec__0__4_+HadesQA/EMC/hEmc_mult_raw_sec/hEmc_mult_raw_sec__0__5_"
        , "HadesQA/EMC/hEmc_raw_sec"
        , "HadesQA/EMC/trending/hEmc_mult_raw_total_trend"
-       , "HadesQA/EMC/hRpcrawsecmult/hRpcrawsecmult__0__4_"
        , "HadesQA/EMC/trending/hEmc_mult_raw_sec_trend/hEmc_mult_raw_sec_trend__0__0_+HadesQA/EMC/trending/hEmc_mult_raw_sec_trend/hEmc_mult_raw_sec_trend__0__1_+HadesQA/EMC/trending/hEmc_mult_raw_sec_trend/hEmc_mult_raw_sec_trend__0__2_+HadesQA/EMC/trending/hEmc_mult_raw_sec_trend/hEmc_mult_raw_sec_trend__0__3_+HadesQA/EMC/trending/hEmc_mult_raw_sec_trend/hEmc_mult_raw_sec_trend__0__4_+HadesQA/EMC/trending/hEmc_mult_raw_sec_trend/hEmc_mult_raw_sec_trend__0__5_"
        
 ]' 
index 8997467f88b1402808a4e7485679c31cab47e160..80d7481baeb586e146415ecc11011341a2127a65 100644 (file)
@@ -1,25 +1,20 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
-<title>MDCExpert - T3</title>
+<title>MDCExpert - Mb</title>
 </head>
 
 <body style="width:100%;border:none;height:98vh;overflow:hidden;margin:0;padding:0;">
 
-<iframe src='/qaweb/?browser=off&monitoring=10000&layout=grid3x2&opts=["colz+colz","colz+colz","colz+colz","colz+colz","colz+colz","colz+colz"]&items=
+<iframe src='/qaweb/?browser=off&monitoring=10000&layout=grid2x2&items=
 [
-          "HadesQA/MDC/stacks/hMdcmbotdcStack_0__3_/hMdcmbotdc__0__3_+HadesQA/MDC/stacks/hMdcmbotdcStack_0__3_/hMdcmbotdcMissing__0__3_"
+          "HadesQA/MDC/hMdcMbo/hMdcmbotdc__0__0_"
        ,
-          "HadesQA/MDC/stacks/hMdcmbotdcStack_1__3_/hMdcmbotdc__1__3_+HadesQA/MDC/stacks/hMdcmbotdcStack_1__3_/hMdcmbotdcMissing__1__3_"
+          "HadesQA/MDC/hMdcMbo/hMdcmbotdc__0__1_"
        ,
-          "HadesQA/MDC/stacks/hMdcmbotdcStack_2__3_/hMdcmbotdc__2__3_+HadesQA/MDC/stacks/hMdcmbotdcStack_2__3_/hMdcmbotdcMissing__2__3_"
-       ,
-          "HadesQA/MDC/stacks/hMdcmbotdcStack_3__3_/hMdcmbotdc__3__3_+HadesQA/MDC/stacks/hMdcmbotdcStack_3__3_/hMdcmbotdcMissing__3__3_"
-       ,
-          "HadesQA/MDC/stacks/hMdcmbotdcStack_4__3_/hMdcmbotdc__4__3_+HadesQA/MDC/stacks/hMdcmbotdcStack_4__3_/hMdcmbotdcMissing__4__3_"
-       ,
-          "HadesQA/MDC/stacks/hMdcmbotdcStack_5__3_/hMdcmbotdc__5__3_+HadesQA/MDC/stacks/hMdcmbotdcStack_5__3_/hMdcmbotdcMissing__5__3_"
+          "HadesQA/MDC/hMdcMbo/hMdcmbotdc__0__2_"
        ,
+          "HadesQA/MDC/hMdcMbo/hMdcmbotdc__0__3_"
           
 ]' 
 style="height:100%;width:100%;border:none;margin:none;padding:none;" ></iframe>
index 1edc9d1ff68011d0515a00fbd6f9e899147145f3..ea3c2448481b8e50e5ebf5b6a467db0151482a5f 100644 (file)
@@ -25,6 +25,7 @@ body>div>div {
   
 }  
 
+
 div#content {
   background:transparent !important;
 /*      transition: opacity .5s; */
@@ -466,7 +467,7 @@ svg {
   margin-top:10px;
   color:white;
   width:100%;
-  height:100px;
+  height:200px;
   font-size:13px;
   box-shadow:none !important;
   clear:both;
@@ -628,3 +629,44 @@ border:0;
 padding:0;
   overflow:hidden;
 }
+
+
+
+#duck {
+  display:hidden;
+  }
+
+body:has(.QA) #duck {
+  position:absolute;
+  left:0;
+  bottom:0;
+  width:100%;
+  height:50px;
+  background-image:url('/mon/daqi.png');
+  background-size:contain;
+  background-repeat:no-repeat;
+  background-position: 0 0; 
+  will-change: transform;
+  /*animation: animatedBackground 60s  infinite steps(100,end);*/
+}
+
+@keyframes animatedBackground {
+  0% { 
+    background-position: -10% 0; 
+    transform: scaleX(1) translateZ(0);
+    }
+  50% { 
+    background-position: 110% 0; 
+    transform: scaleX(1) translateZ(0);
+  }
+  50.000001% { 
+    background-position: -10% 0; 
+    transform: scaleX(-1) translateZ(0);
+  }
+  100% { 
+    background-position: 110% 0; 
+    transform: scaleX(-1) translateZ(0);
+    }
+}
+
+