]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
Collected updates from CBM RICH beamtime.
authorCbm Rich <richdaq@wuppertal>
Sat, 15 Nov 2014 20:00:44 +0000 (21:00 +0100)
committerCbm Rich <richdaq@wuppertal>
Sat, 15 Nov 2014 20:01:49 +0000 (21:01 +0100)
Added Perl library directory.

27 files changed:
dmon/code/Dmon.pm
dmon/code/Perl2Epics.pm
dmon/code/monitor.pl
dmon/files [new symlink]
dmon/scripts/dmon_beamintensity.pl
dmon/scripts/dmon_billboard.pl
dmon/scripts/dmon_cbmnetdata.pl
dmon/scripts/dmon_cbmnetlink.pl
dmon/scripts/dmon_cbmnetsync.pl
dmon/scripts/dmon_currents.pl
dmon/scripts/dmon_datarate.pl
dmon/scripts/dmon_heatmaprich.pl
dmon/scripts/dmon_qa.pl
perllibs/Dmon.pm [new symlink]
perllibs/HPlot.pm [new symlink]
perllibs/Perl2Epics.pm [new symlink]
thresholds/run_thresh_on_system.pl
thresholds/thresholds_automatic.pl
thresholds/write_thresholds.pl
tools/HPlot.pm
users/cern_cbmrich/dmon_config.pl
users/cern_cbmrich/evtbuilder_start.sh
users/cern_cbmrich/register_config_tdc.db
users/cern_cbmrich/startup.sh
users/cern_cbmrich/thresh/thresholds_padiwa_amps.thr
users/cern_cbmrich/thresholds_compare.pl
web/htdocs/index.pl

index a01fd837302c0a39c72a808f533f7d8328c6c54b..1dd1dfea541631c8ab9a0b5025ca067815a6f325 100644 (file)
@@ -320,7 +320,38 @@ sub PadiwaSendCmd {
   return trb_register_read($board,0xd412);
   }
 
+sub PadiwaSendCmdMultiple {
+  my ($cmd,$board,$chain,$delay) = @_;
+  my $length = 0;
+  my $str = "";
+  for (my $i = 0; $i < 16; $i++) {
+    $length++ if defined $cmd->[$i];
+    $cmd->[$i] = $cmd->[$i] || 0;
+    $str .= sprintf("%08x\t",$cmd->[$i]);
+    }
+  push(@{$cmd},1<<$chain);
+  push(@{$cmd},0x1080 + $length);
+#   print STDERR "$str\n";
+  my $errcnt = 0;
+  while(1){
+    trb_register_write_mem($board,0xd400,0,$cmd,scalar @{$cmd});
 
+    if (trb_strerror() =~ "no endpoint has been reached") {return -1;}
+    if (trb_strerror() ne "No Error") {
+      usleep($delay||1E5);
+      if($errcnt >= 12) {
+        return "SPI still blocked\n";
+        }
+      elsif($errcnt++ >= 10) {
+        trb_register_read($board,0xd412);
+        }
+      }
+    else {
+      last;
+      }
+    } 
+  return trb_register_read($board,0xd412);
+  }
 
 1;
 __END__
index 35bb72c66d0b73285c550cffd36b01a381df1b7b..98ab27f1b30ff44e45a29e33438974d368df71d3 100644 (file)
@@ -4,13 +4,14 @@ use strict;
 use Data::Dumper;
 # use Hmon;
 
+#Add all possible paths here...
+use lib '/home/hadaq/EPICS/base-3.14.12.3/lib/perl';
 use lib '/mnt/home_cbm02/hadaq/EPICS/base-3.14.12.3/lib/perl';
 use CA;
 
+# Address list for Epics IOCs. Don't remove unused values
+$ENV{EPICS_CA_ADDR_LIST} = "10.160.0.63 192.168.1.100";
 $ENV{EPICS_CA_AUTO_ADDR_LIST} = 'YES';
-# JAM added fixed port numbers of EB epics
-$ENV{EPICS_CA_ADDR_LIST} = "10.160.0.63 cbmpi2";
-#$ENV{EPICS_CA_ADDR_LIST} = "192.168.100.11 192.168.100.12 192.168.100.13 192.168.100.14 192.168.100.15 localhost";
 
 my $EpicsValues = {};
 my $EpicsStore = {};
