]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
latest changes to hmon
authorhadaq@countinghouse <hadaq@CountingHouse>
Sat, 23 Aug 2014 19:36:57 +0000 (21:36 +0200)
committerhadaq@countinghouse <hadaq@CountingHouse>
Sat, 23 Aug 2014 19:36:57 +0000 (21:36 +0200)
49 files changed:
control/gui/expert/Restart_Sequencer [new file with mode: 0755]
control/mdcLVgui/S0/Plane_0 [deleted file]
control/mdcLVgui/S0/Plane_1 [deleted file]
control/mdcLVgui/S0/Plane_2 [deleted file]
control/mdcLVgui/S0/Plane_3 [deleted file]
control/mdcLVgui/S1/Plane_0 [deleted file]
control/mdcLVgui/S1/Plane_1 [deleted file]
control/mdcLVgui/S1/Plane_2 [deleted file]
control/mdcLVgui/S1/Plane_3 [deleted file]
control/mdcLVgui/S2/Plane_0 [deleted file]
control/mdcLVgui/S2/Plane_1 [deleted file]
control/mdcLVgui/S2/Plane_2 [deleted file]
control/mdcLVgui/S2/Plane_3 [deleted file]
control/mdcLVgui/S3/Plane_0 [deleted file]
control/mdcLVgui/S3/Plane_1 [deleted file]
control/mdcLVgui/S3/Plane_2 [deleted file]
control/mdcLVgui/S3/Plane_3 [deleted file]
control/mdcLVgui/S4/Plane_0 [deleted file]
control/mdcLVgui/S4/Plane_1 [deleted file]
control/mdcLVgui/S4/Plane_2 [deleted file]
control/mdcLVgui/S4/Plane_3 [deleted file]
control/mdcLVgui/S5/Plane_0 [deleted file]
control/mdcLVgui/S5/Plane_1 [deleted file]
control/mdcLVgui/S5/Plane_2 [deleted file]
control/mdcLVgui/S5/Plane_3 [deleted file]
hmon/HPlot.pm
hmon/QA.pm
hmon/doc/eb-lostevt.htt
hmon/doc/other-rich.htt [new file with mode: 0644]
hmon/doc/other-sequencer.htt
hmon/doc/other-speech.htt [deleted file]
hmon/doc/pion-nxstatus.htt [new file with mode: 0644]
hmon/doc/rate-hodo.htt [new file with mode: 0644]
hmon/doc/rate-start.htt [new file with mode: 0644]
hmon/hmon_diamond.pl
hmon/hmon_hodo_hist.pl
hmon/hmon_mdc_temp.pl
hmon/hmon_nxyter_status.pl
hmon/hmon_pionseu.pl [new file with mode: 0755]
hmon/hmon_rate2.pl
hmon/hmon_spill.pl
hmon/index.cgi
hmon/permanent/hmon_archiver.pl [changed mode: 0644->0755]
hmon/permanent/hmon_magnet.pl
hmon/permanent/hmon_mdchv.pl
hmon/permanent/hmon_pionlv.pl [changed mode: 0644->0755]
hmon/permanent/hmon_richhv.pl
hmon/permanent/hmon_sequencer.pl
hmon/start.sh

diff --git a/control/gui/expert/Restart_Sequencer b/control/gui/expert/Restart_Sequencer
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/control/mdcLVgui/S0/Plane_0 b/control/mdcLVgui/S0/Plane_0
deleted file mode 100755 (executable)
index 5804121..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S0/Plane_1 b/control/mdcLVgui/S0/Plane_1
deleted file mode 100755 (executable)
index 46f2eb7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 0'"
diff --git a/control/mdcLVgui/S0/Plane_2 b/control/mdcLVgui/S0/Plane_2
deleted file mode 100755 (executable)
index 422f613..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 0'"
-
diff --git a/control/mdcLVgui/S0/Plane_3 b/control/mdcLVgui/S0/Plane_3
deleted file mode 100755 (executable)
index 3400905..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 0'"
-
-
diff --git a/control/mdcLVgui/S1/Plane_0 b/control/mdcLVgui/S1/Plane_0
deleted file mode 100755 (executable)
index 3799388..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S1/Plane_1 b/control/mdcLVgui/S1/Plane_1
deleted file mode 100755 (executable)
index ee55a3c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 0'"
diff --git a/control/mdcLVgui/S1/Plane_2 b/control/mdcLVgui/S1/Plane_2
deleted file mode 100755 (executable)
index b81ec71..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 0'"
-
diff --git a/control/mdcLVgui/S1/Plane_3 b/control/mdcLVgui/S1/Plane_3
deleted file mode 100755 (executable)
index 6d24b1e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 0'"
-
-
diff --git a/control/mdcLVgui/S2/Plane_0 b/control/mdcLVgui/S2/Plane_0
deleted file mode 100755 (executable)
index 387e6c1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S2/Plane_1 b/control/mdcLVgui/S2/Plane_1
deleted file mode 100755 (executable)
index a4896e3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 0'"
diff --git a/control/mdcLVgui/S2/Plane_2 b/control/mdcLVgui/S2/Plane_2
deleted file mode 100755 (executable)
index f0affe5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 0'"
-
diff --git a/control/mdcLVgui/S2/Plane_3 b/control/mdcLVgui/S2/Plane_3
deleted file mode 100755 (executable)
index ce0233f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 0'"
-
-
diff --git a/control/mdcLVgui/S3/Plane_0 b/control/mdcLVgui/S3/Plane_0
deleted file mode 100755 (executable)
index f4ad3fb..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S3/Plane_1 b/control/mdcLVgui/S3/Plane_1
deleted file mode 100755 (executable)
index 8959932..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 0'"
diff --git a/control/mdcLVgui/S3/Plane_2 b/control/mdcLVgui/S3/Plane_2
deleted file mode 100755 (executable)
index bdeb03c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 0'"
-
diff --git a/control/mdcLVgui/S3/Plane_3 b/control/mdcLVgui/S3/Plane_3
deleted file mode 100755 (executable)
index cbdca2a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 0'"
-
-
diff --git a/control/mdcLVgui/S4/Plane_0 b/control/mdcLVgui/S4/Plane_0
deleted file mode 100755 (executable)
index b2342bf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S4/Plane_1 b/control/mdcLVgui/S4/Plane_1
deleted file mode 100755 (executable)
index 912ebf7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 0'"
diff --git a/control/mdcLVgui/S4/Plane_2 b/control/mdcLVgui/S4/Plane_2
deleted file mode 100755 (executable)
index a0d620b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 0'"
-
diff --git a/control/mdcLVgui/S4/Plane_3 b/control/mdcLVgui/S4/Plane_3
deleted file mode 100755 (executable)
index 06b44fc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 1'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 0'"
-
-
diff --git a/control/mdcLVgui/S5/Plane_0 b/control/mdcLVgui/S5/Plane_0
deleted file mode 100755 (executable)
index f1b9351..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 0'"
\ No newline at end of file
diff --git a/control/mdcLVgui/S5/Plane_1 b/control/mdcLVgui/S5/Plane_1
deleted file mode 100755 (executable)
index 79e7b67..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 0'"
diff --git a/control/mdcLVgui/S5/Plane_2 b/control/mdcLVgui/S5/Plane_2
deleted file mode 100755 (executable)
index 25b042f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 0'"
-
diff --git a/control/mdcLVgui/S5/Plane_3 b/control/mdcLVgui/S5/Plane_3
deleted file mode 100755 (executable)
index 42783d3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 2'"
-sleep 5
-command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 0'"
-
-
index 26093da9fde83db5c4c220702b83cb40644a41f6..826e34ad8bb1db59e11419775044edc145ce6184 100755 (executable)
@@ -233,7 +233,7 @@ sub PlotDraw {
         }
       plot_write($p->{$name}->{fh},"e");      
       plot_write($p->{$name}->{fh},"e");     
