From 3d42dd3735438b6f069f913b3774e6c7d9c17a2a Mon Sep 17 00:00:00 2001 From: "hadaq@countinghouse" Date: Thu, 28 Aug 2014 17:19:14 +0200 Subject: [PATCH] status --- hmon/hmon_hodo_hist.pl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hmon/hmon_hodo_hist.pl b/hmon/hmon_hodo_hist.pl index e3c2ad8..8eaa656 100755 --- a/hmon/hmon_hodo_hist.pl +++ b/hmon/hmon_hodo_hist.pl @@ -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; } } -- 2.43.0