index 11b3293e275237833f81bc962160243e7cd51017..25c46cf13b764b720c9172689067ba844b8be08a 100755 (executable)
@@ -173,6 +173,8 @@ function blink() {
   blinkcnt++;
   }
 
+
+/*Some functions for PMT Heatmap plot for CBM RICH*/
  function heatmapRegister() {
   if (!document.getElementById('heatmap-img')) return;
 
@@ -183,20 +185,61 @@ function blink() {
     document.body.appendChild(js);
   }
 
-  document.getElementById('heatmap-img').onmousemove =  document.getElementById('heatmap-img').onmouseover = function(e) {
+  heatmapPlaceHint("auto");
+
+  document.getElementById('heatmap-img').onmousemove =
+  document.getElementById('heatmap-img').onmouseover = 
+  document.getElementById('heatmap-img').onclick = 
+  function(e) {
+    if (!e.target || e.target.id != 'heatmap-img') return;
+
+    var imgPos = document.getElementById('heatmap-img').getBoundingClientRect();
     var cx = e.clientX;
     var cy = e.clientY;
 
-    if (!cx || !cy) return;
-
     var ix = parseInt((cx - HeatmapDef.x) / HeatmapDef.w);
-    var iy = 32- parseInt((cy - HeatmapDef.y) / HeatmapDef.h);
-    if (ix < 0 || ix > 31 || iy < 0 || iy > 31) return;
-
-    document.getElementById('heatmap-caption').innerHTML = HeatmapDef.labels[ix][iy];
+    var iy = 31- parseInt((cy - HeatmapDef.y) / HeatmapDef.h);
+    heatmapPlaceHint( !(ix < 0 || ix > 31 || iy < 0 || iy > 31), ix, iy );
   }
  }
 
+ var heatmapPX, heatmapPY, heatmapShow;
+  function heatmapPlaceHint(mode, ix, iy) {
+    if (mode=='auto') {
+      mode = heatmapShow;
+      ix = heatmapPX;
+      iy = heatmapPY;
+    };
+
+    heatmapShow = mode;
+    heatmapPX = ix;
+    heatmapPY = iy;
+
+    var indi = document.getElementById('heatmap-indicator');
+    if (!indi) {
+      indi = document.createElement("div");
+      indi.id = 'heatmap-indicator';
+      indi.style.border="3px solid #ff0000";
+      indi.style.width =  HeatmapDef.w + "px";
+      indi.style.height = HeatmapDef.h + "px";
+      indi.style.position='absolute';
+      document.getElementById('heatmap-img').parentNode.appendChild(indi);
+    }
+
+    if (!mode) {
+      indi.style.display="none";
+      document.getElementById('heatmap-caption').innerHTML = "Hover/Click image for FPGA/Channel info";
+      return;
+    }
+
+    var pmtid = 4 - parseInt(iy / 8) + 4 * (3 - parseInt(ix / 8));
+
+    indi.style.display="block";
+    indi.style.left = parseInt(ix*HeatmapDef.w + HeatmapDef.x - 3) + "px";
+    indi.style.top  = parseInt((31-iy)*HeatmapDef.h +  HeatmapDef.y - 3) + "px";
+    document.getElementById('heatmap-caption').innerHTML = "cell (" + ix + ", " + iy + ") " + HeatmapDef.labels[ix][iy] + " PMT " + pmtid;
+  }
+/*END: Some functions for PMT Heatmap plot for CBM RICH*/
 </script>$;
              }
 $out .= qq$
diff --git a/dmon/files b/dmon/files
new file mode 120000 (symlink)
index 0000000..6c94635
--- /dev/null
@@ -0,0 +1 @@
+/dev/shm/dmon
\ No newline at end of file
index 8cda32bd7760780db780ae76e42e1dd6b150b83e..6d1e5076b96aeb314023947430019ede0ff2590d 100755 (executable)
@@ -11,31 +11,31 @@ use Dmon;
 use Data::Dumper;
 
 
