]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
some bugfixes to dmon scripts
authorMichael Traxler <M.Traxler@gsi.de>
Tue, 4 Nov 2014 10:11:46 +0000 (11:11 +0100)
committerMichael Traxler <M.Traxler@gsi.de>
Tue, 4 Nov 2014 10:11:46 +0000 (11:11 +0100)
dmon/code/Dmon.pm
dmon/scripts/dmon_cbmnetsync.pl
dmon/scripts/dmon_heatmaprich.pl
dmon/scripts/dmon_trgrate.pl

index be390570e94c142da6876a20905b8e7f389bb520..6ee69ced3cea4a4d87d1404e3360498aac5401d5 100644 (file)
@@ -34,7 +34,8 @@ my $OldValues; my $firstrun = 1;
 sub MakeRate {
   my ($pos,$width,$usets,$t) = @_;
   my $res;
-  
+  return unless defined $t;  
+
   foreach my $b (keys $t) {
     for my $i (0..((scalar @{$t->{$b}{value}})-1)) {
       my $value    = $t->{$b}{value}[$i]||0;
index ce856102a8a9f6d4656d08e97f489b7262ae8290..1e9ea268bbe74abf6d24b257808c7ecfed8fb571 100755 (executable)
@@ -22,7 +22,8 @@ while(1) {
   
   if( defined $regs->{$config{CtsAddress}}) {
     my $linkActive    = $regs->{$config{CtsAddress}}[0] & 0x20;
-    my $pulserFreqKHz = 125e3 / $regs->{$config{CtsAddress}}[1];
+    my $pulserFreqKHz = $regs->{$config{CtsAddress}}[1] | 0;
+    $pulserFreqKHz = 125e3 / ($regs->{$config{CtsAddress}}[1]) if $regs->{$config{CtsAddress}}[1];
     $dlmCnt = $linkActive ? $regs->{$config{CtsAddress}}[0xa] : -1;
     
     $value = "$dlmCnt DLMs";
index e8f438066c686c2c1eea0653c3b549e142ea7da0..e25c9ee3c4c728f7b1f407e641f85ed1f8bce522 100755 (executable)
@@ -20,7 +20,7 @@ my %config = Dmon::StartUp();
 
 my $plot2 = ();
 $plot2->{name}    = "HeatmapRich";
-$plot2->{file}    = Dmon::DMONDIR."heatmaprich";
+$plot2->{file}    = Dmon::DMONDIR."HeatmapRich";
 $plot2->{entries} = 33;
 $plot2->{curves}  = 33;
 $plot2->{type}    = HPlot::TYPE_HEATMAP;
@@ -34,7 +34,7 @@ $plot2->{xmin}    = 0.5;
 $plot2->{xmax}    = 32.5;
 $plot2->{ymin}    = 0.5;
 $plot2->{ymax}    = 32.5;
-$plot2->{showvalues} = 1;
+$plot2->{showvalues} = 0;
 $plot2->{xlabel} = "column";
 $plot2->{ylabel} = "row";
 HPlot::PlotInit($plot2);
@@ -54,6 +54,7 @@ my $diff;
 while (1) {
   my $t = trb_register_read_mem(0xfe48,0xc000,0,33);
 
+
   if (defined $old) {
     foreach my $b (keys %$o) {
       for my $v (0..32) {
index 8a564ddd99a1fc5a948257bbdaecf701ee398531..e05099b243c98588c961732b70b724e6280ca8ad 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+M#!/usr/bin/perl -w
 
 use warnings;
 use POSIX qw(strftime);
@@ -40,7 +40,8 @@ Dmon::WriteFile("TriggerRate",$str);
 
 while(1) {
   my $r = trb_registertime_read($config{CtsAddress},0xa002) ;
-  my $t = Dmon::MakeRate(0,32,1,$r);
+  my $t;
+  $t = Dmon::MakeRate(0,32,1,$r)   if( defined $r );
 
   if( defined $t) {
     $summing += $t->{$config{CtsAddress}}{rate}[0];