]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
Beamtime Preparation...
authorhadaq@countinghouse <hadaq@gsi.de>
Sat, 26 Apr 2014 21:36:41 +0000 (23:36 +0200)
committerhadaq@countinghouse <hadaq@gsi.de>
Sat, 26 Apr 2014 21:36:41 +0000 (23:36 +0200)
32 files changed:
.gitignore
control/gui/daq/10_Start_DAQ
control/gui/daq/50_Reboot_TRB3 [new file with mode: 0755]
control/gui/expert/RICH_Powercycle [changed mode: 0644->0755]
control/gui/monitor/28_Epics
control/gui/monitor/30_Epics_EB
control/gui/monitor/80_Daq_VNC
evtbuild/eb.conf
hmon/QA.pm
hmon/hmon_diamond.pl [changed mode: 0755->0644]
hmon/hmon_endpoints.pl
hmon/hmon_hodo.pl
hmon/hmon_hodo_hist.pl [new file with mode: 0755]
hmon/hmon_nxyter_status.pl [new file with mode: 0755]
hmon/hmon_pionadc.pl [new file with mode: 0755]
hmon/hmon_pionrate.pl
hmon/hmon_rate2.pl
hmon/hmon_shower.pl [changed mode: 0755->0644]
hmon/hmon_starthist.pl [changed mode: 0755->0644]
hmon/hmon_trgsource.pl
hmon/index.cgi
hmon/permanent/hmon_archiver.pl [changed mode: 0644->0755]
hmon/permanent/hmon_ebdiskfill.pl
hmon/permanent/hmon_pionlv.pl [new file with mode: 0644]
hmon/permanent/hmon_pionsupply.pl [new file with mode: 0755]
hmon/permanent/hmon_qa.pl
hmon/start.sh
hub/configure_ports.script
start/ThreshNinoStart.db
start/ThreshPadiwaVeto.db
start/startup.script
utils/allmonoff

index dc267f6ff1ba57f4dfe2bedc4e51dfcef93e35e5..e78feb7a2632dadc4541d17af2f603bdebc83c21 100644 (file)
@@ -11,3 +11,5 @@ bitfiles
 nohup.out
 delme
 *.back
+archive
+tables
index 363c6117db60b068a40a5bf0116aede3405b70c4..fed9db926e984ad2a8b674f94a52a3635d77fb7c 100755 (executable)
@@ -7,7 +7,7 @@ if [ $myvar == "256" ]; then exit; fi
 
 
 xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
-  ssh -X hadaq@lxhadesdaq "
+  ssh hadaq@lxhadesdaq "
   source /home/hadaq/.bash_profile
   echo \"  <Startup> Connected to lxhadesdaq...\"
   echo \"  <Startup> Starting DAQ with default settings...\"
diff --git a/control/gui/daq/50_Reboot_TRB3 b/control/gui/daq/50_Reboot_TRB3
new file mode 100755 (executable)
index 0000000..88d671e
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+use warnings;
+use HADES::TrbNet;
+$ENV{'DAQOPSERVER'} = "hades31";
+trb_init_ports() or die "could not reach trbnet-daemon.", trb_strerror();
+system("trbcmd reload 0x8880");
+system("trbcmd reload 0x8890");
+system("trbcmd reload 0x8900");
+system("trbcmd reload 0x8910");
+  
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index b5dbd9349b4d26e8e3ec54fb569384df37267d4d..a3a15ea83cbef05002d3c897e9dc65eac2df85c3 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/bash
 
 #ssh -X -l scs lxhadeb06 '. /home/scs/.profile; medm -x hades.adl' 
-export EPICS_CA_ADDR_LIST="192.168.103.255 hadsc1 e7had2"; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/epics/EPICS/EPICS-3.14.12.4/extensions/bin/linux-x86_64/medm -x /home/scs/operator/hades.adl &
+ssh -X scs@lxhadeb06 'export EPICS_CA_ADDR_LIST="192.168.103.255 hadsc1 e7had2"; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/epics/EPICS/EPICS-3.14.12.4/extensions/bin/linux-x86_64/medm -x /home/scs/operator/hades.adl &'
index ed9b9b7c500ebb3bcccf09f58f390555972b2041..4cf305c744e68013e38a569496e41d92073f122f 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/bash
-#ssh -X scs@lxhadeb06  'export EPICS_CA_ADDR_LIST=192.168.103.255; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/epics/EPICS/EPICS-3.14.12.4/extensions/bin/linux-x86_64/medm -x -macro "SUBSYSNUM=24" ~/operator/ebmainctrl.adl'
-export EPICS_CA_ADDR_LIST=192.168.103.255; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/epics/EPICS/EPICS-3.14.12.4/extensions/bin/linux-x86_64/medm -x -macro "SUBSYSNUM=24" /home/scs/operator/ebmainctrl.adl &
+ssh -X scs@lxhadeb06  'export EPICS_CA_ADDR_LIST=192.168.103.255; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/epics/EPICS/EPICS-3.14.12.4/extensions/bin/linux-x86_64/medm -x -macro "SUBSYSNUM=24" ~/operator/ebmainctrl.adl'
+#export EPICS_CA_ADDR_LIST=192.168.103.255; export EPICS_CA_AUTO_ADDR_LIST=NO; /home/epics/EPICS/EPICS-3.14.12.4/extensions/bin/linux-x86_64/medm -x -macro "SUBSYSNUM=24" /home/scs/operator/ebmainctrl.adl &
index 7066e8c4976f0717ef75a9e3cf898307abf51fca..36e882ea0ea1db1f54be1e8fca291a3507aa7faf 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/bash
-vncviewer -passwd ~/.vnc/daqvncpasswd lxhadesdaq:1 &
+vncviewer -passwd ~/.vnc/daqvncpasswd hadesdaq01:1 &
 