-#       }
+
       for(my $j=0; $j<$p->{$name}->{curves}; $j++) {
         for(my $i=0; $i< $p->{$name}->{entries}; $i++) {
           plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]||0)." ",1);
@@ -258,7 +258,6 @@ sub PlotDraw {
 sub PlotAdd {
   my($name,$value,$curve) = @_;
   $curve = 0 unless $curve;
-
   push(@{$p->{$name}->{value}->[$curve]},$value||0);
   shift(@{$p->{$name}->{value}->[$curve]});
 
index 8cb7bb401687ca0ce565d6c20ffd98b7d35c980e..ef9c631cc5bd11687b5a3b55cb74ceeb363c4057 100644 (file)
@@ -33,7 +33,7 @@ our $entries->{'cats'} = ["main",
 
 # Order of entries in each cat
 $entries->{'main'}    = ['time', 'rate','onlineqa','up','speech'];
-$entries->{'daq'}     = ['trbnet', 'timeouts', 'busy','readout'];
+$entries->{'daq'}     = ['trbnet', 'timeouts', 'busy','readout','spillcount'];
 $entries->{'trg'}     = ['spill', 'accepted', 'source','pt1rate',  'start']; #, 
 $entries->{'rate'}    = ['pt1','start','hodo','pion1','pion2'];
 $entries->{'server'}  = ['fill', 'cpu', 'icinga', 'etrax', 'pwrsup'];
@@ -41,7 +41,7 @@ $entries->{'eb'}      = ['run', 'rate','bytes', 'lostevt', 'errbits'];
 $entries->{'mdc'}     = ['token', 'blocked', 'temp', 'linkqual', 'voltage'];
 $entries->{'endp'}    = ['mdc','rich', 'tof', 'rpc', 'other'];
 $entries->{'feeerr'}  = ['rich', 'trb', 'feeerr','trginp','trgqual'];
-$entries->{'pion'}    = ['nxstatus', 'HV', 'HVcurr', 'cooling'];
+$entries->{'pion'}    = ['nxstatus', 'HV', 'HVcurr', 'cooling','seu'];
 $entries->{'other'}   = ['magnet','rich','shower','mdcinvalid','sequencer'];
 
 
index e58e8c4cb89c036400a5f45150843f242cc7a6ff..9295daf2d02c38dc135cb3c7bda9d4ea8b706bc1 100644 (file)
@@ -1,5 +1,6 @@
 <h3>Number of discarded events</h3>
 <p>
-This button gives you the number of discarded events in the Eventbuilders. 
-<br>The reason can be a overloaded CPU in the EB or any other error. Try to restart the Eventbuilders.
-
+This button gives you the number of discarded events in the Eventbuilders. Few discarded events are fine.
+<!--<br>The reason can be a overloaded CPU in the EB or any other error.-->
+<br>If many events are discarded, try to restart the Eventbuilders.
+<br><b>ery likely cause: Failed Ethernet transmission from Pion Tracker. Click "Reboot TRB3" followed by a DAQ restart.
diff --git a/hmon/doc/other-rich.htt b/hmon/doc/other-rich.htt
new file mode 100644 (file)
index 0000000..945291d
--- /dev/null
@@ -0,0 +1,16 @@
+<h3>Magnet</h3>
+<p>
+This button shows the status of the RICH high voltage.
+<br>Button is yellow if any sector has a high voltage below 2200 Volts. This can happen every now and then when the detector has a trip and does automatic recovery.
+<br>Button is red if high voltage is too low for more than three minutes, which should not happen.
+</p>
+
+
+<h4>Error Handling in case it is <font color="red">RED</font>:</h4>
+
+<p>If you know how, you can reenable high voltage on the corresponding sector manually in the Epics GUI. If not:
+<br>Call RICH detector expert (if not on shift)
+
+
+
+
index 892de8eded744a9c8fbb2133c2b37e59b515c7dc..d76c42885a3ba19581fc5bfddb6a79e973a5c0db 100644 (file)
@@ -3,4 +3,5 @@
 <p>Some high voltage control is not working any more. Please inform the MDC operator before taking any action.
 <h4>Error Handling</h4>
 <p>Click the 'Restart Sequencer' button in the control window or run on lxhadeb06:
-<br><pre>ssh scs@lxhadeb06 'echo -en "\x18" | netcat -w 1 localhost 4813</pre>
\ No newline at end of file
+<br><pre>ssh scs@lxhadeb06 'echo -en "\x18" | netcat -w 1 localhost 4813</pre>
+<br>Restarting might take a minute until the button is green again.
diff --git a/hmon/doc/other-speech.htt b/hmon/doc/other-speech.htt
deleted file mode 100644 (file)
index b0a88fb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<h3>Speech Output</h3>
-<p>
-This button shows the status of the speech deamon which gives you accustic informations in case of critical problems
-with any subsystem.
-
-<h4>Error Handling if the button is not <font color="gree">Green</font></h4>
-
-It can only be switched off. If that is the case, turn it on.
-
-
-
diff --git a/hmon/doc/pion-nxstatus.htt b/hmon/doc/pion-nxstatus.htt
new file mode 100644 (file)
index 0000000..02c8321
--- /dev/null
@@ -0,0 +1,20 @@
+<p>
+Pion Tracker Nxyter FEB Status, tells the status of all Nxyter Frontends. As
+long as the button is green everything is O.K.
+</p>
+<h4>Error Handling in case it is not <font color="gree">Green</font></h4>
+In most cases a DAQ restart helps. In rare cases a power-cycle has to be performed.
+
+<h4>Check the short Error Messgage Indicator dislayed on the button</h4>
+<ul>
+<li> <code>'Offline:'</code> : Nxyter is Offline. This can be
+caused by a turned off Powersupply,  turn it on. If this does not help call
+expert, severe error.
+<li> <code>'ResetBusy:'</code> : Happens typically after a DAQ Restart, the
+nxyters have to synchronize. Wait at least 1 minutes, if this does not help
+try a DAQ restart again. </li>  
+<li> <code>'DataReceiver:'</code> : Try a DAQ Restart.</li>  
+<li> <code>'DataValidate:'</code> : Try a DAQ Restart.</li>  
+<li> <code>'Eventbuffer:' </code> : Try a DAQ Restart.</li>  
+</ul>
+
diff --git a/hmon/doc/rate-hodo.htt b/hmon/doc/rate-hodo.htt
new file mode 100644 (file)
index 0000000..f3cad26
--- /dev/null
@@ -0,0 +1,4 @@
+<h3>Rate from the Hodoscope detector</h3>
+<p>Shows the rate seen on the Hodoscope detector before and after substraction of noise rate.
+<p>The button will be red if the Start shows a high rate and the Hodoscope shows a low rate which might 
+point to a problem with sending the trigger signal from Hodoscope to the CTS. Ask an expert for help...
\ No newline at end of file
diff --git a/hmon/doc/rate-start.htt b/hmon/doc/rate-start.htt
new file mode 100644 (file)
index 0000000..d668e0b
--- /dev/null
@@ -0,0 +1,4 @@
+<h3>Rate from the Start detector</h3>
+<p>Shows the rate seen on the start detector before and after substraction of noise rate.
+<p>The button will be red if the hodoscope shows a high rate and the start shows a low rate which might 
+point to a problem with sending the trigger signal from start to the CTS. Ask an expert for help...
\ No newline at end of file
index 1f08e54ea3d4a6a781a81e1770455edd99c93442..65a539fc7ef4a1c44c068175060601ee52f53c05 100755 (executable)
@@ -28,20 +28,45 @@ $plot2->{xmin}    = 0.5;
 $plot2->{xmax}    = 6.5;
 $plot2->{ymin}    = 6.5;
 $plot2->{ymax}    = 0.5;
+$plot2->{cbmin}   = "0";
 $plot2->{cbmax}   = "100<*";
 $plot2->{showvalues} = 1;
 $plot2->{xlabel} = "column";
 $plot2->{ylabel} = "row";
-
-
 HPlot::PlotInit($plot2);
 
+HPlot::PlotInit({
+  name    => "DiamondProfile",
+  file    => "files/DiamondProfile",
+  entries => 6,
+  curves  => 2,
+  type    => HPlot::TYPE_HISTORY,
+  output  => HPlot::OUT_PNG,
+  nokey   => 1,
+  countup => 1,
+  titles  => [""],
+  xlabel  => "Stripe",
+  ylabel  => "Rate [Hz]",
+  sizex   => 350,
+  sizey   => 220,
+  ymin    => 0,
+  ymax    => "100<*",
+  buffer  => 1
+  });
+
+  
+  
+
 
 my $str  = Hmon::MakeTitle(9, 10, "Diamond Hit Rate");
 $str .= qq@<img src="%ADDPNG files/DiamondRate.png%" type="image/png"><br>\n@;
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("DiamondRate",$str);
 
+$str  = Hmon::MakeTitle(5, 5, "Diamond Hit Profile");
+$str .= qq@<img src="%ADDPNG files/DiamondProfile.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("DiamondProfile",$str);
 
 
 # Nino 1:   FPGA 1, connector 1
@@ -112,6 +137,8 @@ trb_init_ports() or die trb_strerror();
 
 
 while (1) {
+  my @sumx;
+  my @sumy;
   my $o;
   foreach my $b (0x5000,0x5002,0x5003) {
     my $t = trb_register_read_mem($b,0xc000,0,33);
@@ -131,12 +158,24 @@ while (1) {
 
     for my $x (0..5) {
       for my $y (0..5) {
+        $sumx[$x] =  ($sumx[$x]||0) + $diff->{$fpga->[$y]->[$x]+0x5000}->[$chan->[$y]->[$x]];
+        $sumy[$y] =  ($sumy[$y]||0) + $diff->{$fpga->[$y]->[$x]+0x5000}->[$chan->[$y]->[$x]];
+        
         HPlot::PlotFill('DiamondRate',$diff->{$fpga->[$y]->[$x]+0x5000}->[$chan->[$y]->[$x]],$x+1,$y+1);
         }
       }
     HPlot::PlotDraw('DiamondRate');      
     }
 
+
+    for my $x (0..5) {
+      HPlot::PlotFill('DiamondProfile',$sumx[$x],$x,0);
+      HPlot::PlotFill('DiamondProfile',$sumy[$x],$x,1);
+      }
+     
+    HPlot::PlotDraw('DiamondProfile') if(defined $sumx[3] && $sumx[3] >= 5);
+    
+    
   $old = $o;
   $oldtime = time();
   sleep(1);
index e6fead94eec8c753e781ca3e8aa5293db3583a16..e3c2ad80ebda1164599c459de7deb30804b2809f 100755 (executable)
@@ -238,10 +238,10 @@ while (1) {
       $o->{$a} = $t->{$a};
       }
     }
-  $t = trb_registertime_read(0xfe49,0x8130);
+  $t = trb_registertime_read(0xfe49,0x8132);
   if (defined $t) {
     foreach my $b (keys $t) {
-      $o2->{$b}->{0x8130} = $t->{$b};
+      $o2->{$b}->{0x8132} = $t->{$b};
       }
     }
 
@@ -315,20 +315,20 @@ while (1) {
 #     print $totalstart;
     
     if($total > 1000) {
-      HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3800}->{0x8130}||0)-$offset->{0x3800})/(($totalstart-$offset->{0x8880})||1),0);    
-      HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3801}->{0x8130}||0)-$offset->{0x3801})/(($totalstart-$offset->{0x8880})||1),1);    
-      HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3810}->{0x8130}||0)-$offset->{0x3810})/(($totalstart-$offset->{0x8880})||1),2);    
-      HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3811}->{0x8130}||0)-$offset->{0x3811})/(($totalstart-$offset->{0x8880})||1),3);   
+      HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3800}->{0x8132}||0)-$offset->{0x3800})/(($totalstart-$offset->{0x8880})||1),0);    
+      HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3801}->{0x8132}||0)-$offset->{0x3801})/(($totalstart-$offset->{0x8880})||1),1);    
+      HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3810}->{0x8132}||0)-$offset->{0x3810})/(($totalstart-$offset->{0x8880})||1),2);    
+      HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3811}->{0x8132}||0)-$offset->{0x3811})/(($totalstart-$offset->{0x8880})||1),3);   
       
