Skip to content

Commit 6efc122

Browse files
[Common] Add option to prevent fatal error in ctpRateFetcher::fetch() (#10598)
1 parent 889ebab commit 6efc122

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Common/CCDB/ctpRateFetcher.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
namespace o2
2424
{
25-
double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName)
25+
double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName, bool fCrashOnNull)
2626
{
2727
setupRun(runNumber, ccdb, timeStamp);
2828
if (sourceName.find("ZNC") != std::string::npos) {
@@ -43,7 +43,7 @@ double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStam
4343
if (ret < 0.) {
4444
LOG(info) << "Trying different class";
4545
ret = fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVX-NONE");
46-
if (ret < 0) {
46+
if ((ret < 0) && fCrashOnNull) {
4747
LOG(fatal) << "None of the classes used for lumi found";
4848
}
4949
}

Common/CCDB/ctpRateFetcher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ctpRateFetcher
3434
{
3535
public:
3636
ctpRateFetcher() = default;
37-
double fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName);
37+
double fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName, bool fCrashOnNull = true);
3838

3939
void setManualCleanup(bool manualCleanup = true) { mManualCleanup = manualCleanup; }
4040

0 commit comments

Comments
 (0)