index d3d7e02a337f31b87cd56ef8519651b315d937dc..ed0481742148b8970ff40e4008b863133107e575 120000 (symlink)
@@ -1 +1 @@
-eb.conf.mai14_withRFIO
\ No newline at end of file
+eb.conf.mai14_noRFIO_noDABC
\ No newline at end of file
index 38df908ca10e166a7f16b48fb262f365df1d5df6..c6ad492ee4de0a19160c6bb5d01b66a7f785d1e6 100644 (file)
@@ -8,9 +8,10 @@ use Hmon;
 our $cats = {'main'=>"Main",
              'daq'=>"DAQ",
              'trg'=>"Trig",
+             'rate'=>"Rate",
              'server'=>"Srv",
              'eb'=>"EB",
-             'mdc'=>"MDC",
+#             'mdc'=>"MDC",
              'endp'=>"Endp",
              'feeerr'=>"Fee",
              'other'=>"Other",
@@ -20,25 +21,28 @@ our $cats = {'main'=>"Main",
 our $entries->{'cats'} = ["main",
                           "daq",
                           "trg",
+                          "rate",
                           "server",
                           "eb",
-                          "mdc",
+#                          "mdc",
                           "endp",
                           "feeerr",
+                          "pion",
                           "other",
-                          "pion"];
+];
 
 # Order of entries in each cat
 $entries->{'main'}    = ['time', 'rate','onlineqa','up'];
 $entries->{'daq'}     = ['trbnet', 'timeouts', 'busy','readout'];
-$entries->{'trg'}     = ['spill', 'source', 'accepted', 'ptrate', 'start'];
+$entries->{'trg'}     = ['spill', 'source']; #, 'accepted', 'ptrate', 'start'
+$entries->{'rate'}    = ['pt1','start','hodo','pion1','pion2'];
 $entries->{'server'}  = ['fill', 'cpu', 'icinga', 'etrax', 'pwrsup'];
 $entries->{'eb'}      = ['run', 'rate','bytes', 'lostevt', 'errbits'];
-$entries->{'mdc'}     = ['token', 'blocked', 'temp', 'linkqual', 'voltage'];
-$entries->{'endp'}    = ['mdc', 'rich', 'tof', 'rpc', 'other'];
+#$entries->{'mdc'}     = ['token', 'blocked', 'temp', 'linkqual', 'voltage'];
+$entries->{'endp'}    = ['rich', 'tof', 'rpc', 'other'];                       #'mdc'
 $entries->{'feeerr'}  = ['rich', 'trb', 'feeerr','trginp','trgqual'];
-$entries->{'other'}   = ['magnet','speech','shower','rich','mdcinvalid'];
-$entries->{'pion'}    = ['nxstatus', 'LV', 'HV', 'cooling', 'rate'];
+$entries->{'other'}   = ['speech','rich'];                                     #'magnet','mdcinvalid','shower'
+$entries->{'pion'}    = ['nxstatus', 'HV', 'cooling'];
 
 
 our $QAServer = "hades33";
@@ -147,7 +151,7 @@ sub WriteQALog {
   my $tmp = time()."\t$category\t$entry\t$ttl\t$status\t$title\t$value\t$longtext\n";
 
   if ($fh eq "remote") {
-    system("ssh $QAServer \"echo '$tmp' >> /home/hadaq/trbsoft/daq/tools/hmon/files/qalog\"");
+    system("ssh $QAServer \"echo '$tmp' >> /home/hadaq/trbsoft/daq/hmon/files/qalog\"");
     return;
     }
 
old mode 100755 (executable)
new mode 100644 (file)
index 43d052a..bb06b48
@@ -15,7 +15,6 @@ use List::Util qw[min max];
 my $plot2 = ();
 $plot2->{name}    = "DiamondRate";
 $plot2->{file}    = "files/DiamondRate";
-$plot2->{curves}  = 1;
 $plot2->{entries} = 7;
 $plot2->{curves}  = 7;
 $plot2->{type}    = HPlot::TYPE_HEATMAP;
index 418ea617804dfabcfe5d5d33ff7ec08ccf83ef4c..0f97d9fdbdc077796fcebc06703698b1589b7c29 100755 (executable)
@@ -93,8 +93,8 @@ while(1) {
 
     my @other_boards =(
        #shower
-       0x3200,0x3201,0x3202,0x3210,0x3211,0x3212,0x3220,0x3221,0x3222,0x3230,0x3231,0x3232,0x3240,0x3241,0x3242,
-       0x3250,0x3251,0x3252,
+#      0x3200,0x3201,0x3202,0x3210,0x3211,0x3212,0x3220,0x3221,0x3222,0x3230,0x3231,0x3232,0x3240,0x3241,0x3242,
+#      0x3250,0x3251,0x3252,
        #shower-hub
 #      0x8500,0x8501,
        #cts
@@ -106,11 +106,12 @@ while(1) {
        #start/veto hub
        0x8800,0x8801,
        #fw
-       0x4400,0x4410,0x4420,
+#      0x4400,0x4410,0x4420,
        #fw hub
-       0x8700,0x8701,
+#      0x8700,0x8701,
        #Pion
        0x8900,0x3800,0x3801,
+       0x8910,0x3810,0x3811,
        #Start TRB3
        0x8880,0x5000,0x5002,0x5003,
        #Hodo TRB3
@@ -146,13 +147,13 @@ while(1) {
     if ($num_mdc_mistake > 0) {$longtext .= " Endp @{$mdc_results[4]} not known";} 
 
 
-    my $qastate = QA::GetQAState('below',$num_mdc_missing,@QA::MdcEndpMissingLimits);
-    Hmon::Speak('mdcmiss',"$num_mdc_missing MDC Frontends missing") if($qastate > 60);
-    QA::WriteQALog($flog,"endp","mdc",$waittime,$qastate,$title,$value,$longtext);
-    if($qastate > 60) {
-      system("logger -p local1.info -t DAQ Endp \\<E\\> $longtext") unless (($timecnt->{mdc}++)%$loggerperiod);
-      }
-    else {$timecnt->{mdc} = 0;}
+     my $qastate = QA::GetQAState('below',$num_mdc_missing,@QA::MdcEndpMissingLimits);
+#    Hmon::Speak('mdcmiss',"$num_mdc_missing MDC Frontends missing") if($qastate > 60);
+#    QA::WriteQALog($flog,"endp","mdc",$waittime,$qastate,$title,$value,$longtext);
+#    if($qastate > 60) {
+#      system("logger -p local1.info -t DAQ Endp \\<E\\> $longtext") unless (($timecnt->{mdc}++)%$loggerperiod);
+#      }
+#    else {$timecnt->{mdc} = 0;}
     
     ###rich
     my(%rich_mask, @rich_results);
index 67799eda77dabcdfe04b759ac01f375a0f412af3..6172559fcc0f10287d741b225d56f1176970a46c 100755 (executable)
@@ -15,7 +15,6 @@ use List::Util qw[min max];
 my $plot2 = ();
 $plot2->{name}    = "HodoRate";
 $plot2->{file}    = "files/HodoRate";
-$plot2->{curves}  = 1;
 $plot2->{entries} = 2;
 $plot2->{curves}  = 16;
 $plot2->{type}    = HPlot::TYPE_HEATMAP;
@@ -30,15 +29,37 @@ $plot2->{xmax}    = 1.5;
 $plot2->{ymin}    = 15.5;
 $plot2->{ymax}    = -0.5;
 $plot2->{showvalues} = 1;
-
 HPlot::PlotInit($plot2);
 
+my $plot = ();
+$plot->{name}    = "HodoRatePlot";
+$plot->{file}    = "files/HodoRatePlot";
+$plot->{entries} = 16;
+$plot->{curves}  = 2;
+$plot->{type}    = HPlot::TYPE_HISTORY;
+$plot->{output}  = HPlot::OUT_PNG;
+$plot->{xlabel}  = "Bar";
+$plot->{ylabel}  = "Hitrate";
+$plot->{sizex}   = 580;
+$plot->{sizey}   = 365;
+$plot->{nokey}   = 1;
+$plot->{xscale}  = -1;
+$plot->{xmin}    = -0.5;
+$plot->{xmax}    = 16.5;
+$plot->{ymin}    = 0;
+$plot->{buffer}  = 1;
+HPlot::PlotInit($plot);
+
 
 my $str  = Hmon::MakeTitle(9, 10, "Hodoscope Hit Rate");
 $str .= qq@<img src="%ADDPNG files/HodoRate.png%" type="image/png"><br>\n@;
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("HodoRate",$str);
 
+$str  = Hmon::MakeTitle(9, 8, "Hodoscope Hit Rate");
+$str .= qq@<img src="%ADDPNG files/HodoRatePlot.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("HodoRatePlot",$str);
 
 my $old;
 my $oldtime = time();
@@ -65,16 +86,17 @@ while (1) {
         $diff->{$b}->[$v] = $vdiff/($tdiff|1);
         }
       }
-
     for my $bar (0..7) {
       for my $x (0..1) {
-        HPlot::PlotFill('HodoRate',$diff->{0x5010}->[$bar*2+1+$x*16],$x,$bar);
-        HPlot::PlotFill('HodoRate',$diff->{0x5013}->[$bar*2+1+$x*16],$x,$bar+8);
+        HPlot::PlotFill('HodoRate',$diff->{0x5010}->[$bar*2+1+$x*16],$x,$bar+8);
+        HPlot::PlotFill('HodoRate',$diff->{0x5013}->[$bar*2+1+$x*16],$x,$bar);
+        HPlot::PlotFill('HodoRatePlot',$diff->{0x5010}->[$bar*2+1+$x*16],$bar+8,$x);
+        HPlot::PlotFill('HodoRatePlot',$diff->{0x5013}->[$bar*2+1+$x*16],$bar,$x);        
         }
       }
-    HPlot::PlotDraw('HodoRate');      
+    HPlot::PlotDraw('HodoRate');  
+    HPlot::PlotDraw('HodoRatePlot');  
     }
-
   $old = $o;
   $oldtime = time();
   sleep(1);
diff --git a/hmon/hmon_hodo_hist.pl b/hmon/hmon_hodo_hist.pl
new file mode 100755 (executable)
index 0000000..a9f4417
--- /dev/null
@@ -0,0 +1,84 @@
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+use Data::Dumper;
+use Data::TreeDumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+use HPlot;
+use Time::HiRes qw(usleep time);
+use List::Util qw[min max];
+
+
+my $plot = ();
+$plot->{name}    = "HodoHist";
+$plot->{file}    = "files/HodoHist";
+$plot->{curves}  = 8;
+$plot->{entries} = 200;
+$plot->{type}    = HPlot::TYPE_HISTORY;
+$plot->{output}  = HPlot::OUT_PNG;
+$plot->{zlabel}  = "Hitrate";
+$plot->{sizex}   = 880;
+$plot->{sizey}   = 465;
+$plot->{nokey}   = 0;
+$plot->{buffer}  = 1;
+$plot->{xscale}  = 10;
+$plot->{xlabel}  = "Time [s]";
+$plot->{ylabel}  = "Hits [1/s]";
+HPlot::PlotInit($plot);
+
+
+my $str  = Hmon::MakeTitle(12, 10, "Hodoscope Hit History");
+$str .= qq@<img src="%ADDPNG files/HodoHist.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("HodoHist",$str);
+
+my $timer = 0;
+my $old;
+my $oldtime = 0;
+my $time = 0;
+my $diff;
+my $iter = 0;
+
+trb_init_ports() or die trb_strerror();
+
+
+while (1) {
+  my $o;
+  foreach my $b (0x5010,0x5013) {
+    my $t = trb_registertime_read_mem($b,0xc000,0,33);
+    $o->{$b} = $t->{$b};
+    }
+
+  if (defined $old) {
+    foreach my $b (keys %$o) {
+      for my $v (0..32) {
+        my $tdiff = $o->{0x5010}->{time}->[0] - $oldtime;
+        my $vdiff = ($o->{$b}->{value}->[$v]&0xffffff) - ($old->{$b}->{value}->[$v]&0xffffff);
+        if ($vdiff < 0) { $vdiff += 2**24;}
+        if ($tdiff < 0) { $tdiff += 2**16;}
+        $tdiff *= 16;
+        $diff->{$b}->[$v] = $vdiff/($tdiff||1E6)*1E6;
+        }
+      }
+    my @sum = qw(0 0 0 0 0 0 0 0);
+    for my $bar (0..7) {
+      for my $x (0..1) {
+        $sum[$bar/2+4] += $diff->{0x5010}->[$bar*2+1+$x*16];
+        $sum[$bar/2]   += $diff->{0x5013}->[$bar*2+1+$x*16];
+        }
+      }
+    for my $i (0..7) {  
+      HPlot::PlotAdd("HodoHist",$sum[$i]/2,$i);  
+      }
+    unless($timer++ %  10) {
+      HPlot::PlotDraw('HodoHist');  
+      }
+    }
+
+  $old = $o;
+  $oldtime = $o->{0x5010}->{time}->[0];
+  usleep(100000);
+  }
diff --git a/hmon/hmon_nxyter_status.pl b/hmon/hmon_nxyter_status.pl
new file mode 100755 (executable)
index 0000000..45c4184
--- /dev/null
@@ -0,0 +1,50 @@
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+use QA;
+use Data::Dumper;
+use HADES::TrbNet;
+
+my $SLEEP_TIME = 1;
+my $flog = QA::OpenQAFile();
+
+trb_init_ports() or die trb_strerror();
+
+while (1) {
+
+  # Default Output Values
+  my $title     = "NX Status";
+  my $shorttext = "";
+  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 $error_ctr = 0;
+  my $error_msg = "";
+
+  foreach my $board (sort {$a <=> $b} keys %$rh_status) {
+    if ($rh_status->{$board} > 0) {
+       $error_msg = $error_msg .
+       sprintf " - 0x%04x:  0x%02x", $board, $rh_status->{$board};
+       $error_ctr++;   
+    }
+  }
+  
+  # Create Output Messages
+  if (($error_ctr > 0)) {
+      $shorttext = "Errors: ${error_ctr}";
+      
+      $longtext = "Errors on: ";
+      $longtext = $longtext . $error_msg;
+      $status = QA::WARN;
+  }
+  
+  QA::WriteQALog($flog, "pion", "nxstatus", $SLEEP_TIME * 2,
+                $status, $title, $shorttext, $longtext);
+  
+  sleep $SLEEP_TIME;
+}
diff --git a/hmon/hmon_pionadc.pl b/hmon/hmon_pionadc.pl
new file mode 100755 (executable)
index 0000000..e5712f9
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+use Hmon;
+
+my $str = "";
+
+
+$str = Hmon::MakeTitle(9,12,"Pion 1 ADC Values", 0);
+$str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/PionADC1X.png%\" type=\"image/png\"><br/>\n";
+$str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/PionADC1Y.png%\" type=\"image/png\">\n";
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("pion1adc",$str);
+
+$str = Hmon::MakeTitle(9,12,"Pion 2 ADC Values", 0);
+$str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/PionADC2X.png%\" type=\"image/png\"><br/>\n";
+$str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/PionADC2Y.png%\" type=\"image/png\">\n";
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("pion2adc",$str);
+
+
+
+  qx(./hmon_hadplot.sh -d 2000 -a 0x3800 -r 0x8b00 -m 128 -w 32 -p 0 -t "Y Channel" -xtitle "Y Channels" -key -xtitle "DOWN (5cm)                                                                       UP (5cm)" -key -curvestyle steps -xmin -1 -xmax 128 -ymin 0 -ymax 4100 -output "PNG.files/PionADC1X.700.265" reg >/dev/null &
+     ./hmon_hadplot.sh -d 2000 -a 0x3801 -r 0x8b00 -m 128 -w 32 -p 0 -t "X Channel" -xtitle "X Channels" -key -xtitle "RIGHT (-5cm)                                                                  LEFT (5cm)" -key -curvestyle steps -xmin -1 -xmax 128 -ymin 0 -ymax 4100  -output "PNG.files/PionADC1Y.700.265" reg >/dev/null &
+     ./hmon_hadplot.sh -d 2000 -a 0x3810 -r 0x8b00 -m 128 -w 32 -p 0 -t "Y Channel" -xtitle "Y Channels" -key -xtitle "DOWN (5cm)                                                                       UP (5cm)" -key -curvestyle steps -xmin -1 -xmax 128 -ymin 0 -ymax 4100  -output "PNG.files/PionADC2X.700.265" reg >/dev/null &
+     ./hmon_hadplot.sh -d 2000 -a 0x3811 -r 0x8b00 -m 128 -w 32 -p 0 -t "X Channel" -xtitle "X Channels" -key -xtitle "RIGHT (-5cm)                                                                  LEFT (5cm)" -key -curvestyle steps -xmin -1 -xmax 128 -ymin 0 -ymax 4100  -output "PNG.files/PionADC2Y.700.265" reg >/dev/null &);
+
+  
index 1b6e3d5323c6a346acf1525d97c7e2d685918607..3a57ab7c922e1437d703572e1a098f53e7481ab6 100755 (executable)
@@ -3,29 +3,81 @@
 use warnings;
 use strict;
 use Hmon;
+use HADES::TrbNet;
+use Data::Dumper;
+
+trb_init_ports() or die trb_strerror();
 
 my $str = "";
 
+my $plots = fork();
+
+
+if($plots) {
+  while(1) {
+    my $filter;
 
-$str = Hmon::MakeTitle(9,12,"Pion 1 Rates",0);
-#$str .= "\n#ADDFILE files/eventratehist.svg\n";
-$str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/Pion1X.png%\" type=\"image/png\"><br/>\n";
-$str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/Pion1Y.png%\" type=\"image/png\">\n";
-$str .= Hmon::MakeFooter();
-Hmon::WriteFile("pion1rate",$str);
+    $str = Hmon::MakeTitle(9,12,"Pion 1 Rates",0);
+    #
+    # Get Histogram Filter Status
+    #
+    $filter = trb_register_read(0x3800, 0x8400);
+    print Dumper $filter;
+    if (($filter->{0x3800} & 0x80000000) > 0) {
+       $str .= "All Data";     
+    } else {
+       $str .= "Event Buffer Data";
+    }
+    $str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/Pion1X.png%\" type=\"image/png\">\n";
+    
+    # Get Histogram Filter Status
+    #
+    $filter = trb_register_read(0x3801, 0x8400);
+    if (($filter->{0x3801} & 0x80000000) > 0) {
+       $str .= "All Data";     
+    } else {
+       $str .= "Event Buffer Data";
+    }
+    $str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/Pion1Y.png%\" type=\"image/png\">\n";
 
-$str = Hmon::MakeTitle(9,12,"Pion 2 Rates",0);
-#$str .= "\n#ADDFILE files/eventratehist.svg\n";
-$str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/Pion2X.png%\" type=\"image/png\"><br/>\n";
-$str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/Pion2Y.png%\" type=\"image/png\">\n";
-$str .= Hmon::MakeFooter();
-Hmon::WriteFile("pion2rate",$str);
+    $str .= Hmon::MakeFooter();
+    Hmon::WriteFile("pion1rate",$str);
 
+    # ---------------------------------------------------------------------------------------------------------
+    #
+    $str = Hmon::MakeTitle(9,12,"Pion 2 Rates",0);
+    #
+    # Get Histogram Filter Status
+    #
+    $filter = trb_register_read(0x3810, 0x8400);
+    if (($filter->{0x3810} & 0x80000000) > 0) {
+       $str .= "All Data";     
+    } else {
+       $str .= "Event Buffer Data";
+    }
+    $str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/Pion2X.png%\" type=\"image/png\"><br/>\n";
 
+    #
+    # Get Histogram Filter Status
+    #
+    $filter = trb_register_read(0x3811, 0x8400);
+    if (($filter->{0x3811} & 0x80000000) > 0) {
+       $str .= "All Data";     
+    } else {
+       $str .= "Event Buffer Data";
+    }
+    $str .= "<img width=\"700\" height=\"265\" src=\"%ADDPNG files/Pion2Y.png%\" type=\"image/png\">\n";
 
-  qx(./hmon_hadplot.sh -d 1000 -a 0x3800 -r 0x8800 -m 128 -w 32 -p 0  -output "PNG.files/Pion1X.700.265" regdiff >/dev/null &
-     ./hmon_hadplot.sh -d 1000 -a 0x3801 -r 0x8800 -m 128 -w 32 -p 0  -output "PNG.files/Pion1Y.700.265" regdiff >/dev/null &
-     ./hmon_hadplot.sh -d 1000 -a 0x3810 -r 0x8800 -m 128 -w 32 -p 0  -output "PNG.files/Pion2X.700.265" regdiff >/dev/null &
-     ./hmon_hadplot.sh -d 1000 -a 0x3811 -r 0x8800 -m 128 -w 32 -p 0  -output "PNG.files/Pion2Y.700.265" regdiff >/dev/null &);
+    $str .= Hmon::MakeFooter();
+    Hmon::WriteFile("pion2rate",$str);
+    sleep(5);
+    }
+  }
+else{
+  qx(./hmon_hadplot.sh -d 1000 -a 0x3800 -r 0x8800 -m 128 -w 32 -p 0  -t "Y Channels" -key -xtitle "DOWN (5cm)                                                                       UP (5cm)" -output "PNG.files/Pion1X.700.265" regdiff >/dev/null &
+     ./hmon_hadplot.sh -d 1000 -a 0x3801 -r 0x8800 -m 128 -w 32 -p 0  -t "X Channels" -key -xtitle "RIGHT (-5cm)                                                                  LEFT (5cm)" -output "PNG.files/Pion1Y.700.265" regdiff >/dev/null &
+     ./hmon_hadplot.sh -d 1000 -a 0x3810 -r 0x8800 -m 128 -w 32 -p 0  -t "Y Channels" -key -xtitle "DOWN (5cm)                                                                       UP (5cm)" -output "PNG.files/Pion2X.700.265" regdiff >/dev/null &
+     ./hmon_hadplot.sh -d 1000 -a 0x3811 -r 0x8800 -m 128 -w 32 -p 0  -t "X Channels" -key -xtitle "RIGHT (-5cm)                                                                  LEFT (5cm)" -output "PNG.files/Pion2Y.700.265" regdiff >/dev/null &);
+  }
 
   
index fb07e15134b0f6bddf7d4dc0bc243ea967fca177..6c9488fe20faa9068d57fd6a8c09540b89797dcb 100755 (executable)
@@ -4,10 +4,12 @@ use warnings;
 use strict;
 use Hmon;
 use HADES::TrbNet;
+use QA;
 
 trb_init_ports() or die trb_strerror();
 
 my $flog = Hmon::OpenLogfile();
+my $fqa  = QA::OpenQAFile();
 
 while (1) {
   my $rh_rate;
@@ -100,7 +102,39 @@ while (1) {
 
   Hmon::WriteFile("CTSRates", $str);
 
+  
+  my $shorttext; my $longtext; my $state;
+  
+  $state = QA::OK;
+  $shorttext = QA::SciNotation($store{0xa029})."Hz";
+  $longtext  = sprintf("Trigger Rate from Hodoscope %i Hz",$store{0xa029});
+  QA::WriteQALog($fqa, "rate", "hodo", 10,
+       $state, 'Hodo Rate', $shorttext, $longtext); 
 
+  $state = QA::OK;
+  $shorttext = QA::SciNotation($store{0xa02a})."Hz";
+  $longtext  = sprintf("Trigger Rate from Pion 1: %i Hz",$store{0xa02a});
+  QA::WriteQALog($fqa, "rate", "pion1", 10,
+       $state, 'Pion1 Rate', $shorttext, $longtext); 
+       
+  $state = QA::OK;
+  $shorttext = QA::SciNotation($store{0xa02b})."Hz";
+  $longtext  = sprintf("Trigger Rate from Pion 2: %i Hz",$store{0xa02b});
+  QA::WriteQALog($fqa, "rate", "pion2", 10,
+       $state, 'Pion2 Rate', $shorttext, $longtext); 
+
+  $state = QA::OK;
+  $shorttext = QA::SciNotation($store{0xa024})."Hz";
+  $longtext  = sprintf("Trigger Rate from PT1: %i Hz",$store{0xa024});
+  QA::WriteQALog($fqa, "rate", "pt1", 10,
+       $state, 'PT1 Rate', $shorttext, $longtext); 
+                
+  $state = QA::OK;
+  $shorttext = QA::SciNotation($store{0xa009})."Hz";
+  $longtext  = sprintf("Trigger Rate from Start: %i Hz",$store{0xa009});
+  QA::WriteQALog($fqa, "rate", "start", 10,
+       $state, 'Start Rate', $shorttext, $longtext);        
+       
   sleep 1;
 }
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 5cc8ccc839dbcbb3f53036648d36e5491c2b1366..1d2bee57b7382d54a5506e5f4aec0108c9e82ac8 100755 (executable)
@@ -24,8 +24,8 @@ my @lnames= qw(SectorwiseMult1 SectorwiseMult2 SectorwiseMult3
 SectorwiseMult4 SectorwiseMult5 SectorwiseMult6 SectorwiseMult2NoNeighbour 
 SectorwiseMult3NoNeighbour SectorwiseMult2Opposite);
 
-my @ptnames= qw(M2 M5 M20 PT4 PT5 FW PT7 PT8);
-my @ptlnames= qw(PT1/M2 PT2/M5 PT3/M20 PT4 PT5 PT6/ForwardWall PT7 PT8);
+my @ptnames= qw(M2 M5 M16 PT4 PT5 Hod Pi1 Pi0);
+my @ptlnames= qw(PT1/M2 PT2/M5 PT3/M16 PT4 PT5 PT6/Hodoscope PT7/Pion1 PT8/Pion0);
 
 my $lastlongmsg = "";
 my $spillsum = 0;
index 6b7255d0998bd5e369ccebc7dc672b4a452f451a..cb68effab06a4a560c433d5317312e743e91b0eb 100755 (executable)
@@ -52,11 +52,15 @@ function openwin(url) {
 <li><a href="monitor.cgi?1-window-DiamondRate">Rate on Start Diamond</a></li>
 <li><a href="monitor.cgi?1-window-pion1rate">Rate on Pion 1</a></li>
 <li><a href="monitor.cgi?1-window-pion2rate">Rate on Pion 2</a></li>
-<li><a href="monitor.cgi?1-window-HodoRate">Rate on Hodoscope</a></li>
+<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-HodoRate">Rate on Hodoscope (heatmap)</a></li>
+<li><a href="monitor.cgi?1-window-HodoRatePlot">Rate on Hodoscope (curve)</a></li>
 </ul></div>
 
 
-<div class="linkbox" style="float:right"><h4>Trigger</h4><ul>
+<div class="linkbox" style="float:left"><h4>Trigger</h4><ul>
 <li><a href="monitor.cgi?1-window-CTSRates">Rates on CTS Trigger I/O</a></li>
 <li><a href="monitor.cgi?1-window-eventrateshort">Eventrate histogram (10s)</a></li>
 <li><a href="monitor.cgi?1-window-eventrate">Eventrate histogram (60s)</a></li>
@@ -71,7 +75,7 @@ function openwin(url) {
 </ul></div>
 
 
-<div class="linkbox"><h4>MDC</h4><ul>
+<div class="linkbox" style="float:right"><h4>MDC</h4><ul>
 <li><a href="monitor.cgi?10-MDCRates-MDCBusy-MDCTemperature-MDCRetransmission-MDCTriggerError-MDCTokenMiss">MDC Overview</a></li>
 <li><a href="monitor.cgi?2-window-MDCBusy">MDC Busy Times</a></li>
 <li><a href="monitor.cgi?2-window-MDCRates">MDC Data Rates</a></li>
@@ -84,6 +88,11 @@ function openwin(url) {
 </ul></div>
 
 
+<div class="linkbox" style="float:left"><h4>High Voltage</h4><ul>
+<li><a href="monitor.cgi?10-MDCHV">MDC HV settings</a></li>
+<li><a href="files/MDCHVtrends.htm">MDC HV trend plots</a></li>
+<li><a href="monitor.cgi?1-RichHV">RICH HV settings &amp; currents</a></li>
+</ul></div>
 
 
 <div class="linkbox" style="float:right"><h4>Eventbuilder</h4><ul>
@@ -92,11 +101,6 @@ function openwin(url) {
 <li><a href="monitor.cgi?10-window-hldlast">Last hld files written</a></li>
 </ul></div>
 
-<div class="linkbox"><h4>High Voltage</h4><ul>
-<li><a href="monitor.cgi?10-MDCHV">MDC HV settings</a></li>
-<li><a href="files/MDCHVtrends.htm">MDC HV trend plots</a></li>
-<li><a href="monitor.cgi?1-RichHV">RICH HV settings &amp; currents</a></li>
-</ul></div>
 
 $;
 
old mode 100644 (file)
new mode 100755 (executable)
index 8bbbc51..7421740
@@ -54,12 +54,12 @@ while(1) {
   my $time = strftime("%Y%m%d%H%M",localtime());
 #     my $time = "201204111356";
 
-  system("mkdir /home/hadaq/trbsoft/daq/tools/hmon/archive/$time");
-  system("cp /home/hadaq/trbsoft/daq/tools/hmon/files/*.htt /home/hadaq/trbsoft/daq/tools/hmon/files/*.png /home/hadaq/trbsoft/daq/tools/hmon/archive/$time");
-  system("mkdir /home/hadaq/trbsoft/daq/tools/hmon/archive/$time/files");
-  system("mv /home/hadaq/trbsoft/daq/tools/hmon/archive/$time/*.png /home/hadaq/trbsoft/daq/tools/hmon/archive/$time/files/");
+  system("mkdir /home/hadaq/trbsoft/daq/hmon/archive/$time");
+  system("cp /home/hadaq/trbsoft/daq/hmon/files/*.htt /home/hadaq/trbsoft/daq/hmon/files/*.png /home/hadaq/trbsoft/daq/hmon/archive/$time");
+  system("mkdir /home/hadaq/trbsoft/daq/hmon/archive/$time/files");
+  system("mv /home/hadaq/trbsoft/daq/hmon/archive/$time/*.png /home/hadaq/trbsoft/daq/hmon/archive/$time/files/");
   
-  my @files = qx(ls /home/hadaq/trbsoft/daq/tools/hmon/archive/$time/*.htt);
+  my @files = qx(ls /home/hadaq/trbsoft/daq/hmon/archive/$time/*.htt);
   foreach my $f (@files) {
     my @n = split('/',$f);
     my $newf = $n[-1];
@@ -68,9 +68,9 @@ while(1) {
     $newf .='m';
 #     print $newf."\n";
     my $fh;
-    open($fh,'>',"/home/hadaq/trbsoft/daq/tools/hmon/archive/$time/$newf");
+    open($fh,'>',"/home/hadaq/trbsoft/daq/hmon/archive/$time/$newf");
     print $fh $header;
-    my @g = qx(cat /home/hadaq/trbsoft/daq/tools/hmon/archive/$time/$n[-1]);
+    my @g = qx(cat /home/hadaq/trbsoft/daq/hmon/archive/$time/$n[-1]);
     foreach my $h (@g) {
       if($h =~ m!^(.*)\%ADDPNG\s+(.+)\%(.*)$!) {
         print $fh $1.$2.$3;
@@ -86,8 +86,8 @@ while(1) {
     close($fh);
     
     }
-  system("mv /home/hadaq/trbsoft/daq/tools/hmon/archive/$time/*.htt /home/hadaq/trbsoft/daq/tools/hmon/archive/$time/files/");
+  system("mv /home/hadaq/trbsoft/daq/hmon/archive/$time/*.htt /home/hadaq/trbsoft/daq/hmon/archive/$time/files/");
 
   sleep(590);
   }
-  
\ No newline at end of file
+  
index faa083fbebc08ae192a0582d1d0485c990cb8025..6ac3a3a77b5341238a57d52c2ad10e06c8d3b0f8 100755 (executable)
@@ -32,10 +32,10 @@ while (1) {
   for (my $d=1;$d<=22;$d++) {
     $str .= "<th>$d";
   }
-  for (my $n=1;$n<=7;$n++) {
+  for (my $n=2;$n<=7;$n++) {
     my @out = Hmon::qxtimeout("ssh lxhadeb0$n \"df -h \"",10);
     foreach my $a (@out) {
-      if ($a =~ /\d+,?.?\d+[TGM]?\s+(\d+,?.?\d+[TGM]?)\s+(\d+,?.?\d+[TGM]?)\s+(\d*)\%\s*\/data(\d\d)/) {
+      if ($a =~ /\d+,?.?\d+[TGM]?\s+(\d+,?.?\d+[TGM]?)\s+(\d+,?.?\d+[TGM]?)\s+(\d*)\%\s*\/data(\d\d)$/) {
        $store->{$n}->{$4} = $3;
        $store2->{$n}->{$4} = $2." / ".$1." = ".$3."%";
        if ($3 > $max) {
diff --git a/hmon/permanent/hmon_pionlv.pl b/hmon/permanent/hmon_pionlv.pl
new file mode 100644 (file)
index 0000000..78cd8c6
--- /dev/null
@@ -0,0 +1,103 @@
+#!/usr/bin/perl -w
+
+use warnings;
+#use strict;
+use Time::HiRes qw( gettimeofday usleep time );
+use FileHandle;
+use Data::Dumper;
+use POSIX qw/floor ceil/;
+use List::Util 'max';
+use QA;
+use HPlot;
+use Hmon;
+use IO::Socket;
+
+my $flog = Hmon::OpenLogfile();
+my $fqa  = QA::OpenQAFile();
+
+
+my @str;
+
+my $store = {};
+my $laststore = {};
+my $values = {};
+my $color = {};
+my $raw = {};
+my $val;
+my ($max,$min,$avg,$mean);
+
+
+
+my $plot = ();
+$plot->{name}    = "PionLvCurrent";
+$plot->{file}    = "files/PionLvCurrent";
+$plot->{entries} = 500;
+$plot->{curves}  = 2;
+$plot->{type}    = HPlot::TYPE_HISTORY;
+$plot->{output}  = HPlot::OUT_PNG;
+$plot->{titles}->[0] = "Pion0";
+$plot->{titles}->[1] = "Pion1";
+$plot->{xlabel}  = "Seconds";
+$plot->{ylabel}  = "mA";
+$plot->{sizex}   = 630;
+$plot->{sizey}   = 220;
+HPlot::PlotInit($plot);
+
+
+
+$str  = Hmon::MakeTitle(9, 10, "Pion Low Voltage");
+$str .= qq@<img src="%ADDPNG files/PionLvCurrent.png%" type="image/png"><br>\n@;
+$str .= qq@<img src="%ADDPNG files/PionLvVoltage.png%" type="image/png">\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("PionLV",$str);
+
+
+my $cmd_volt = "VOLT?\n++read\n";
+my $cmd_curr = "CURR?\n++read\n";
+
+my $sock = open_socket_prologix();
+
+while (1) {
+
+  #Hmon::WriteLog($flog, "Pion LV","Test");
+
+  my $curr0 = 20;
+  my $curr1 = 20;
+
+  HPlot::PlotAdd("PionLvCurrent",$curr0,0);
+  HPlot::PlotAdd("PionLvCurrent",$curr1,1);
+  HPlot::PlotDraw("PionLvCurrent");
+
+  my $volt = &read_value($sock, $cmd_volt);
+  my $curr = &read_value($sock, $cmd_curr);
+  my $time = time();
+  #print "$time\t$volt\t$curr\n";
+  $curr0 = $curr;
+  $curr1 = $curr;
+
+  my $qastate = QA::GetQAState('below', max($curr0,$curr1), @QA::PionLvCurrLimits);
+  my $str = sprintf("%i/%i", $curr0, $curr1);
+  QA::WriteQALog($fqa,"pion","LV", 10, $qastate, "LV Current", $str, 
+                 "Current on LV line for Pion FEE: " . $str);
+
+  sleep(1);
+}
+
+sub open_socket_prologix {
+    my $sock = new IO::Socket::INET ( PeerAddr => 'eegpibenetp02', 
+                                     PeerPort => '1234', Proto => 'tcp', );
+    die "Could not create socket: $!\n" unless $sock;
+
+    $|=1;
+
+    return $sock;
+}
+
+
+sub read_value {
+    my ($sock, $cmd) = @_;
+    print $sock $cmd;
+    my $res = <$sock>;
+    chomp $res;
+    return $res;
+}
diff --git a/hmon/permanent/hmon_pionsupply.pl b/hmon/permanent/hmon_pionsupply.pl
new file mode 100755 (executable)
index 0000000..860e34b
--- /dev/null
@@ -0,0 +1,107 @@
+#!/usr/bin/perl -w
+use FileHandle;
+use Data::Dumper;
+use POSIX qw(strftime);
+use Hmon;
+use HPlot;
+use QA;
+my $flog = QA::OpenQAFile();
+
+my $plot = ();
+$plot->{name}    = "HighVoltage";
+$plot->{file}    = "files/PionHV";
+$plot->{entries} = 300;
+$plot->{curves}  = 2;
+$plot->{type}    = HPlot::TYPE_HISTORY;
+$plot->{output}  = HPlot::OUT_PNG;
+$plot->{titles}->[0] = "Pion 1";
+$plot->{titles}->[1] = "Pion 2";
+$plot->{xlabel}  = "Entries (~0.5h total)";
+$plot->{ylabel}  = "Volt";
+$plot->{sizex}   = 630;
+$plot->{sizey}   = 220;
+$plot->{ymax}    = 200;
+HPlot::PlotInit($plot);
+
+
+
+my $plot2 = ();
+$plot2->{name}    = "HVCurrent";
+$plot2->{file}    = "files/PionHVCurrent";
+$plot2->{entries} = 300;
+$plot2->{curves}  = 2;
+$plot2->{type}    = HPlot::TYPE_HISTORY;
+$plot2->{output}  = HPlot::OUT_PNG;
+$plot2->{titles}->[0] = "Pion 1";
+$plot2->{titles}->[1] = "Pion 2";
+$plot2->{xlabel}  = "Entries (~0.5h total)";
+$plot2->{ylabel}  = "Microampere";
+$plot2->{sizex}   = 630;
+$plot2->{sizey}   = 220;
+HPlot::PlotInit($plot2);
+
+while(1) {
+
+             
+  open(PIONLOG, Hmon::HMONDIR."hmon_permanent_tail -F ".Hmon::HMONDIR."pion/scmon.log|");
+
+  my $readlines = 0;
+  my $str = "";
+  my $oldtime = time();
+  my $a;
+
+  while($a = <PIONLOG>) {
+    $str  = Hmon::MakeTitle(9,11,"PionSupplies",1);
+    my @val = split(/\s+/,$a);
+
+    #$str .= strftime("%H:%M:%S",localtime($val[0]));
+    $str .= "<br><table style='margin:auto' class=\"rates \"><tr><th><th>HV (V)<th>HV (&mu;A)<th>Temp. (&degC)";
+    $str .= sprintf("<tr><th>Pion1:<td>%.1fV<td>%.3fuA<td>%.1f&degC",$val[3],$val[4],$val[47]);
+    $str .= sprintf("<tr><th>Pion2:<td>%.1fV<td>%.3fuA<td>%.1f&degC",$val[25],$val[26],$val[53]);
+    $str .= "</table>";
+    $str .= qq@<img src="%ADDPNG files/PionHV.png%" type="image/png"><br>\n@;
+    $str .= qq@<img src="%ADDPNG files/PionHVCurrent.png%" type="image/png">\n@;
+    $str .= Hmon::MakeFooter();
+    Hmon::WriteFile("PionSupplies",$str);   
+    
+    HPlot::PlotAdd('HighVoltage',$val[3],0);
+    HPlot::PlotAdd('HighVoltage',$val[25],1);
+    HPlot::PlotDraw("HighVoltage");  
+    
+    HPlot::PlotAdd('HVCurrent',$val[4],0);
+    HPlot::PlotAdd('HVCurrent',$val[26],1);
+    HPlot::PlotDraw("HVCurrent");  
+    
+    
+    my $shorttext = sprintf("%i/%i | %.1f/%.1f",$val[3],$val[25],$val[4],$val[26]);
+    my $longtext = sprintf("Pion 1: %.1f V / %.2fuA<br>Pion 2: %.1f V / %.2fuA",$val[3],$val[4],$val[25],$val[26]);
+    my $state = QA::OK;
+       $state = QA::WARN if($val[3]<140 || $val[25]<140);    
+       $state = QA::FATAL if($val[25] > 5 || $val[26] > 5);
+       
+    QA::WriteQALog($flog, "pion", "HV", 30,
+       QA::OK, 'Pion HV', $shorttext, $longtext);
+
+    $shorttext = sprintf("%.1f&deg; / %.1f&deg;",$val[47],$val[53]);
+    $longtext = sprintf("Pion 1: is %.1f&deg;, soll %.1f&deg;<br>Pion 2: is %.1f&deg;, soll %.1f&deg;",$val[47],$val[49],$val[53],$val[55]);
+    $state = QA::OK;
+    $state = QA::WARN if($val[47]>-15 || $val[53]>-15);
+    
+    
+    QA::WriteQALog($flog, "pion", "cooling", 30,
+       $state, 'Pion Cool', $shorttext, $longtext);       
+       
+    }
+}
+
+
+# hades@lxhadeb06:/data01/tmp/scmon.log
+# columns:
+# TimeStamp   1
+#             V     I     status
+# HV-NE5      4     5     6
+# HV-HAD      26    27    28
+#                Temp    SetPoint    Status
+# Chiller-NE5     48      50          51
+# Chiller-HAD     54      56          57
+
index f85cf4ec500bff87c4fd78613e851886dfb7916d..f66575d4e34fefea5a4985c75ec41cfb2d6d15c5 100755 (executable)
@@ -79,22 +79,22 @@ while($a = <FLOG>) {
     Hmon::WriteFile("QA",$str);      
     
     
-    $str  = Hmon::MakeTitle(8,5,"Status Summary",1);
-    $str .= "<table>";
-    
-    $str .= "<tr><td>Trigger Rate<td>".$store->{'main'}->{'rate'}->{'val'} ;
-    
-    if(($store->{'trg'}->{'source'}->{'long'} || '') ne "") {
-      $store->{'trg'}->{'source'}->{'long'} =~ m/sources:\s(.*)/;
-      $str .= "<tr><td>Trigger Source<td>$1";
-      }
-    else {
-      $str .= "<tr><td>Trigger Source<td>N/A";
-      }
-    
-    $str .= "</table>";
-    $str .= Hmon::MakeFooter();
-    Hmon::WriteFile("Summary",$str);      
+    $str  = Hmon::MakeTitle(8,5,"Status Summary",1);
+    $str .= "<table>";
+#     
+    $str .= "<tr><td>Trigger Rate<td>".$store->{'main'}->{'rate'}->{'val'} ;
+#     
+    if(($store->{'trg'}->{'source'}->{'long'} || '') ne "") {
+      $store->{'trg'}->{'source'}->{'long'} =~ m/sources:\s(.*)/;
+      $str .= "<tr><td>Trigger Source<td>$1";
+      }
+    else {
+      $str .= "<tr><td>Trigger Source<td>N/A";
+      }
+#     
+    $str .= "</table>";
+    $str .= Hmon::MakeFooter();
+    Hmon::WriteFile("Summary",$str);      
     }
   }
 }
index fbb85765888658da38cd22d66d2dff8bb66934b2..9235dce098cd6674953a715457927cb121136aec 100755 (executable)
@@ -27,9 +27,12 @@ mkdir `pwd`/archive
 mkdir `pwd`/qa
 mkdir `pwd`/logs
 mkdir `pwd`/vertex
+mkdir `pwd`/pion
 
 sshfs -o allow_other hades-qa@lxhadeb06:/home/hades-qa/online/apr12/vertex/vertex_jpg `pwd`/vertex
 sshfs -o allow_other hades-qa@lxhadeb06:/home/hades-qa/online/apr12/pics `pwd`/qa
+sshfs -o allow_other hadaq@lxhadeb06:/data01/tmp/ `pwd`/pion
+
 
 echo "  <Hmon>     Linking files to server..."
 ln -fs `pwd`/archive /srv/www/htdocs/mon/
index 2818b9b742aad2ccaffb3b8289e099211ddd0408..3f8dbbe8eb137bae243c83a2637c76994b278842 100644 (file)
@@ -12,9 +12,9 @@
   trbcmd w 0x8004 0xc0 0xffff
   trbcmd w 0x8004 0xc1 0xffff
   trbcmd w 0x8004 0xc3 0xffff
-  trbcmd w 0x8000 0xc0 0xfffb
-  trbcmd w 0x8000 0xc1 0xfffb
-  trbcmd w 0x8000 0xc3 0xfffb
+  trbcmd w 0x8000 0xc0 0xff37
+  trbcmd w 0x8000 0xc1 0xff37
+  trbcmd w 0x8000 0xc3 0xff37
 
 
 !ifdef RICH
 !endif
 
 !ifdef SHOWER
-  trbcmd setbit 0x8000 0xc0 0x0004
-  trbcmd setbit 0x8000 0xc1 0x0004
-  trbcmd setbit 0x8000 0xc3 0x0004
+  trbcmd setbit 0x8000 0xc0 0x0008
+  trbcmd setbit 0x8000 0xc1 0x0008
+  trbcmd setbit 0x8000 0xc3 0x0008
 !endif
 
 !ifdef WALL
+!endif
   trbcmd setbit 0x8002 0xc0 0x0008
   trbcmd setbit 0x8002 0xc1 0x0008
   trbcmd setbit 0x8002 0xc3 0x0008
-!endif
+
 # 
 # !ifdef MDC12
 #   trbcmd setbit 0x8001 0xc0 0x0008
@@ -182,5 +183,5 @@ trbcmd clearbit 0x8a00 0xc3 0x000c
 
 
 #Remove both SCS from Trigger Distribution
-trbcmd w 0x8000 0xc0 0xfdf  #remove pexor from trigger
-trbcmd w 0x8000 0xc1 0xfdf  #remove pexor from trigger
+trbcmd clearbit 0x8000 0xc0 0x20 #remove pexor from trigger
+trbcmd clearbit 0x8000 0xc1 0x20
index 26ced983616d7ea28558680aa51e623c438c7967..902341bcbeee0856906b5333784220cc0134d0b7 100644 (file)
@@ -8,7 +8,7 @@
   5000    1       2         0     6         3         0x7000                                  
   5000    1       2         0     7         3         0x7000 
   5000    1       2         1     0         3         0xc000 ### ch. 4
-  5000    1       2         1     1         3         0xa000 ### ch. 3
+  5000    1       2         1     1         3         0xb000 ### ch. 3
   5000    1       2         1     2         3         0xc000 ### ch. 2
   5000    1       2         1     3         3         0x1000 ### ch. 1
   5000    1       2         1     4         3         0xa000 ### ch. 5
@@ -87,7 +87,7 @@
   5002    1       2         1     3         3         0x4000 ### ch. 1
   5002    1       2         1     4         3         0x4000 ### ch. 5
   5002    1       2         1     5         3         0xa000 ### ch. 6
-  5002    1       2         1     6         3         0xa000 ### ch. 7
+  5002    1       2         1     6         3         0xb000 ### ch. 7
   5002    1       2         1     7         3         0xb000 ### ch. 8
 #############################################################################
   5002    2       2         0     0         3         0x8000 # ---Glob. Thres  #6                 
@@ -99,7 +99,7 @@
   5002    2       2         0     6         3         0x9000                                    
   5002    2       2         0     7         3         0x9000  
   5002    2       2         1     0         3         0xb000 ### ch. 4  
-  5002    2       2         1     1         3         0xb000 ### ch. 3  
+  5002    2       2         1     1         3         0xc000 ### ch. 3  
   5002    2       2         1     2         3         0xb000 ### ch. 2  
   5002    2       2         1     3         3         0xa000 ### ch. 1  
   5002    2       2         1     4         3         0xa000 ### ch. 5  
   5003    2       2         0     5         3         0x9000                                    
   5003    2       2         0     6         3         0x9000                                    
   5003    2       2         0     7         3         0x9000  
-  5003    2       2         1     0         3         0xb000 ### ch. 4  
-  5003    2       2         1     1         3         0xb000 ### ch. 3  
+  5003    2       2         1     0         3         0xc000 ### ch. 4  
+  5003    2       2         1     1         3         0xc000 ### ch. 3  
   5003    2       2         1     2         3         0xa000 ### ch. 2  
   5003    2       2         1     3         3         0xa000 ### ch. 1  
   5003    2       2         1     4         3         0xc000 ### ch. 5  
index 97cc267e717e232ee885021333316f2f8d4be62f..beea0a148f3f2e3d9d57bcc4f2315946998ddc24 100644 (file)
@@ -1,15 +1,15 @@
 # Board   Chain   ChainLen  DAC   Channel   Command   Value
-  5010    1       1         0     0         8         0x0400
-  5010    1       1         0     2         8         0x05ad
-  5010    1       1         0     4         8         0x07a4
-  5010    1       1         0     6         8         0x0724
-  5010    1       1         0     8         8         0x05a5
-  5010    1       1         0     10        8         0x0527
-  5010    1       1         0     12        8         0x04aa
-  5010    1       1         0     14        8         0x06ce
+  5010    1       1         0     0         8         0x0633
+  5010    1       1         0     2         8         0x0633
+  5010    1       1         0     4         8         0x0717
+  5010    1       1         0     6         8         0x0617
+  5010    1       1         0     8         8         0x0582
+  5010    1       1         0     10        8         0x050d
+  5010    1       1         0     12        8         0x050d
+  5010    1       1         0     14        8         0x0582
 
   5010    2       1         0     0         8         0x0572
-  5010    2       1         0     2         8         0x05c5
+  5010    2       1         0     2         8         0x0705
   5010    2       1         0     4         8         0x06ff
   5010    2       1         0     6         8         0x0562
   5010    2       1         0     8         8         0x0582
 
   5013    1       1         0     0         8         0x0560
   5013    1       1         0     2         8         0x0556
-  5013    1       1         0     4         8         0x03e6
+  5013    1       1         0     4         8         0x04fe
   5013    1       1         0     6         8         0x051d
-  5013    1       1         0     8         8         0x05fb
+  5013    1       1         0     8         8         0x0579
   5013    1       1         0     10        8         0x0a7f
-  5013    1       1         0     12        8         0x0510
-  5013    1       1         0     14        8         0x06d2
+  5013    1       1         0     12        8         0x0632
+  5013    1       1         0     14        8         0x06f9
 
-  5013    2       1         0     0         8         0x050a
+  5013    2       1         0     0         8         0x064a
   5013    2       1         0     2         8         0x0598
   5013    2       1         0     4         8         0x0579
-  5013    2       1         0     6         8         0x06d6
+  5013    2       1         0     6         8         0x061c
   5013    2       1         0     8         8         0x0549
   5013    2       1         0     10        8         0x06ae
   5013    2       1         0     12        8         0x06c6
index d54c89341d43caad0063896d73306644222fa026..8db33009f54f4c845f6c205d20f0cffc250b8723 100644 (file)
@@ -54,7 +54,7 @@ trbcmd w 0xfe4e 0xc804 0x00000080
 
 #Trigger Generator Settings
 #Replace with proper values
-trbcmd w 0x5000 0xcf00 0xfeee
+trbcmd w 0x5000 0xcf00 0xffff
 trbcmd w 0x5001 0xcf00 0x0000
 trbcmd w 0x5002 0xcf00 0xfeee
 trbcmd w 0x5003 0xcf00 0xfc1e
@@ -62,9 +62,9 @@ trbcmd w 0x8880 0xcf00 0x1101   #Forward to CTS via central FPGA
 #Connected to second Start input on CTS
 
 trbcmd w 0x5010 0xcf00 0xffff
-trbcmd w 0x5001 0xcf00 0x0000
-trbcmd w 0x5002 0xcf00 0x0000
-trbcmd w 0x5003 0xcf00 0xffff
+trbcmd w 0x5011 0xcf00 0x0000
+trbcmd w 0x5012 0xcf00 0x0000
+trbcmd w 0x5013 0xcf00 0xffff
 trbcmd w 0x8890 0xcf00 0x1001   #Forward to CTS via central FPGA
 
 
index 48c5245bf77e5ac8f269435bc960232198fd0d5a..acd8da298724a6f3ca1ea4ec67272153058da002 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 ssh hades30 xset -display :0 dpms force off
-#ssh hades17 xset -display :0 dpms force off
+ssh hades17 xset -display :0 dpms force off
 ssh hades25 xset -display :0 dpms force off
 ssh hades27 xset -display :0 dpms force off
 ssh hadeb04 xset -display :0 dpms force off