-my %config = do $ARGV[0];
-my $flog = Dmon::OpenQAFile();
-trb_init_ports() or die trb_strerror();
-
-
-my $value, my $longtext, my $status;
+my %config = Dmon::StartUp();
 
+my $old, my $value;
 my $lasterrors = 0;
 while(1) {
   my $errors = 0;
-  foreach my $b (@{$config{TdcAddress}}) {
-    my $r = trb_register_read($b,0xc100);
-    foreach my $c (%{$r}) {
-      if ($c & 0x10000) {$errors++;}
-      }
-    }
-  my $title    = "Ref Polarity";
-  
-  if ($errors) { $value = $errors." errors"; }
-  else         { $value = "OK";}
+  my $sig = trb_register_read($config{BeamTRB},$config{BeamChan});
+  my $title    = "Last Spill";
   
-  my $longtext = "Polarity of the reference time signals on TDCs seems to be: ".$value;
-  if($errors && $lasterrors) {  $status   = Dmon::GetQAState('below',$errors,(0,1,4));}
-  else                       {  $status   = Dmon::OK;}
-  Dmon::WriteQALog($flog,"reftime",20,$status,$title,$value,$longtext);
-  $lasterrors = $errors;
-  sleep 10;
+  my $curr = $sig->{$config{BeamTRB}} & 0xffffff;
+
+  if($curr - $old > $config{SpillThreshold}) {
+    $value += $curr - $old||0;
+    }
+  else {
+    if ($value > 0) {
+      my $longtext = "Number of signals in last spill: ".$value;
+      my $status = Dmon::OK;
+      Dmon::WriteQALog($config{flog},"beamintensity",60,$status,$title,$value,$longtext);
+      $value = 0;
+      }
+    }      
+
+
+
+  $old = $curr;
+  sleep 1;
   }
index c480cdbd1874fa1d1df3842195905737c8a7db31..82cdc7f693fcc19ac3c05e9eba840ec0d6d519b0 100755 (executable)
@@ -3,8 +3,7 @@
 use warnings;
 use POSIX qw(strftime);
 use FileHandle;
-use lib "./code";
-use lib "../tools";
+
 use HADES::TrbNet;
 use Time::HiRes qw(usleep gettimeofday tv_interval);
 use Dmon;
index 5ba5cee67be1d11fd3424ed75445a67efef6c734..c66e50b34a381fd559db2b9546975eb3eb5e74ba 100755 (executable)
@@ -3,8 +3,6 @@
 use warnings;
 use POSIX qw(strftime);
 use FileHandle;
-use lib "./code";
-use lib "../tools";
 use HADES::TrbNet;
 use Time::HiRes qw(usleep);
 use HPlot;
index 1782fb674aaf6bf6ff40141a804bd54ad51f9733..1257db0c2e8975794e39ae23f295d44ffd9aebaa 100755 (executable)
@@ -3,8 +3,6 @@
 use warnings;
 use POSIX qw(strftime);
 use FileHandle;
-use lib "./code";
-use lib "../tools";
 use HADES::TrbNet;
 use Time::HiRes qw(usleep);
 use Dmon;
index 1e9ea268bbe74abf6d24b257808c7ecfed8fb571..3df6e66f3c33a31e3f8d367d6bb880d43f46ca39 100755 (executable)
@@ -3,8 +3,6 @@
 use warnings;
 use POSIX qw(strftime);
 use FileHandle;
-use lib "./code";
-use lib "../tools";
 use HADES::TrbNet;
 use Time::HiRes qw(usleep);
 use Dmon;
index daa02324b0a4a8a9dbdac28a62a2322e25706d6b..8092154fca37eb9f53b797c1180d3f052c8d6586 100755 (executable)
@@ -3,8 +3,6 @@
 use warnings;
 use POSIX qw(strftime);
 use FileHandle;
-use lib "./code";
-use lib "../tools";
 use HADES::TrbNet;
 use List::Util qw(min max);
 use Time::HiRes qw(usleep);
