From: hadaq Date: Mon, 4 Feb 2019 10:43:36 +0000 (+0100) Subject: fixed every second not shown bug, mt X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=a43b216dec435355cd6664ae8235c3580616c32b;p=hadesdaq.git fixed every second not shown bug, mt --- diff --git a/hmon/hmon_trgerr.pl b/hmon/hmon_trgerr.pl index b5d92ff..34c386f 100755 --- a/hmon/hmon_trgerr.pl +++ b/hmon/hmon_trgerr.pl @@ -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;