-      HPlot::PlotFill("HitRatios",(($diff2->{0x3800}->{0x8130}||0)-$offset->{0x3800})/(($totalstart-$offset->{0x8880})||1),0);
-      HPlot::PlotFill("HitRatios",(($diff2->{0x3801}->{0x8130}||0)-$offset->{0x3801})/(($totalstart-$offset->{0x8880})||1),1);
-      HPlot::PlotFill("HitRatios",(($diff2->{0x3810}->{0x8130}||0)-$offset->{0x3810})/(($totalstart-$offset->{0x8880})||1),2);
-      HPlot::PlotFill("HitRatios",(($diff2->{0x3811}->{0x8130}||0)-$offset->{0x3811})/(($totalstart-$offset->{0x8880})||1),3);
+      HPlot::PlotFill("HitRatios",(($diff2->{0x3800}->{0x8132}||0)-$offset->{0x3800})/(($totalstart-$offset->{0x8880})||1),0);
+      HPlot::PlotFill("HitRatios",(($diff2->{0x3801}->{0x8132}||0)-$offset->{0x3801})/(($totalstart-$offset->{0x8880})||1),1);
+      HPlot::PlotFill("HitRatios",(($diff2->{0x3810}->{0x8132}||0)-$offset->{0x3810})/(($totalstart-$offset->{0x8880})||1),2);
+      HPlot::PlotFill("HitRatios",(($diff2->{0x3811}->{0x8132}||0)-$offset->{0x3811})/(($totalstart-$offset->{0x8880})||1),3);
 
-      $spillsum->{0x3800} += (($diff2->{0x3800}->{0x8130}||0)-$offset->{0x3800})/5;
-      $spillsum->{0x3801} += (($diff2->{0x3801}->{0x8130}||0)-$offset->{0x3801})/5;
-      $spillsum->{0x3810} += (($diff2->{0x3810}->{0x8130}||0)-$offset->{0x3810})/5;
-      $spillsum->{0x3811} += (($diff2->{0x3811}->{0x8130}||0)-$offset->{0x3811})/5;
+      $spillsum->{0x3800} += (($diff2->{0x3800}->{0x8132}||0)-$offset->{0x3800})/5;
+      $spillsum->{0x3801} += (($diff2->{0x3801}->{0x8132}||0)-$offset->{0x3801})/5;
+      $spillsum->{0x3810} += (($diff2->{0x3810}->{0x8132}||0)-$offset->{0x3810})/5;
+      $spillsum->{0x3811} += (($diff2->{0x3811}->{0x8132}||0)-$offset->{0x3811})/5;
       $spillsum->{0x8880} += (($totalstart||0)-$offset->{0x8880})/5;
       $spillsum->{0x8890} += (($total||0)-$offset->{0x8890})/5/2;
       $spillsum->{0x3000} += $diffe->{0x3000};
@@ -346,12 +346,12 @@ while (1) {
       
       $offset->{0x8880} += (($totalstart||0) - $offset->{0x8880})/32;
       $offset->{0x8890} += (($total||0) - $offset->{0x8890})/32;
-      $offset->{0x3800} += (($diff2->{0x3800}->{0x8130}) - $offset->{0x3800})/32;
-      $offset->{0x3801} += (($diff2->{0x3801}->{0x8130}) - $offset->{0x3801})/32;
-      $offset->{0x3810} += (($diff2->{0x3810}->{0x8130}) - $offset->{0x3810})/32;
-      $offset->{0x3811} += (($diff2->{0x3811}->{0x8130}) - $offset->{0x3811})/32;
+      $offset->{0x3800} += (($diff2->{0x3800}->{0x8132}) - $offset->{0x3800})/32;
+      $offset->{0x3801} += (($diff2->{0x3801}->{0x8132}) - $offset->{0x3801})/32;
+      $offset->{0x3810} += (($diff2->{0x3810}->{0x8132}) - $offset->{0x3810})/32;
+      $offset->{0x3811} += (($diff2->{0x3811}->{0x8132}) - $offset->{0x3811})/32;
       
-      if($spillsum->{0x3810} != 0) {
+      if($spillsum->{0x8880} >= 10) {
         HPlot::PlotAdd('SpillSumHist',$spillsum->{0x3810},0);
         HPlot::PlotAdd('SpillSumHist',$spillsum->{0x3811},1);
         HPlot::PlotAdd('SpillSumHist',$spillsum->{0x8880},2);
@@ -366,20 +366,21 @@ while (1) {
         }
       }
 
-    HPlot::PlotAdd('HitSumHist',(($diff2->{0x3800}->{0x8130})||0)-$offset->{0x3800},0);
-    HPlot::PlotAdd('HitSumHist',(($diff2->{0x3801}->{0x8130})||0)-$offset->{0x3801},1);
-    HPlot::PlotAdd('HitSumHist',(($diff2->{0x3810}->{0x8130})||0)-$offset->{0x3810},2);
-    HPlot::PlotAdd('HitSumHist',(($diff2->{0x3811}->{0x8130})||0)-$offset->{0x3811},3);
+    HPlot::PlotAdd('HitSumHist',(($diff2->{0x3800}->{0x8132})||0)-$offset->{0x3800},0);
+    HPlot::PlotAdd('HitSumHist',(($diff2->{0x3801}->{0x8132})||0)-$offset->{0x3801},1);
+    HPlot::PlotAdd('HitSumHist',(($diff2->{0x3810}->{0x8132})||0)-$offset->{0x3810},2);
+    HPlot::PlotAdd('HitSumHist',(($diff2->{0x3811}->{0x8132})||0)-$offset->{0x3811},3);
     HPlot::PlotAdd('HitSumHist',(($total||0)-$offset->{0x8890})/2,4);      
     HPlot::PlotAdd('HitSumHist',($totalstart||0)-$offset->{0x8880},5);      
+    #print (((($total||0)-$offset->{0x8890})/2)."\n");
 
-    HPlot::PlotAdd('HitSumHistInner',(($diff2->{0x3810}->{0x8130})||0)-$offset->{0x3810},0);
-    HPlot::PlotAdd('HitSumHistInner',(($diff2->{0x3811}->{0x8130})||0)-$offset->{0x3811},1);
+    HPlot::PlotAdd('HitSumHistInner',(($diff2->{0x3810}->{0x8132})||0)-$offset->{0x3810},0);
+    HPlot::PlotAdd('HitSumHistInner',(($diff2->{0x3811}->{0x8132})||0)-$offset->{0x3811},1);
     HPlot::PlotAdd('HitSumHistInner',(($total||0)-$offset->{0x8890})/2,2);      
     HPlot::PlotAdd('HitSumHistInner',($totalstart||0)-$offset->{0x8880},3);
     
-    HPlot::PlotAdd('HitSumHistInnerShort',(($diff2->{0x3810}->{0x8130})||0)-$offset->{0x3810},0);
-    HPlot::PlotAdd('HitSumHistInnerShort',(($diff2->{0x3811}->{0x8130})||0)-$offset->{0x3811},1);
+    HPlot::PlotAdd('HitSumHistInnerShort',(($diff2->{0x3810}->{0x8132})||0)-$offset->{0x3810},0);
+    HPlot::PlotAdd('HitSumHistInnerShort',(($diff2->{0x3811}->{0x8132})||0)-$offset->{0x3811},1);
     HPlot::PlotAdd('HitSumHistInnerShort',(($total||0)-$offset->{0x8890})/2,2);      
     HPlot::PlotAdd('HitSumHistInnerShort',($totalstart||0)-$offset->{0x8880},3);   
     
index c065f1af95a97ae03f58c3eb9bd35910795e3d10..6638e356ee3ab6640929795b7d73b89bccc4bb17 100755 (executable)
@@ -34,6 +34,7 @@ my $data = Perl2Epics::GetAll();
 
 #print Dumper $data;
 #print $data->{'TempAlarmEPICS'}->{'val'} . "\n";
+#print $mailerrstatecnt . "\n";
 #exit;
 
 while (1) {
@@ -80,12 +81,14 @@ while (1) {
                  "Max. temperature in each plane of MDC are " . $str);
   $store = {};
 
+
   if($qastate >= QA::ERROR || ( $data->{'TempAlarmEPICS'}->{'val'} > 0 )  ) {
-    if($mailerrstatecnt++ >= 30) {
-      Hmon::SendEmail('c.wendisch@gsi.de',"Error: MDC Temperature too high","MDC temperatures are too high:  \n$str");
+    if($mailerrstatecnt++ >= 15) {
+      Hmon::SendEmail('j.michel@gsi.de,c.wendisch@gsi.de',"Error: MDC Temperature too high","MDC temperatures are too high:  
+\n$str");
       $mailerrstatecnt = 0;
       }
     }
-
+    
   sleep 20;
 }
index 5e2ff60c7a664dc44931efc2c596af1cc57ee3a9..ef54cc55db101ab8536fe3361604c9aee3b27d5a 100755 (executable)
@@ -11,25 +11,34 @@ my $flog = QA::OpenQAFile();
 
 trb_init_ports() or die trb_strerror();
 
+my $reset_timeout_threshold = 45;
+my $reset_busy_timeout_ctr = 0;
+
 while (1) {
 
     # Default Output Values
     my $title     = "NX Status";
     my $shorttext = "";
-    my $longtext  = "Status of all Nxyter FEBs -- ";
+    my $longtext  = "Status of all Nxyter FEBs:";
     my $status    = QA::OK;
 
     # Read Status Register of all Nxyter
     my $rh_status = trb_register_read(0xfe49, 0x810c)  
        or sleep $SLEEP_TIME and next;
+    my $rh_reset = trb_register_read(0xfe49, 0x8501)  
+       or sleep $SLEEP_TIME and next;
 
-    my $status_receiver_ctr = 0;
-    my $status_validate_ctr = 0;
+    my $status_receiver_ctr  = 0;
+    my $status_validate_ctr  = 0;
     my $status_evtbuffer_ctr = 0;
+    my $status_offline_ctr   = 0;
+    my $status_reset_ctr     = 0;
     my $status_receiver  = "DataReceiver: "; 
     my $status_validate  = "DataValidate: "; 
     my $status_evtbuffer = "EventBuffer: "; 
-
+    my $status_offline   = "Offline: "; 
+    my $status_reset     = "ResetBusy: ";
+    
     foreach my $board (sort {$a <=> $b} keys %$rh_status) {
        if (($rh_status->{$board} & 0x01) != 0) {
            $status_receiver  = $status_receiver .
@@ -46,21 +55,50 @@ while (1) {
                sprintf " 0x%04x", $board;
            $status_evtbuffer_ctr++;
        }
+       if (($rh_status->{$board} & 0x08) != 0) {
+           $status_offline  = $status_offline . 
+               sprintf " 0x%04x", $board;
+           $status_offline_ctr++;
+       }
+    }
+    
+    #$rh_reset->{0x3801} = 1;
+    foreach my $board (sort {$a <=> $b} keys %$rh_reset) {
+       if (($rh_reset->{$board} & 0x01) != 0) {
+           $status_reset  = $status_reset . 
+               sprintf " 0x%04x", $board;
+           $status_reset_ctr++;
+       }
     }
     
+    # Reset Busy Timeout Counter
+    if ($status_reset_ctr > 0) {
+       $reset_busy_timeout_ctr++;
+    } else {
+       $reset_busy_timeout_ctr = 0;
+    }
+
     # Create Output Messages
     if (($status_receiver_ctr > 0) || ($status_evtbuffer_ctr > 0) ) {
        $status = QA::FATAL;
-    } elsif ($status_validate_ctr > 0) {
+    } elsif ($status_offline_ctr > 0) {
+       $status = QA::ERROR;
+    } elsif (($status_validate_ctr > 0) || 
+            (($status_reset_ctr > 0) && ($reset_busy_timeout_ctr > $reset_timeout_threshold))) {
+       $status = QA::WARN;
+    } elsif ($status_reset_ctr > 0) {
        $status = QA::NOTE;
     }
     
     if ($status != QA::OK) {
-       $shorttext = "R:${status_receiver_ctr} V:${status_validate_ctr} E:${status_evtbuffer_ctr}";
-       $longtext = $longtext . " ${status_receiver} -- ${status_validate} -- ${status_evtbuffer} ";
+       $shorttext = "${status_offline_ctr}/${status_receiver_ctr}/${status_validate_ctr}/${status_evtbuffer_ctr}/${status_reset_ctr}/$reset_busy_timeout_ctr";
+       $longtext = $longtext . "</br>${status_offline} -- ${status_reset} -- ${status_receiver} -- ${status_validate} -- ${status_evtbuffer} ";
+       if ($reset_busy_timeout_ctr > $reset_timeout_threshold) {
+           $longtext = $longtext . "</br></br> ------------ PRESS NxyterRescue BUTTON ----------------- "
+       }
     } else {
        $shorttext = "OK";
-       $longtext = $longtext . "all is fine";
+       $longtext = $longtext . " all is fine";
     }
     
     QA::WriteQALog($flog, "pion", "nxstatus", $SLEEP_TIME * 2,
diff --git a/hmon/hmon_pionseu.pl b/hmon/hmon_pionseu.pl
new file mode 100755 (executable)
index 0000000..32e171a
--- /dev/null
@@ -0,0 +1,31 @@
+#!/usr/bin/perl -w
+
+use warnings;
+use Time::HiRes qw(usleep);
+use strict;
+use Data::Dumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+
+
+trb_init_ports() or die trb_strerror();
+
+my $fqa  = QA::OpenQAFile();
+
+my $lasterrors = 0;
+
+while(1) {
+  my $s = trb_register_read(0xfe49,0xd501);
+  my $errors = 0;
+  foreach my $b (keys %{$s}) {
+    $errors += ($s->{$b}&0xFF000000)>>24;
+    }
+  
+  my $state = QA::OK;
+  if( $errors-$lasterrors > 2) {$state = QA::NOTE;}
+  QA::WriteQALog($fqa, "pion", "seu", 20,
+       $state, 'Pion SED', $errors-$lasterrors, "Number of SEU errors (debugging only!): $errors<br>During last 5 seconds: ".($errors-$lasterrors) ); 
+  $lasterrors = $errors;
+  sleep(5);
+  }
\ No newline at end of file
index 1c0002cacfb426584b4c2927975e2524fdc21092..92fecf2bb7b6ea82a9f6c4d9b7afeec6399d2aae 100755 (executable)
@@ -14,6 +14,7 @@ my $flog = Hmon::OpenLogfile();
 my $fqa  = QA::OpenQAFile();
 
 my $offset;
+my $starterrorcnt = 0;
 
 sub getCorrected {
   my ($val,$cor) = @_;
@@ -162,6 +163,17 @@ while (1) {
   $state = QA::OK;
   $shorttext = QA::SciNotation($store{0xa009})." / ".getCorrected($store{0xa009},$offset->{0xa009});
   $longtext  = sprintf("Trigger Rate from Start: %i Hz / %i Hz after offset correction",$store{0xa009}, getCorrectedValue($store{0xa009},$offset->{0xa009}));
+  if(getCorrectedValue($store{0xa009},$offset->{0xa009}) < 100 && 
+     getCorrectedValue($store{0xa029},$offset->{0xa029}) > 10000) {
+    $starterrorcnt+=3;
+    if($starterrorcnt >= 15) {
+      $state = QA::ERROR;
+      $longtext .= "<br>Something seems to be wrong with the trigger signal from Start";
+      }
+    }
+  else {
+    $starterrorcnt = max($starterrorcnt-1,0);
+    }
   QA::WriteQALog($fqa, "rate", "start", 10,
        $state, 'Start Rate', $shorttext, $longtext);        
 
index 021a857427af675aea2f8c29a499fa7e9cf16d29..18d15318d90904504f3d5f99cd69889ad7b36451 100755 (executable)
@@ -8,6 +8,7 @@ use Hmon;
 use QA;
 use HADES::TrbNet;
 use HPlot;
+use Perl2Epics;
 
 my $lastspill = 1;
 my $evtrate = 0;
@@ -20,7 +21,8 @@ my @spills;
 my $spillavgshort = 0;
 my $spillavglong = 0;
 my $errtime = 0;
-
+my $lastspillcount = 0;
+my $countnochange = 0;
 
 my $plot = ();
 $plot->{name}    = "EvtsPerSpill";
@@ -45,12 +47,19 @@ my $fqa = QA::OpenQAFile() or die "No connection to QA Logfile";
 
 trb_init_ports() or die trb_strerror();
 
+Perl2Epics::Connect("prefix", "HAD:eb01:prefix",'DBR_TIME_STRING');
+
 while (1) {
     my $trbneterr = 0;
     my $rh_result = trb_register_read(QA::CTSAddress, 0xa002) or $trbneterr = 1; #sleep 5 and next;
     my $stopped  = trb_register_read(0x3,0xa0c0) or sleep 5 and next;  
     $stopped = ($stopped->{3} || 0) & 0x400;
     
+    my $sc = trb_register_read(0x3830,0xc00d);
+    my $spillcount = $sc->{0x3830} & 0x00ffffff;
+    my $inspill    = ($sc->{0x3830} & 0x80000000) >> 31;
+    my $data = Perl2Epics::GetAll();
+    
     $lastspill = $outofspill;
     $outofspill = ($rh_result->{QA::CTSAddress} || 0) & 0x10;
     $spilllength++ ; #if($outofspill);
@@ -104,11 +113,19 @@ while (1) {
            $events = 0;
            $spilllength = 0;
        } elsif ($spilllength > 20) {
-           QA::WriteQALog($fqa, "trg", "spill", 30, QA::NOTE, "Spill Sum",
+              QA::WriteQALog($fqa, "trg", "spill", 30, QA::NOTE, "Spill Sum",
                           "No Spills", "No Spills detected at the moment");  
             
             if($spilllength > 30 && !($spilllength%30)) {
-              Hmon::Speak('nobeam', "No beam")
+              if($data->{'prefix'}->{val} eq 'be') {
+                Hmon::Speak('nobeam', "No beam");
+                }
+#               elsif($data->{'prefix'}->{val} eq 'co') {
+#                 Hmon::Speak('nobeam', "No beam, but cosmics are there anyways.");
+#                 }
+#               else {
+#                 Hmon::Speak('nobeam', "No beam, but nobody cares because test files are written.");
+#                 }
               }
        }
        
@@ -132,6 +149,17 @@ while (1) {
        QA::WriteQALog($fqa, "main", "rate", 5, $qastate, "Current Rate",
                       $qashort, $qalong);
 
+        my $spillcountstate = QA::OK;
+        if ($countnochange > 15) {$spillcountstate = QA::WARN;}
+        QA::WriteQALog($fqa, "daq", "spillcount", 5, $spillcountstate, "Spill Count",
+                       $spillcount,"Number of spills: $spillcount" );
+        if($lastspillcount == $spillcount) {
+          $countnochange++;
+          }
+        else {
+          $countnochange = 0;
+          }
+       $lastspillcount = $spillcount;         
        $lastres = $res;
        usleep(500000);
     } else {
index fc6982303cc920621657517dd8243735f76aab08..68cfe9a1de9da2c869a91bb6307f836e75b1346f 100755 (executable)
@@ -55,6 +55,7 @@ function openwin(url) {
 <li><a href="monitor.cgi?1-window-pion1adc">ADC values on Pion 1</a></li>
 <li><a href="monitor.cgi?1-window-pion2adc">ADC values on Pion 2</a></li>
 <li><a href="monitor.cgi?5-window-PionSupplies">Pion Power &amp; Cooling</a></li>
+<li><a href="monitor.cgi?1-window-DiamondRate">Rate on the Diamond</a></li>
 <li><a href="monitor.cgi?2-window-HodoHist">Spill Shape from Hodoscope</a></li>
 <li><a href="monitor.cgi?1-window-HodoRate">Rate on Hodoscope (heatmap)</a></li>
 <li><a href="monitor.cgi?2-window-HodoRatePlot">Rate on Hodoscope (curve)</a></li>
old mode 100644 (file)
new mode 100755 (executable)
index da501fdd7a97f289b44d84cfa1ed92851f630f30..4f316f2a579b1257c47168d40e99429ed62e69da 100755 (executable)
@@ -9,7 +9,7 @@ use QA;
 use Getopt::Long;
 use Data::Dumper;
 
-my $magnet_on = 0;
+my $magnet_on = 1;
 
 my %range_list = (
                  'Time'             => {},
@@ -57,7 +57,7 @@ my %range_list = (
                  'PI1600'           => {'min' => 2.94   , 'max' =>2.97 },
                  'PI1602'           => {'min' => 1.30   , 'max' =>1.37 },
                  'PI1604'           => {'min' => 2.7    , 'max' =>2.99 },
-                 'EV1100R'          => {'min' => 27     , 'max' =>36   },
+                 'EV1100R'          => {'min' => 27     , 'max' =>45   },
                  'EV1122R'          => {'min' => 55     , 'max' =>61   },
                  'EV1128R'          => {'min' => 73     , 'max' =>81   },
                  'TC1200M'          => {'min' => 6.5    , 'max' =>8.5  },
index aa859ae93803d533e149ef036b2e7c2ddf2c2285..73f0671d0166686bd9c35a999c94826d2ffde31a 100755 (executable)
@@ -106,8 +106,8 @@ while(1) {
         my $tc   = strftime("%H:%M:%S",localtime($data->{"$i-$s-$v-I"}->{tme} || 0));
         $volt = -1 unless defined $volt;
         $curr = -1 unless defined $curr;
-        HPlot::PlotAdd("P".($i-1).(($v)?'F':'C')."I",$curr,$s-1);
-        HPlot::PlotAdd("P".($i-1).(($v)?'F':'C')."V",$volt,$s-1);
+        HPlot::PlotAdd("P".($i-1).(($v)?'C':'F')."I",$curr,$s-1);
+        HPlot::PlotAdd("P".($i-1).(($v)?'C':'F')."V",$volt,$s-1);
         my $tmp .= sprintf(" %4i V | %2.2f uA",$volt,$curr);
         $tmp =~ s/\s/&nbsp;/gi;
         $str .= "<td title=\"$tv / $tc\">".$tmp;
@@ -157,7 +157,8 @@ while(1) {
   my $value    = sprintf("%.1f/%.1f/%.1f/%.1f",$mdcHvMin[1]/1000.,$mdcHvMin[2]/1000.,$mdcHvMin[3]/1000.,$mdcHvMin[4]/1000.);
   my $longtext = "MDC high voltage in all four planes".
                  "<br>Minimum [V]: ".$mdcHvMin[1]." / ".$mdcHvMin[2]." / ".$mdcHvMin[3]." / ".$mdcHvMin[4].
-                 "<br>Maximum [V]: ".$mdcHvMax[1]." / ".$mdcHvMax[2]." / ".$mdcHvMax[3]." / ".$mdcHvMax[4];
+                 "<br>Minimum [V]: ".$mdcHvMin[1]." / ".$mdcHvMin[2]." / ".$mdcHvMin[3]." / ".$mdcHvMin[4].
+                 "<br>Nominal [V]: ".$QA::MdcNominalHV[0]." / ".$QA::MdcNominalHV[1]." / ".$QA::MdcNominalHV[2]." / ".$QA::MdcNominalHV[3];
   QA::WriteQALog($flog,"other","mdcinvalid",10,$qastate,"MDC HV",$value,$longtext);  
   $timer++;
   sleep(1);
old mode 100644 (file)
new mode 100755 (executable)
index 90d8fb8aee072a47b778fc147adeace6cc9a07b1..71f7ab93931e7c40278774e036c854f5f8682192 100755 (executable)
@@ -6,6 +6,7 @@ use POSIX qw(strftime);
 use FileHandle;
 use Data::Dumper;
 use POSIX qw/floor ceil/;
+use List::Util qw/min max/;
 use Hmon;
 use QA;
 use Perl2Epics;
@@ -28,8 +29,8 @@ my $plot = {
     sizey   => 260,
     curves  => 6,
     xscale  => 4,
+    storable=> 1,
     colors  => ["#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"]};
-$plot->{storable}= 1;
 HPlot::PlotInit($plot);
 
 my $plot2 = {
@@ -45,8 +46,8 @@ my $plot2 = {
     sizey   => 260,
     curves  => 6,
     xscale  => 30,
+    storable=> 1,
     colors  => ["#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"]};
-$plot2->{storable}= 1;
 HPlot::PlotInit($plot2);
 
 
@@ -75,10 +76,14 @@ my $overcurrent_alarm_flag = 0;
 my $current_average = 0;
 my $current_sum = 0;
 
+my $errortimer = 0;
+
 # Only if the current is larger than OVERCURRENT_PERIOD, the alarm will set off.
 
 
 while(1) {
+  my $min = 1E5;
+  my $max = 0;
   my $data = Perl2Epics::GetAll();
   $str = Hmon::MakeTitle(12, 13, "RICH HV currents", 1, "");
   $str .= "<table class=\"rates \">\n";
@@ -90,6 +95,8 @@ while(1) {
   $str .= "<tr><th>Volt.";
   for(my $v = 1; $v<=6; $v++) {
     $str .= sprintf("<td> %i V\n",$data->{"U$v"}->{val} || -1);
+    $min = min($min,$data->{"U$v"}->{val}||1E6);
+    $max = max($max,$data->{"U$v"}->{val}||0);
     }
   $str .= "</table>\n";
   $str .= qq@<img src="%ADDPNG files/RichCurr.png%" type="image/png">\n@;
@@ -110,18 +117,28 @@ while(1) {
   my $value = "";
   my $longtext = "";
 
+  if($min < 2200) {
+    $qastate = QA::WARN;
+    $errortimer++;
+    }
+  else {
+    $errortimer = 0;
+    }
+  if($errortimer >= 800) {
+    $qastate = QA::ERROR;
+    if (!($errortimer%200)) {
+      Hmon::Speak('richhv', "Rich high voltage error");
+      }
+    }
+  
   if( $timer % (4*$OVERCURRENT_period) == 0) {
-      $value    = sprintf("%i nA",$current_average);
+      $value    = sprintf("%.2f / %.2f kV",$min/1000,$max/1000);
       $longtext = sprintf("Averaged current in RICH HV: %i uA",$current_average);
+      $longtext.= sprintf("<br>HV settings: %i, %i, %i, %i, %i, %i V", $data->{"U1"}->{val}, $data->{"U2"}->{val},
+                                                                       $data->{"U3"}->{val}, $data->{"U4"}->{val},
+                                                                       $data->{"U5"}->{val}, $data->{"U6"}->{val});
       #print "current_average: $current_average, sum: $current_sum\n";
-      if($current_average > $OVERCURRENT_RED) {
-        $longtext = "RICH overcurrent, please stop the beam request immediately and call the operators!\n";
-        $qastate = QA::WARN;
-      }
-      elsif ($current_average > $OVERCURRENT_YELLOW) {
-        $longtext = "RICH overcurrent yellow, please watch the beam intensity and be alert to remove the beam request!\n";
-        $qastate = QA::WARN_2;
-      }
+
       $current_sum = 0;
       QA::WriteQALog($flog,"other","rich",30,$qastate,"RICH HV",$value,$longtext);
   }
index 914abca00d8ad572b6683b9803474632bc6b4d9f..2836b19e9d5ad78a8b9c378142d4385f9d83cf0c 100755 (executable)
@@ -10,6 +10,7 @@ use List::Util qw(min max);
 use Perl2Epics;
 
 my @names;
+my $errorcounter;
 my @variables = qw(
 
 HAD:TOFHV:G1:status:alive:roc:average
@@ -123,7 +124,16 @@ while(1) {
   $longtxt = "All sequencers running" if $longtxt eq "";
   my $value = ((scalar @names)-$count)."/".(scalar @names);  
   QA::WriteQALog($flog,"other","sequencer",20,$qastate,"HV Sequencer",$value,$longtxt); 
-  
+  if($qastate == QA::FATAL) {
+    if(!($errorcounter%15)){
+      Hmon::Speak('nobeam', "High Voltage Control is not working");
+      }
+    $errorcounter++;
+    }
+  else { 
+    $errorcounter = 0;
+    }
+    
   sleep(10);
   }
 
index c6625ba518b7d2e528f0797a8a45e18192f235d0..c1e0f042557af0f92295e4edce76f79073a294b8 100755 (executable)
@@ -31,7 +31,7 @@ mkdir `pwd`/pion
 DISPLAY=:0 ssh -f -X lxhadeb06 "ping -i 100 lxhadesdaqp" &>/dev/null &
 
 sshfs -o allow_other hades-qa@lxhadeb06:/home/hades-qa/online/jun14/pics/vertex `pwd`/vertex
-sshfs -o allow_other hades-qa@lxhadeb06:/home/hades-qa/online/jun14/pics `pwd`/qa
+sshfs -o allow_other hades-qa@lxhadeb06:/home/hades-qa/online/aug14/pics `pwd`/qa
 sshfs -o allow_other hadaq@lxhadeb06:/data01/tmp/ `pwd`/pion