@@ -18,7 +16,7 @@ my %config = Dmon::StartUp();
 HPlot::PlotInit({
   name    => "PadiwaCurrents",
   file    => Dmon::DMONDIR."PadiwaCurrents",
-  curves  => 20,
+  curves  => 16,
   entries => 300,
   type    => HPlot::TYPE_HISTORY,
   output  => HPlot::OUT_PNG,
@@ -35,8 +33,8 @@ my $str = Dmon::MakeTitle(10,6,"PadiwaCurrents",0);
    $str .= Dmon::MakeFooter();
 Dmon::WriteFile("PadiwaCurrents",$str);
 
-for(my $i = 1; $i<=20; $i++) {
-  my $name = sprintf('CBM:PWRSWITCH:GetCurrent%02x',$i);
+for(my $i = 0; $i<16; $i++) {
+  my $name = sprintf('CBM:PWRSWITCH:GetCurrent%02X',$i);
   Perl2Epics::Connect("C".$i,$name);
   }
 
@@ -49,17 +47,16 @@ while (1) {
   my $maximum = 0;
   my $total = 0;
 
-  for(my $i = 1; $i<=20; $i++) {
+  for(my $i = 0; $i<16; $i++) {
     my $val = $data->{"C".$i}->{"val"};
     $total += $val || 0;
     $maximum = max($maximum,$val||0);
-    HPlot::PlotAdd('PadiwaCurrents',$val,$i-1);
+    HPlot::PlotAdd('PadiwaCurrents',$val,$i);
     }
-
   HPlot::PlotDraw('PadiwaCurrents');
 
     my $title    = "Currents";
-    my $value    = sprintf("%.3fA / %.3fA", $maximum, $total);
+    my $value    = sprintf("%.2fA / %.2fA", $maximum, $total);
     my $longtext = "Maximum / Total current: ". $value;
     my $status   = Dmon::OK;
     Dmon::WriteQALog($config{flog},"currents",30,$status,$title,$value,$longtext,'2-PadiwaCurrents');
index 4d73348f0d8e18fc555c05d55625fe25f582ee6c..a71d180cba45bf72b50c6f060fb5cf2ce943aa0c 100755 (executable)
@@ -3,8 +3,6 @@
 use warnings;
 use POSIX qw(strftime);
 use FileHandle;
-use lib "./code";
-use lib "../tools";
 use HADES::TrbNet;
 use Time::HiRes qw(usleep);
 use Dmon;
index 11b45b98965639ee7a0e3e3a6a65c22b4cb70eca..234c55d98a47601b3379bd17cdcda7b0cc6bc8c3 100755 (executable)
@@ -44,12 +44,12 @@ $plot2->{addCmd} = "set lmargin at screen 0.07\nset rmargin at screen 0.80\nset
 HPlot::PlotInit($plot2);
 
 my $str = Dmon::MakeTitle(9,14,"HeatmapRich",0);
-   $str .= qq@<img src="%ADDPNG HeatmapRich.png%" type="image/png" id="heatmap-img"><div id="heatmap-caption" style="margin-top: -5px;"></div>@;
+   $str .= qq@<div style="padding:0"><img src="%ADDPNG HeatmapRich.png%" type="image/png" id="heatmap-img"></div><div id="heatmap-caption" style="margin-top: -5px;"></div>@;
    $str .= Dmon::MakeFooter();
 Dmon::WriteFile("HeatmapRich",$str);
 
 sub generateDef {
-  my $x = 55; my $y = 50; my $w = (566-$x) / 32.0; my $h = (619-$y) / 32.0;
+  my $x = 56; my $y = 51; my $w = (564-$x) / 32.0; my $h = (619-$y) / 32.0;
 
   $str = qq@
   var HeatmapDef = {
index 0f82f3f546e7d8fe801386caf0e33fc6dd7469f0..c06ccd80dbc6f4cd16ec611cf8f657ee0685fb0f 100755 (executable)
@@ -41,6 +41,7 @@ while($a = <FLOG>) {
   if($readlines++ > 10000) {
     $readlines = 0;
     close(FLOG);
+    system "cat " . Dmon::DMONDIR . "/qalog >> " . $config{UserDirectory} . "/qalog_persist";
     open(FL,">".Dmon::DMONDIR."/qalog");
     close(FL);
     open(FLOG, "tail -F ".Dmon::DMONDIR."/qalog|");
diff --git a/perllibs/Dmon.pm b/perllibs/Dmon.pm
new file mode 120000 (symlink)
index 0000000..09823c2
--- /dev/null
@@ -0,0 +1 @@
+../dmon/code/Dmon.pm
\ No newline at end of file
diff --git a/perllibs/HPlot.pm b/perllibs/HPlot.pm
new file mode 120000 (symlink)
index 0000000..d171b7b
--- /dev/null
@@ -0,0 +1 @@
+../tools/HPlot.pm
\ No newline at end of file
diff --git a/perllibs/Perl2Epics.pm b/perllibs/Perl2Epics.pm
new file mode 120000 (symlink)
index 0000000..34c2d26
--- /dev/null
@@ -0,0 +1 @@
+../dmon/code/Perl2Epics.pm
\ No newline at end of file
index 576f7aedd1d53498e743f5264c05e9d806b56454..a6ce0a49d92873a35fd182d3a8c8c3725b5ae04b 100755 (executable)
@@ -20,6 +20,7 @@ my $opt_polarity = 0;
 my $opt_32channel = 0;
 my $opt_finetune = false;
 my $opt_verb;
+my $tool = "./thresholds_automatic.pl";
 
 GetOptions ('h|help'        => \$opt_help,
             'e|endpoints=s' => \@opt_endpoints,
@@ -28,6 +29,7 @@ GetOptions ('h|help'        => \$opt_help,
             'p|polarity=i'  => \$opt_polarity,
             '32|32channel'  => \$opt_32channel,
             'f|finetune'    => \$opt_finetune,
+            't|tool=s'      => \$tool,
             'v|verb'        => \$opt_verb);
 
 
@@ -67,7 +69,7 @@ my %pids;
 foreach my $endpoint (@$endpoints) {
   foreach my $chain (@$chains) {
     my $endpoint = sprintf("0x%04x", $endpoint);
-    $command = "./thresholds_automatic.pl -e $endpoint -o $opt_offset -c $chain -p $opt_polarity $opt_32channel $opt_finetune";
+    $command = "$tool -e $endpoint -o $opt_offset -c $chain -p $opt_polarity $opt_32channel $opt_finetune";
     print "command: $command\n";
     my $pid = fork();
     if($pid==0) { #child
index f753491544c7c7fb2adaa03e586f4ff1b3d9212e..a0898ee8e6bacb276417852cc19df05f6fb143f3 100755 (executable)
@@ -236,7 +236,7 @@ write_thresholds($mode, $chain, \@best_thresh);
 my $uid;
 foreach my $i (reverse (0..3)) {
   #print "send command: $endpoint , i: $i\n";
-  $rh_res = Dmon::PadiwaSendCmd($endpoint, $chain, 0x10000000 | $i * 0x10000);
+  $rh_res = Dmon::PadiwaSendCmd(0x10000000 | $i * 0x10000, $endpoint, $chain);
   $uid .= sprintf("%04x", $rh_res->{$endpoint} &0xffff);
   #print $uid;
 }
@@ -283,7 +283,7 @@ sub read_thresholds {
     }
 
     $command = $fixed_bits | ($current_channel << 16) ;
-    my $rh_res = Dmon::PadiwaSendCmd($endpoint, $chain, $command);
+    my $rh_res = Dmon::PadiwaSendCmd($command,$endpoint, $chain);
     push (@thresh , $rh_res->{$endpoint});
   }
 
@@ -325,7 +325,7 @@ sub write_thresholds {
     }
 
     $command = $fixed_bits | ($current_channel << 16) | ($ra_thresh->[$current_channel] << $shift_bits);
-    Dmon::PadiwaSendCmd($endpoint, $chain, $command);
+    Dmon::PadiwaSendCmd($command,$endpoint, $chain);
 
 
   }
index 734e0a6c255ad96ce61fb709c6deffe5c6694c83..7b4e3ab924f8a6902c679027fbbaf36c8fbcb51a 100755 (executable)
@@ -4,7 +4,6 @@ use strict;
 use warnings;
 use Data::Dumper;
 
-use lib "/home/hadaq/trbsoft/daqtools/dmon/code";
 use Dmon;
 
 use Getopt::Long;
@@ -96,7 +95,8 @@ sub write_threshold {
 
   my $command= $fixed_bits | ($current_channel << 16) | ($thresh << $shift_bits);
 
-  Dmon::PadiwaSendCmd($endpoint, $chain, $command);
+  #Dmon::PadiwaSendCmd($endpoint, $chain, $command);
+  send_command($endpoint, $chain, $command);
 }
 
 
index f1c73d436af2d033c848d635b093e7c10f020680..7990a7afbbbf8a516eecd481467d43feafd96476 100755 (executable)
@@ -121,6 +121,9 @@ sub PlotInit {
   setranges($fh,'zrange',$p->{$name}->{zmin},$p->{$name}->{zmax});
   setranges($fh,'cbrange',$p->{$name}->{cbmin},$p->{$name}->{cbmax});
 
+  if($p->{$name}->{addCmd} && $p->{$name}->{addCmd} ne "") {  
+    plot_write($fh,$p->{$name}->{addCmd});
+    }
     
   if($p->{$name}->{type} == TYPE_HISTORY) {
     if($p->{$name}->{fill}) {
@@ -173,7 +176,12 @@ sub PlotInit {
     }
   elsif($p->{$name}->{type} == TYPE_HEATMAP) {
     plot_write($fh,"set view map");
-    plot_write($fh,"set palette rgbformulae 22,13,-31");
+    if(defined $p->{$name}->{palette}) {
+      plot_write($fh,"set palette ".$p->{$name}->{palette});
+      }
+    else {
+      plot_write($fh,"set palette rgbformulae 22,13,-31");
+      }
     if ($p->{$name}->{showvalues} == 0) {
       plot_write($fh,"splot '-' matrix with image");
       }
index 9c80f8b48080b7bb2c40b95bb8eb27b760d63256..a19379f563a57b91433ad56ae1f6f1a70cb9bec4 100755 (executable)
@@ -4,12 +4,13 @@
 #Scripts to start & order of icons in the Overview
 activeScripts => [['time','ping','-','-','daqop'],
                   ['numfee','temperature','reftime','billboard','mbs'],
+                  ['beamintensity','-','-','-','-'],
                   ['trgrate','datarate','deadtime','-','-'],
                   ['heatmaprich','padiwatemp','padiwaonline','currents','pscurrents'],
-                  ['cbmnetlink','cbmnetdata','cbmnetsync','-','-'],],
+                  ['cbmnetlink','cbmnetdata','cbmnetsync','-','-']],
                   
 #Names to be shown in left column of Overview (max 4 letters!)
-qaNames => ['sys','main','rate','Pdwa','CNet','-'],                  
+qaNames => ['sys','main','beam','rate','Pdwa','CNet','-'],                  
 
 #Expected number of FPGAs in system
 NumberOfFpga => 90,       
@@ -61,10 +62,11 @@ MBSAddress => 0x0112,
 #Addresses of all TDCs. Either single or broadcast addresses
 TdcAddress   => [0xfe4c,0xfe4e,0x7005],  
 
+#IPs of all devices which should react on a ping
 TrbIP => ["192.168.0.29",
           "192.168.0.47",
           "192.168.0.56",
-          "192.168.0.57",
+#           "192.168.0.57",#extra TRB3
           "192.168.0.59",
           "192.168.0.72",
           "192.168.0.73",
@@ -80,8 +82,16 @@ TrbIP => ["192.168.0.29",
           "192.168.0.104",
           "192.168.0.105"],
 
+#Channel to read spill intensity from. Give limit for off-spill detection
+BeamTRB => 0x0110,
+BeamChan => 0xc005,
+SpillThreshold => 30,
 
+#Name detectors 
+BeamDetectorsTrb  => [0x0111,0x0111,0x0111,0x0110],
+BeamDetectorsChan => [0xc001,0xc005,0xc009,0xc005],
 
 #User directory
 UserDirectory => '/home/hadaq/trbsoft/daqtools/users/cern_cbmrich/',
-PowerSupScript => 'measure_powers.sh' # relative to UserDirectory
+PowerSupScript => 'measure_powers.sh' # relative to user dir
+
index fe463b2f9584e15a7d6b4ae049daa5a9d6edcb57..77e5045ced55b72c65c123045596ed4cc9892959 100755 (executable)
@@ -51,7 +51,7 @@ extraopts="--online"
 cd $tmpdir
 
 
-  exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/home/hadaq/bin/daq_evtbuild -m 18 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file \
+  exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/home/hadaq/bin/daq_evtbuild -m 17 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file \
 ${extraopts}; read; bash" &
 
 
@@ -60,7 +60,7 @@ echo $pid > $tmpdir/.daq_evtbuild.pid
 
 sleep 1
 
-  exec uxterm -fg black -bg tan -geometry 120x20+0+345 -e "/home/hadaq/bin/daq_netmem -m 18 -i UDP:0.0.0.0:50000 -i UDP:0.0.0.0:50001 -i UDP:0.0.0.0:50002 -i UDP:0.0.0.0:50003 -i UDP:0.0.0.0:50004 -i UDP:0.0.0.0:50005 -i UDP:0.0.0.0:50006 -i UDP:0.0.0.0:50007 -i UDP:0.0.0.0:50008 -i UDP:0.0.0.0:50009 -i UDP:0.0.0.0:50010 -i UDP:0.0.0.0:50011 -i UDP:0.0.0.0:50012 -i UDP:0.0.0.0:50013 -i UDP:0.0.0.0:50014 -i UDP:0.0.0.0:50015 -i UDP:0.0.0.0:50016 -i UDP:0.0.0.0:50017 -q 32 -d 1 -S test ;  " &
+  exec uxterm -fg black -bg tan -geometry 120x20+0+345 -e "/home/hadaq/bin/daq_netmem -m 17 -i UDP:0.0.0.0:50000 -i UDP:0.0.0.0:50001 -i UDP:0.0.0.0:50002 -i UDP:0.0.0.0:50003 -i UDP:0.0.0.0:50004 -i UDP:0.0.0.0:50005 -i UDP:0.0.0.0:50006 -i UDP:0.0.0.0:50007 -i UDP:0.0.0.0:50008 -i UDP:0.0.0.0:50009 -i UDP:0.0.0.0:50010 -i UDP:0.0.0.0:50011 -i UDP:0.0.0.0:50012 -i UDP:0.0.0.0:50013 -i UDP:0.0.0.0:50014 -i UDP:0.0.0.0:50015 -i UDP:0.0.0.0:50016 -q 32 -d 1 -S test ;  " &
 
 pid=$!
 echo $pid > $tmpdir/.daq_netmem.pid
index 905b6f67dd9224e98d1a5f69ac11e5f84a780a35..08bae443e2c8826453e086b34e90463354703498 100644 (file)
@@ -87,7 +87,7 @@
  0x0100   0         0xffffffff           0x00000000
  0x0101   0         0xffffffff           0x00000000
  0x0102   0         0xffffffff           0x00000000
- 0x0103   0         0x00000000           0x00000000
+ 0x0103   0         0xffffffff           0x00000000
 
  0x0110   0         0x0000ffff           0x00000000  #gpin
  0x0111   0         0xffffffff           0x00000000  #padiwa amps
index 9bcdcdfe0976f18074fe97a0a18a13cb66ad11e6..50aabda55cd608a962e274d83449a4cb721bed46 100755 (executable)
@@ -3,20 +3,20 @@
 #PATH=${HOME}/trbsoft/bin:${PATH}
 #PATH=${HOME}/trbsoft/daqdata/bin:${PATH}
 #PATH=${HOME}/trbsoft/trbnettools/bin:${PATH}
-export TRB3_SERVER=trb056:26000 
-
-export TRBNETDPID=$(pgrep trbnetd)
-
-echo "- trbnetd pid: $TRBNETDPID"
-
-if [[ -z "$TRBNETDPID" ]] 
-then
-    ~/bin/trbnetd -i 56
-    #~/trbsoft/trbnettools/binlocal/trbnetd -i 56
-fi
-
+#export TRB3_SERVER=trb056:26000 
+
+#export TRBNETDPID=$(pgrep trbnetd)
+
+#echo "- trbnetd pid: $TRBNETDPID"
+#
+#if [[ -z "$TRBNETDPID" ]] 
+#then
+#    ~/bin/trbnetd -i 56
+#    #~/trbsoft/trbnettools/binlocal/trbnetd -i 56
+#fi
+#
 #export TRB3_SERVER=trb056
-export DAQOPSERVER=10.160.0.77:56
+#export DAQOPSERVER=10.160.0.78:56
 
 
 
@@ -116,7 +116,7 @@ echo "- setting trigger rate register in TDC";
 trbcmd w 0x7005 0xa150 0x0001869f
 
 # pulser enable
-trbcmd setbit 0x7005 0xa101 0x1
+#trbcmd setbit 0x7005 0xa101 0x1
 #trbcmd clearbit 0x8000 0xa101 0x3
 
 # divert TDC inputs to the CTS for trigger
@@ -138,6 +138,14 @@ echo "loading MAPMT thresholds: ${thresholdfile}"
 echo "offset is ${offset}   (200=1mv on input)"
 ../../thresholds/write_thresholds.pl $thresholdfile -o $offset
 
+echo "Loading Padiwa Amps Settings"
+/home/hadaq/trbsoft/daqtools/padiwa.pl 0x111 0 invert 0xaaaa
+../../thresholds/write_thresholds.pl thresh/thresholds_padiwa_amps.thr -o 0
+
+
+echo "Disable noisy pixel in Padiwa"
+/home/hadaq/trbsoft/daqtools/padiwa.pl 0x073 0 disable 0x0001
+
 #8103 3
 #trbcmd clearbit 0x7005 0xc0 0x7
 #trbcmd clearbit 0x7005 0xc1 0x7
index 5668c68c1e781abc97897ffe29507191e2b5bd18..de54d55f577b472b5b2b2a32ebf2183c8e720981 100644 (file)
@@ -1,11 +1,11 @@
-2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 00 threshold: 0x06F6, uid: 0
-2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 01 threshold: 0xDB23, uid: 0
-2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 02 threshold: 0x077D, uid: 0
-2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 03 threshold: 0xDC50, uid: 0
-2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 04 threshold: 0x0672, uid: 0
-2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 05 threshold: 0xDC50, uid: 0
-2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 06 threshold: 0xffff, uid: 0
-2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 07 threshold: 0x0000, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 00 threshold: 0x0697, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 01 threshold: 0xDA00, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 02 threshold: 0x0744, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 03 threshold: 0xDB10, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 04 threshold: 0x0600, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 05 threshold: 0xD880, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 06 threshold: 0x0600, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 07 threshold: 0xdf80, uid: 0
 2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 08 threshold: 0xffff, uid: 0
 2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 09 threshold: 0x0000, uid: 0
 2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 10 threshold: 0xffff, uid: 0
index 94d5c6cdb7bafd53177eee7ff71f7d8636e82f85..5efffc4745574af9ead3b183e4e6ee563533d98b 100755 (executable)
@@ -21,7 +21,7 @@ $plot2->{zlabel}  = "Hitrate";
 $plot2->{sizex}   = 700;
 $plot2->{sizey}   = 650;
 $plot2->{nokey}   = 1;
-$plot2->{buffer}  = 1;
+$plot2->{buffer}  = 0;
 $plot2->{xmin}    = 0.5;
 $plot2->{xmax}    = 32.5;
 $plot2->{ymin}    = 0.5;
index af9811c931b79fcb798286dd0b4c0ed348da4237..617e93f521eb20b183a6ff6dd5818ae9414c3916 100755 (executable)
@@ -106,6 +106,7 @@ The main documentation of the network can be found in these documents and locati
 <li><a href="tools/pwr/index.html" title="Currently supported: GW-Instek PSP-405 family, HMP2020 - HMP4040 family">Control for power supplies</a>
 <li><a href="tools/vxi/index.html" title="Tested with Tektronix AFG3000 function generator">Control for devices running the VXI-11 protocol</a>
 <li><a href="dmon/index.pl" title="DMON">DMON DAQ Monitoring</a></li>
+<li><a href="daqi/index.html" title="DMON">DAQi Control</a></li>
 </ul>
 </div>
 </div>