]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
get.pl
authorhadeshyp <hadeshyp>
Wed, 14 Nov 2012 22:30:49 +0000 (22:30 +0000)
committerhadeshyp <hadeshyp>
Wed, 14 Nov 2012 22:30:49 +0000 (22:30 +0000)
cts/htdocs/thresh/get.pl

index 65685f86ab6fb7ac033d7ce76b28f842ed1aa472..77508040a9168b91593a0aa88a1500a084960ba5 100755 (executable)
@@ -34,14 +34,16 @@ if($amount != 1) {
     my $i = 0;
     my @hits;
     do {
-      $hits[$i] = trb_register_read_mem($board,$addr+$i*$chunk,0,$amount/$split);
+      $hits[$i] = trb_register_read_mem($board,$addr+$i*$chunk,0,$chunk);
 #       print ($board." ".($addr+$i*$chunk)." ".($amount/$split)."\n");
       } while(++$i < $split);
     foreach my $b (sort keys %{$hits[0]}) {
       printf ("%04x",$b);
       for(my $i = 0; $i < scalar @hits; $i++) {
         for(my $c =0; $c < $chunk; $c++) {
-          printf(" %d",$hits[$i]->{$b}->[$c]);
+          if($i*$chunk + $c < $amount) {
+            printf(" %d",$hits[$i]->{$b}->[$c]);
+            }
           }
         }
       print "&";