Adding additional sum check (Jens)
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 9 Feb 2008 16:49:23 +0000 (16:49 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 9 Feb 2008 16:49:23 +0000 (16:49 +0000)
TPC/AliTPCCalibPulser.cxx

index 75fa252..c189383 100644 (file)
@@ -621,10 +621,9 @@ void AliTPCCalibPulser::EndEvent()
     //loop over all ROCs, fill Time0 histogram corrected for the mean Time0 of each ROC
     for ( Int_t iSec = 0; iSec<72; ++iSec ){
        TVectorF *vTimes = GetPadTimesEvent(iSec);
-        if ( !vTimes ) continue;
-
+        if ( !vTimes || fVTime0OffsetCounter[iSec]==0 ) continue;
+       Float_t time0 = fVTime0Offset[iSec]/fVTime0OffsetCounter[iSec];
        for ( UInt_t iChannel=0; iChannel<fROC->GetNChannels(iSec); ++iChannel ){
-           Float_t time0 = fVTime0Offset[iSec]/fVTime0OffsetCounter[iSec];
            Float_t time  = (*vTimes).GetMatrixArray()[iChannel];
 
             GetHistoT0(iSec,kTRUE)->Fill( time-time0,iChannel );