]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
fixed every second not shown bug, mt
authorhadaq <jan@lxhadeb07>
Mon, 4 Feb 2019 10:43:36 +0000 (11:43 +0100)
committerhadaq <jan@lxhadeb07>
Mon, 4 Feb 2019 10:43:36 +0000 (11:43 +0100)
hmon/hmon_trgerr.pl

index b5d92ffe8823ab4d5310bfaa4605af746918a443..34c386f5f9f56a3707b05f8995cb463998bf02d0 100755 (executable)
@@ -38,6 +38,7 @@ while (1) {
     my $id_3 = ($board >> 0) & 0x0f;
     my $val = ((($rh_trigErr->{$board} >> 16) & 0xffff) +
                ($rh_trigErr->{$board} & 0xffff));
+    #printf "board: %x: id: $id id_0: $id_0 id_1: $id_1 id_2: $id_2 id_3: $id_3 val: $val\n",$board;
     if ($id_0 == 0x2) {
       $store{$id_1}->{$id_2}->{$id_3} = $val;
     }
@@ -62,6 +63,7 @@ while (1) {
     $store2{$id} += $val;
   }
 
+  #print Dumper $boards;
 #  if ($seconds>=5) {
 #    $boards->{0x7466} = 10;
 #  }
@@ -93,6 +95,8 @@ while (1) {
   my $sum = 0;
   my $totalsum = 0;
   #print Dumper $boards;
+  #print "allboards:\n";
+  #print Dumper $allboards;
   if ($seconds>0 && exists $boards->{0xfc00}) {
     #print "in check\n";
   #   foreach my $c (keys %store2) {
@@ -112,6 +116,9 @@ while (1) {
       $diff_10sec = $boards->{$c} - $boards_history[9]->{$c} if (defined $boards_history[9]->{$c});
       while ($diff < 0) { $diff += 2**16; }
       while ($diff_10sec < 0) { $diff_10sec += 2**16; }
+
+      #print "diff:_$diff , totalsum: $totalsum\n";
+      $sum += $diff;
       $totalsum += $boards->{$c};
 
       if ( $diff != 0 || $diff_10sec !=0 ) {
@@ -147,6 +154,7 @@ while (1) {
 
   %laststore2 = %store2;
   %$allboards = %$boards;
+  $sum=0;
   sleep 1;
   $seconds++;
   my %temp_boards = %$boards;