Skip to content

Commit 5cbff2b

Browse files
authored
Avoid fatal in CTPRateFetcher
1 parent b5ab60d commit 5cbff2b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

DataFormats/Detectors/CTP/src/CTPRateFetcher.cxx

+8-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ double CTPRateFetcher::fetchNoPuCorr(o2::ccdb::BasicCCDBManager* ccdb, uint64_t
4646
LOG(info) << "Trying different class";
4747
ret = fetchCTPratesClassesNoPuCorr(timeStamp, "CMTVX-NONE");
4848
if (ret < 0) {
49-
LOG(fatal) << "None of the classes used for lumi found";
49+
LOG(error) << "None of the classes used for lumi found";
50+
return -1.;
5051
}
5152
}
5253
return ret;
@@ -245,17 +246,19 @@ void CTPRateFetcher::setupRun(int runNumber, o2::ccdb::BasicCCDBManager* ccdb, u
245246
return;
246247
}
247248
mRunNumber = runNumber;
248-
LOG(info) << "Setting up CTP scalers for run " << mRunNumber;
249+
LOG(info) << "Setting up CTP scalers for run " << mRunNumber << " and timestamp : " << timeStamp;
249250
auto ptrLHCIFdata = ccdb->getSpecific<parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF", timeStamp);
250251
if (ptrLHCIFdata == nullptr) {
251-
LOG(fatal) << "GRPLHCIFData not in database, timestamp:" << timeStamp;
252+
LOG(error) << "GRPLHCIFData not in database, timestamp:" << timeStamp;
253+
return;
252254
}
253255
mLHCIFdata = *ptrLHCIFdata;
254256
std::map<string, string> metadata;
255257
metadata["runNumber"] = std::to_string(mRunNumber);
256258
auto ptrConfig = ccdb->getSpecific<ctp::CTPConfiguration>("CTP/Config/Config", timeStamp, metadata);
257259
if (ptrConfig == nullptr) {
258-
LOG(fatal) << "CTPRunConfig not in database, timestamp:" << timeStamp;
260+
LOG(error) << "CTPRunConfig not in database, timestamp:" << timeStamp;
261+
return;
259262
}
260263
mConfig = *ptrConfig;
261264
if (initScalers) {
@@ -264,7 +267,7 @@ void CTPRateFetcher::setupRun(int runNumber, o2::ccdb::BasicCCDBManager* ccdb, u
264267
mScalers = *ptrScalers;
265268
mScalers.convertRawToO2();
266269
} else {
267-
LOG(fatal) << "CTPRunScalers not in database, timestamp:" << timeStamp;
270+
LOG(error) << "CTPRunScalers not in database, timestamp:" << timeStamp;
268271
}
269272
}
270273
}

0 commit comments

Comments
 (0)