Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor changes in varaible declaration
  • Loading branch information
ariffero authored Jun 16, 2025
commit ebf2f92446459110a392c3243122aeeb82dbcd61
10 changes: 5 additions & 5 deletions Detectors/MUON/MID/Calibration/macros/build_rejectlist.C
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ RejectListStruct load_from_json(const o2::ccdb::CcdbApi& ccdbApi, const char* fi
int64_t startTSms = 0;
int64_t endTSms = 0;

//run numbers from the json
int startRun = doc["startRun"].GetInt();
int endRun = doc["endRun"].GetInt();

// check if there are non-zero timestamps in the json
bool hasStartTT = doc.HasMember("startTT") && doc["startTT"].IsInt64() && doc["startTT"].GetInt64() != 0;
bool hasEndTT = doc.HasMember("endTT") && doc["endTT"].IsInt64() && doc["endTT"].GetInt64() != 0;
Expand All @@ -342,8 +346,6 @@ RejectListStruct load_from_json(const o2::ccdb::CcdbApi& ccdbApi, const char* fi
endTSms = doc["endTT"].GetInt64();

// sanity check against the run boundaries
int startRun = doc["startRun"].GetInt();
int endRun = doc["endRun"].GetInt();
auto runStart = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, startRun).first;
auto runEnd = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, endRun).second;
if (startTSms < runStart || endTSms > runEnd) {
Expand All @@ -353,8 +355,6 @@ RejectListStruct load_from_json(const o2::ccdb::CcdbApi& ccdbApi, const char* fi
}
} else {
// use run start/end if there are no timestamps in the json
int startRun = doc["startRun"].GetInt();
int endRun = doc["endRun"].GetInt();
startTSms = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, startRun).first;
endTSms = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, endRun).second;
}
Expand Down Expand Up @@ -480,4 +480,4 @@ void build_rejectlist(long start, long end, const char* qcdbUrl = "http://ali-qc
outCCDBApi.storeAsTFileAny(&rl.rejectList, "MID/Calib/RejectList", metadata, rl.start, rl.end);
}
}
}
}