]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
status
authorhadaq@countinghouse <hadaq@CountingHouse>
Thu, 28 Aug 2014 15:19:14 +0000 (17:19 +0200)
committerhadaq@countinghouse <hadaq@CountingHouse>
Thu, 28 Aug 2014 15:19:14 +0000 (17:19 +0200)
hmon/hmon_hodo_hist.pl

index e3c2ad80ebda1164599c459de7deb30804b2809f..8eaa656217ce75911dcdbe76dae56e55c5450784 100755 (executable)
@@ -225,7 +225,7 @@ $spillsum->{0x8880} = 0;
 $spillsum->{0x8890} = 0;
 $spillsum->{0x3810} = 0;
 $spillsum->{0x3811} = 0;
-$spillsum->{0x3000} = 0;
+$spillsum->{0x0002} = 0;
 
 trb_init_ports() or die trb_strerror();
 
@@ -245,18 +245,18 @@ while (1) {
       }
     }
 
-  $t = trb_registertime_read(0x3000,1);
+  $t = trb_registertime_read(0x0002,1);
   if (defined $t) {
     if (defined $olde) {
       #my $tdiff = $t->{0x3000}->{time}->[0] - ($oldtime->{0x3000}||0);
-      my $vdiff = ($t->{0x3000}->{value}->[0]&0xffff) - ($olde->{0x3000}&0xffff);
+      my $vdiff = ($t->{0x0002}->{value}->[0]&0xffff) - ($olde->{0x0002}&0xffff);
       if ($vdiff < 0) { $vdiff += 2**16;}
       #if ($tdiff < 0) { $tdiff += 2**16;}
       #$tdiff *= 16;
-      $diffe->{0x3000}   = $vdiff;#/($tdiff||1E6)*1E6;
+      $diffe->{0x0002}   = $vdiff;#/($tdiff||1E6)*1E6;
       }
     #$oldtime->{0x3000} = $t->{0x3000}->{time}->[0];
-    $olde->{0x3000}    = $t->{0x3000}->{value}->[0];
+    $olde->{0x0002}    = $t->{0x0002}->{value}->[0];
     }   
  
   if (defined $old) {
@@ -314,7 +314,7 @@ while (1) {
       }
 #     print $totalstart;
     
-    if($total > 1000) {
+    if($sum[0] > 1000) {
       HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3800}->{0x8132}||0)-$offset->{0x3800})/(($totalstart-$offset->{0x8880})||1),0);    
       HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3801}->{0x8132}||0)-$offset->{0x3801})/(($totalstart-$offset->{0x8880})||1),1);    
       HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3810}->{0x8132}||0)-$offset->{0x3810})/(($totalstart-$offset->{0x8880})||1),2);    
@@ -331,7 +331,7 @@ while (1) {
       $spillsum->{0x3811} += (($diff2->{0x3811}->{0x8132}||0)-$offset->{0x3811})/5;
       $spillsum->{0x8880} += (($totalstart||0)-$offset->{0x8880})/5;
       $spillsum->{0x8890} += (($total||0)-$offset->{0x8890})/5/2;
-      $spillsum->{0x3000} += $diffe->{0x3000};
+      $spillsum->{0x0002} += $diffe->{0x0002};
       }
     else {
       HPlot::PlotAdd("HitRatioHist",0,0);    
@@ -356,13 +356,13 @@ while (1) {
         HPlot::PlotAdd('SpillSumHist',$spillsum->{0x3811},1);
         HPlot::PlotAdd('SpillSumHist',$spillsum->{0x8880},2);
         HPlot::PlotAdd('SpillSumHist',$spillsum->{0x8890},3);
-        HPlot::PlotAdd('SpillSumHist',$spillsum->{0x3000}*50,4); #MT: why? times 20 should be fine....
+        HPlot::PlotAdd('SpillSumHist',$spillsum->{0x0002}*50,4); #MT: why? times 20 should be fine....
         HPlot::PlotDraw('SpillSumHist');
         $spillsum->{0x8880} = 0;
         $spillsum->{0x8890} = 0; 
         $spillsum->{0x3810} = 0;
         $spillsum->{0x3811} = 0;
-        $spillsum->{0x3000} = 0;
+        $spillsum->{0x0002} = 0;
         }
       }