Skip to content
Snippets Groups Projects
Commit 92a5820a authored by Norbert Herrmann's avatar Norbert Herrmann Committed by Florian Uhlig
Browse files

avoid crash when counters are missing in setup

parent 52e98832
No related branches found
No related tags found
1 merge request!138Final merge
......@@ -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;
}
TProfile* hpP = fhCalPos[iDetIndx]->ProfileX();
TProfile* hpT = fhCalTOff[iDetIndx]->ProfileX();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment