+++ /dev/null
-#!/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
+++ /dev/null
-#!/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'"
+++ /dev/null
-#!/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'"
-
+++ /dev/null
-#!/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'"
-
-
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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'"
+++ /dev/null
-#!/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'"
-
+++ /dev/null
-#!/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'"
-
-
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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'"
+++ /dev/null
-#!/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'"
-
+++ /dev/null
-#!/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'"
-
-
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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'"
+++ /dev/null
-#!/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'"
-
+++ /dev/null
-#!/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'"
-
-
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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'"
+++ /dev/null
-#!/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'"
-
+++ /dev/null
-#!/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'"
-
-
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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'"
+++ /dev/null
-#!/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'"
-
+++ /dev/null
-#!/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'"
-
-
}
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);
sub PlotAdd {
my($name,$value,$curve) = @_;
$curve = 0 unless $curve;
-
push(@{$p->{$name}->{value}->[$curve]},$value||0);
shift(@{$p->{$name}->{value}->[$curve]});
# 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'];
$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'];
<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.
--- /dev/null
+<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)
+
+
+
+
<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.
+++ /dev/null
-<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.
-
-
-
--- /dev/null
+<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>
+
--- /dev/null
+<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
--- /dev/null
+<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
$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
while (1) {
+ my @sumx;
+ my @sumy;
my $o;
foreach my $b (0x5000,0x5002,0x5003) {
my $t = trb_register_read_mem($b,0xc000,0,33);
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);
$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};
}
}
# 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};
$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);
}
}
- 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);
#print Dumper $data;
#print $data->{'TempAlarmEPICS'}->{'val'} . "\n";
+#print $mailerrstatecnt . "\n";
#exit;
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;
}
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 .
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,
--- /dev/null
+#!/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
my $fqa = QA::OpenQAFile();
my $offset;
+my $starterrorcnt = 0;
sub getCorrected {
my ($val,$cor) = @_;
$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);
use QA;
use HADES::TrbNet;
use HPlot;
+use Perl2Epics;
my $lastspill = 1;
my $evtrate = 0;
my $spillavgshort = 0;
my $spillavglong = 0;
my $errtime = 0;
-
+my $lastspillcount = 0;
+my $countnochange = 0;
my $plot = ();
$plot->{name} = "EvtsPerSpill";
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);
$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.");
+# }
}
}
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 {
<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 & 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>
use Getopt::Long;
use Data::Dumper;
-my $magnet_on = 0;
+my $magnet_on = 1;
my %range_list = (
'Time' => {},
'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 },
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/ /gi;
$str .= "<td title=\"$tv / $tc\">".$tmp;
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);
use FileHandle;
use Data::Dumper;
use POSIX qw/floor ceil/;
+use List::Util qw/min max/;
use Hmon;
use QA;
use Perl2Epics;
sizey => 260,
curves => 6,
xscale => 4,
+ storable=> 1,
colors => ["#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"]};
-$plot->{storable}= 1;
HPlot::PlotInit($plot);
my $plot2 = {
sizey => 260,
curves => 6,
xscale => 30,
+ storable=> 1,
colors => ["#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"]};
-$plot2->{storable}= 1;
HPlot::PlotInit($plot2);
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";
$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@;
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);
}
use Perl2Epics;
my @names;
+my $errorcounter;
my @variables = qw(
HAD:TOFHV:G1:status:alive:roc:average
$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);
}
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