diff --git a/reco/detectors/tof/CbmTofCalibrator.cxx b/reco/detectors/tof/CbmTofCalibrator.cxx index 913e764fce543669b404335e4cb914f12226e2bd..bd0db693d91582d829a7ad48dc71709b7966c516 100644 --- a/reco/detectors/tof/CbmTofCalibrator.cxx +++ b/reco/detectors/tof/CbmTofCalibrator.cxx @@ -403,17 +403,17 @@ Bool_t CbmTofCalibrator::UpdateCalHist(Int_t iOpt) { Int_t iSmType = CbmTofAddress::GetSmType(iUniqueId); Int_t iSm = CbmTofAddress::GetSmId(iUniqueId); Int_t iRpc = CbmTofAddress::GetRpcId(iUniqueId); + if(NULL == fhCorTOff[iDetIndx]) { + LOG(warn) << "hCorTOff for TSR "<<iSmType<<iSm<<iRpc<<" not available"; + continue; + } + switch (iOpt) { case 0: // none break; case 1: // update channel mean { - LOG(info) << "Update Offsets for TSR " << iSmType << iSm << iRpc; - if (NULL == fhCorTOff[iDetIndx]) { - LOG(warn) << "hCorTOff for TSR " << iSmType << iSm << iRpc - << " not available"; - continue; - } + LOG(info) << "Update Offsets for TSR "<<iSmType<<iSm<<iRpc; TProfile* hpP = fhCalPos[iDetIndx]->ProfileX(); TProfile* hpT = fhCalTOff[iDetIndx]->ProfileX();