]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
Latest updates from Cern CBM Rich test
authorCbm Rich <richdaq@wuppertal>
Sun, 16 Nov 2014 17:40:55 +0000 (18:40 +0100)
committerCbm Rich <richdaq@wuppertal>
Sun, 16 Nov 2014 17:40:55 +0000 (18:40 +0100)
dmon/scripts/dmon_currents.pl
dmon/scripts/dmon_heatmaprich.pl
thresholds/thresholds_automatic_jan.pl
thresholds/write_thresholds.pl
users/cern_cbmrich/dmon_config.pl
users/cern_cbmrich/evtbuilder_start.sh
users/cern_cbmrich/thresh/billboard_info [deleted file]
users/cern_cbmrich/thresh/current_thresholds.thr
users/cern_cbmrich/thresh/thresholds_padiwa_amps.thr

index 8092154fca37eb9f53b797c1180d3f052c8d6586..9203da9363ec21c96501c460734408fac7711772 100755 (executable)
@@ -46,12 +46,16 @@ while (1) {
   my $data = Perl2Epics::GetAll();
   my $maximum = 0;
   my $total = 0;
+  my $updatemissing = 0;
 
   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);
+    if (time - $data->{"C".$i}->{"tme"} > 240) {
+      $updatemissing = 1;
+      }
     }
   HPlot::PlotDraw('PadiwaCurrents');
 
@@ -59,6 +63,12 @@ while (1) {
     my $value    = sprintf("%.2fA / %.2fA", $maximum, $total);
     my $longtext = "Maximum / Total current: ". $value;
     my $status   = Dmon::OK;
+
+  if ($updatemissing) {
+    $status = Dmon::WARN;
+    $longtext .="<br>Updates missing";
+    }
+
     Dmon::WriteQALog($config{flog},"currents",30,$status,$title,$value,$longtext,'2-PadiwaCurrents');
 
 
index 234c55d98a47601b3379bd17cdcda7b0cc6bc8c3..5b166c1c9c7c84864dee6bffbd7678032c653573 100755 (executable)
@@ -84,7 +84,7 @@ my $diff;
 
 while (1) {
   my $o = trb_register_read_mem($config{PadiwaBroadcastAddress},0xc000,0,33);
-
+  my $sum = 0;
   if (defined $old) {
     foreach my $b (keys %$o) {
       for my $v (0..32) {
@@ -100,13 +100,14 @@ while (1) {
         my $fpga    = $ChannelMapping::chanmap->{fpga}->[$x]->[$y];
         my $channel = $ChannelMapping::chanmap->{chan}->[$x]->[$y];
         HPlot::PlotFill('HeatmapRich',$diff->{$fpga}->[$channel],$x,$y);
+        $sum += $diff->{$fpga}->[$channel];
         }
       }
     HPlot::PlotDraw('HeatmapRich');      
     }
   my $status = Dmon::OK;
   my $title  = "Heatmap";
-  my $value = "";
+  my $value = Dmon::SciNotation($sum);
   my $longtext = "See plot";
   Dmon::WriteQALog($config{flog},"heatmaprich",5,$status,$title,$value,$longtext,'1-HeatmapRich');
   $old = $o;
index 1cc3c24b126bdb50cad4276164d236fa2539402c..2987bc473852ffb9ad0d622ee8ce01d26a9c1fcd 100755 (executable)
@@ -11,6 +11,7 @@ use Getopt::Long;
 use Time::HiRes qw(time usleep);
 use Log::Log4perl qw(get_logger);
 use List::Util qw(min max);
+use POSIX qw(strftime);
 use HADES::TrbNet;
 
 # use IPC::ShareLite qw( :lock );
@@ -239,6 +240,7 @@ foreach my $i (reverse (0..3)) {
 
 my $str;
 
+$logger_data->info(time);
 foreach my $i (0..15) {
   $logger_data->info(sprintf "endpoint: 0x%04x, chain: %02d, channel: %2d threshold: 0x%04x, uid: %s", $endpoint, $chain, $i, $best_thresh[$i], $uid );
 }
index 7b4e3ab924f8a6902c679027fbbaf36c8fbcb51a..486d894ea3c113a5f7bf0f680aad5bcf2e96e7cd 100755 (executable)
@@ -3,12 +3,10 @@
 use strict;
 use warnings;
 use Data::Dumper;
-
 use Dmon;
-
 use Getopt::Long;
-
 use HADES::TrbNet;
+use POSIX qw(strftime);
 
 my $offset = 0;
 my $help;
@@ -46,10 +44,16 @@ trb_init_ports() or die trb_strerror();
 
 
 open(my $fh, "<$ARGV[0]" || die "could not open file '$ARGV[0]'");
-
 my @f = <$fh>;
 
 
+#Put Information to logfile and timestamp to billboard information
+chomp $f[0];
+system("echo ".time.'     '.strftime("%Y-%m-%d %H:%M:%S",localtime()).'     '." $f[0]>>threshold_log.txt");
+my ($t) = $f[0] =~ /(\d{10})/;
+system("echo $t>billboard_info");
+
+exit;
 my $count=0;
 foreach my $cl (@f) {
     (my $ep, my $chain, my $channel, my $thresh, my $uid) = 
@@ -143,6 +147,9 @@ has to be in the format of the output of the automatic threshold determination
 
 currently only mode "padiwa" is implemented.
 
+The script puts a timestamp of execution and the timestamp of the thresholds file to threshold_log.txt.
+The script puts the timestamp of the threshold file to billboard_info.
+
 EOF
 
 }
index 509153176d1b9fe29f639a57300d149861fb274c..ad4edaf38556059be3ba3b5ded8f7c6e9b3377b4 100755 (executable)
@@ -4,7 +4,7 @@
 #Scripts to start & order of icons in the Overview
 activeScripts => [['time','ping','-','-','daqop'],
                   ['numfee','temperature','reftime','billboard','mbs'],
-                  ['beamintensity','beammonitors','-','-','richenvironment'],
+                  ['beamintensity','beammonitors','-','richhvres','richenvironment'],
                   ['trgrate','datarate','deadtime','-','-'],
                   ['heatmaprich','padiwatemp','padiwaonline','currents','pscurrents'],
                   ['cbmnetlink','cbmnetdata','cbmnetsync','-','-']],
index 77e5045ced55b72c65c123045596ed4cc9892959..a222b621b10c9fb3d1172df8ab8493150f1dd872 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 17 -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 --filesize 512 \
 ${extraopts}; read; bash" &
 
 
diff --git a/users/cern_cbmrich/thresh/billboard_info b/users/cern_cbmrich/thresh/billboard_info
deleted file mode 100644 (file)
index 56cc36c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-0xdeadcode
\ No newline at end of file
index 2170e3821ad21e004f929c2837c5fe0e067e38d4..3a803868e67a5c4743ac622fc5dcded530b5c699 120000 (symlink)
@@ -1 +1 @@
-201411160018.thr
\ No newline at end of file
+201411161747.thr
\ No newline at end of file
index 915feb69616edd4808a36bea89336c609a695e97..7581a1617d4a8631273005ed28f511ca2472a37b 100644 (file)
@@ -19,7 +19,7 @@
 2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 01 threshold: 0x0000, uid: 0
 2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 02 threshold: 0xffff, uid: 0
 2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 03 threshold: 0x0000, uid: 0
-2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 04 threshold: 0x0942, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 04 threshold: 0x073E, uid: 0
 2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 05 threshold: 0xD511, uid: 0
 2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 06 threshold: 0xffff, uid: 0
 2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 07 threshold: 0x0000, uid: 0