]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
Latest changes during beamtime
authorhadaq@countinghouse <hadaq@hades33.gsi.de>
Sun, 13 Jul 2014 14:52:55 +0000 (16:52 +0200)
committerhadaq@countinghouse <hadaq@hades33.gsi.de>
Sun, 13 Jul 2014 14:52:55 +0000 (16:52 +0200)
hmon/HPlot.pm
hmon/hmon_hadplot_daqtools.sh [new symlink]
hmon/hmon_hadplotnew.sh
hmon/hmon_hodo.pl
hmon/hmon_logRpc.pl [moved from hmon/hmon_logRpc.sh with 100% similarity]
hmon/hmon_muxhist.pl
hub/startup.script
main/restartEB.sh
start/ThreshNinoStart.db
start/startup.script

index a4c55ff90721a2181cddbca00dadf9f3604594b3..195916aa8c19781ad032a7f91e9d6de0a23a5523 100755 (executable)
@@ -35,6 +35,18 @@ sub makeTimeString{
   return strftime("set label 100 \"%H:%M:%S\" at screen 0.02,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime())
   }
 
+sub setranges { 
+  my ($fh,$name,$min,$max) = @_;
+  if(defined $min && defined $max) {
+    plot_write($fh,"set $name [$min:$max]");
+    }
+  elsif(defined $max) {
+    plot_write($fh,"set $name [:$max]");
+    }
+  elsif(defined $min) {
+    plot_write($fh,"set $name [$min:]");
+    }  
+  }
 
 sub PlotInit {
   my ($c) = @_;
@@ -103,25 +115,11 @@ sub PlotInit {
   plot_write($fh,"set xlabel \"".$p->{$name}->{xlabel}."\"") if $p->{$name}->{xlabel};
   plot_write($fh,"set ylabel \"".$p->{$name}->{ylabel}."\"") if $p->{$name}->{ylabel};
 
-  if(defined $p->{$name}->{ymin} && defined $p->{$name}->{ymax}) {
-    plot_write($fh,"set yrange [".$p->{$name}->{ymin}.":".$p->{$name}->{ymax}."]");
-    }
-  elsif(defined $p->{$name}->{ymax}) {
-    plot_write($fh,"set yrange [:".$p->{$name}->{ymax}."]");
-    }
-  elsif(defined $p->{$name}->{ymin}) {
-    plot_write($fh,"set yrange [".$p->{$name}->{ymin}.":]");
-    }
+  setranges($fh,'xrange',$p->{$name}->{xmin},$p->{$name}->{xmax});
+  setranges($fh,'yrange',$p->{$name}->{ymin},$p->{$name}->{ymax});
+  setranges($fh,'zrange',$p->{$name}->{zmin},$p->{$name}->{zmax});
+  setranges($fh,'cbrange',$p->{$name}->{cbmin},$p->{$name}->{cbmax});
 
-  if(defined $p->{$name}->{xmin} && defined $p->{$name}->{xmax}) {
-    plot_write($fh,"set xrange [".$p->{$name}->{xmin}.":".$p->{$name}->{xmax}."]");
-    }
-  elsif(defined $p->{$name}->{xmax}) {
-    plot_write($fh,"set xrange [:".$p->{$name}->{xmax}."]");
-    }
-  elsif(defined $p->{$name}->{xmin}) {
-    plot_write($fh,"set xrange [".$p->{$name}->{xmin}.":]");
-    }
     
   if($p->{$name}->{type} == TYPE_HISTORY) {
     if($p->{$name}->{fill}) {
diff --git a/hmon/hmon_hadplot_daqtools.sh b/hmon/hmon_hadplot_daqtools.sh
new file mode 120000 (symlink)
index 0000000..9faf824
--- /dev/null
@@ -0,0 +1 @@
+../../daqtools/tools/hadplot
\ No newline at end of file
index f5f571a7a96c77dd7113b03e0d60072d9ad1e30f..19b36002d325e9aa22c42b5a6ec7bbf96060d622 100755 (executable)
@@ -125,9 +125,19 @@ for(my $i=0;$i<16;$i++) {
        $curveoption->[$i] = ""  unless defined $curveoption->[$i];
        }
 
+for(my $k = 0; $k < scalar @$address; $k++) {
+  if($address->[$k] =~ /^0x/) {
+    $address->[$k] = hex($address->[$k]);
+    }
+  if($register->[$k] =~ /^0x/) {
+    $register->[$k] = hex($register->[$k]);
+    }
+  }    
+       
+       
 for(my $i=0;$i < scalar @{$address};$i++) {
   if(!defined($title->[$i])) {
-               $title->[$i] = hex($address->[$i])." $register->[$i] $regoffset->[$i]..".($regoffset->[$i]+$regwidth->[$i]-1);
+               $title->[$i] = $address->[$i]." $register->[$i] $regoffset->[$i]..".($regoffset->[$i]+$regwidth->[$i]-1);
                }
        }
 
@@ -139,10 +149,7 @@ if($style == 3) {$curvestyle="histo";      $xticks=1;}
 if($style == 4) {$curvestyle="histostacked";      $xticks=0;}
 if($style == 5) {$curvestyle="histostacked";      $xticks=1;}
 
-for(my $k = 0; $k < scalar @$address; $k++) {
-  $address->[$k] = hex($address->[$k]);
-  $register->[$k] = hex($register->[$k]);
-  }
+
 
 #Open Gnuplot
 our $fh;
@@ -746,7 +753,7 @@ sub genreg {
       else {
 #         $c = "trbcmd rm $address->[$i] $register->[$i] $regamount->[$i] 0";  
         $c = trb_register_read_mem(($address->[$i]),($register->[$i]),0,$regamount->[$i]);
-        print Dumper $c;
+        print Dumper $c;
         }
 #       my @out = qx($c);
       foreach my $s (sort keys $c) {
index 6918f6f3d11681c574784d928428135828c797d8..a1cc5807d75670271eb84551605e0d61fbc284a0 100755 (executable)
@@ -28,6 +28,7 @@ $plot2->{xmin}    = -0.5;
 $plot2->{xmax}    = 1.5;
 $plot2->{ymin}    = 15.5;
 $plot2->{ymax}    = -0.5;
+$plot2->{cbmax}   = "100<*";
 $plot2->{showvalues} = 1;
 HPlot::PlotInit($plot2);
 
similarity index 100%
rename from hmon/hmon_logRpc.sh
rename to hmon/hmon_logRpc.pl
index 13631bb6780ef73a87089ecba4a8033c921b03c8..71e264f6b9ca71e1a54d13c465774177eca2d95d 100755 (executable)
@@ -66,7 +66,7 @@ if($plots) {
   }
 
 else {
-  qx(./hmon_hadplot.sh -d 3000 \\
+  qx(./hmon_hadplot_daqtools.sh -d 3000 \\
           -a 0x0003 -r 41216 -m 500 -p 0 -w 32  -t "A" \\
           -a 0x0003 -r 41716 -m 500 -p 0 -w 32  -t "B" \\
  -output "PNG.files/muxhist.760.530" -curvestyle steps -key genreg 2>/dev/null &
index 3f4bc134f17ec0952a3fb10ebedee6f278fa2bab..e3383db0aa10b024bdbe34eead83b26f56b82115 100644 (file)
@@ -41,10 +41,10 @@ wait
   trbcmd w 0x8001 0xc5 0x5000
 
 # Set the maximum subevents in the queue for TRB3s
-  trbcmd w 0x8900 0x830e 0x10
-  trbcmd w 0x8910 0x830e 0x10
-  trbcmd w 0x8880 0x830e 0x10
-  trbcmd w 0x8890 0x830e 0x10
+  trbcmd w 0x8900 0x830e 0x4
+  trbcmd w 0x8910 0x830e 0x4
+  trbcmd w 0x8880 0x830e 0x4
+  trbcmd w 0x8890 0x830e 0x4
   
 #Load hub level setting for time-out for each hub in the system  
   trbcmd loadbit 0xfe11 0xc5 0xffff0000 0x80300000  #with new hub (with auto-switch-off)
index 1c56946bb42bcd4cd1513937bc8ae5f5ea7d86ac..684f45a0e733db2770804a4146a2f9f928797556 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
 cd /home/hadaq/trbsoft/daq/evtbuild/
 ./start_eb_gbe.pl -e stop -n 1-16
-#sleep 10
+sleep 10
 ./start_eb_gbe.sh
index 31b24e49774b9ec0dd29876ba9b9a4d60422b4b8..bf7ea1fc4e6dd3c41cd52da10f5fe7a2fc4ed801 100644 (file)
@@ -40,7 +40,7 @@
   5001    1       2         0     1         3         0x7000 #                                
   5001    1       2         0     2         3         0x7000 # --- Str. 9-20ns, 7-30ns, 5-80ns
   5001    1       2         0     3         3         0x7000 #                                
-  5001    1       2         0     4         3         0x7000 # --- Hyst. min d                
+  5001    1       2         0     4         3         0xd000 # --- Hyst. min d                
   5001    1       2         0     5         3         0x7000                                  
   5001    1       2         0     6         3         0x7000                                  
   5001    1       2         0     7         3         0x7000 
index 5e3d1ebcc453e5d48e137fd9e86a33e8362f9235..f0388ad3077a0e88b4e4e77b5fe262b92aabd8b7 100644 (file)
@@ -89,6 +89,10 @@ trbcmd w 0x5011 0xcf80 0xffff
 trbcmd w 0x5012 0xcf80 0xffff
 trbcmd w 0x5013 0xcf80 0xffff
 
+trbcmd w 0x8880 0xcf80 0xfffff
+trbcmd w 0x8880 0xcf82 100000  #1ms binning by default
+trbcmd loadbit 0x8880 0xcf8f 0x1f0000 0x100000  #select output 0 for monitoring
+
 
 #trbcmd clearbit 0x8880 0xc0 0x2
 #trbcmd clearbit 0x8880 0xc1 0x2