Skip to content

Commit ebf2f92

Browse files
authored
Minor changes in varaible declaration
1 parent 5a28166 commit ebf2f92

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Detectors/MUON/MID/Calibration/macros/build_rejectlist.C

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,10 @@ RejectListStruct load_from_json(const o2::ccdb::CcdbApi& ccdbApi, const char* fi
334334
int64_t startTSms = 0;
335335
int64_t endTSms = 0;
336336

337+
//run numbers from the json
338+
int startRun = doc["startRun"].GetInt();
339+
int endRun = doc["endRun"].GetInt();
340+
337341
// check if there are non-zero timestamps in the json
338342
bool hasStartTT = doc.HasMember("startTT") && doc["startTT"].IsInt64() && doc["startTT"].GetInt64() != 0;
339343
bool hasEndTT = doc.HasMember("endTT") && doc["endTT"].IsInt64() && doc["endTT"].GetInt64() != 0;
@@ -342,8 +346,6 @@ RejectListStruct load_from_json(const o2::ccdb::CcdbApi& ccdbApi, const char* fi
342346
endTSms = doc["endTT"].GetInt64();
343347

344348
// sanity check against the run boundaries
345-
int startRun = doc["startRun"].GetInt();
346-
int endRun = doc["endRun"].GetInt();
347349
auto runStart = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, startRun).first;
348350
auto runEnd = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, endRun).second;
349351
if (startTSms < runStart || endTSms > runEnd) {
@@ -353,8 +355,6 @@ RejectListStruct load_from_json(const o2::ccdb::CcdbApi& ccdbApi, const char* fi
353355
}
354356
} else {
355357
// use run start/end if there are no timestamps in the json
356-
int startRun = doc["startRun"].GetInt();
357-
int endRun = doc["endRun"].GetInt();
358358
startTSms = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, startRun).first;
359359
endTSms = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, endRun).second;
360360
}
@@ -480,4 +480,4 @@ void build_rejectlist(long start, long end, const char* qcdbUrl = "http://ali-qc
480480
outCCDBApi.storeAsTFileAny(&rl.rejectList, "MID/Calib/RejectList", metadata, rl.start, rl.end);
481481
}
482482
}
483-
}
483+
}

0 commit comments

Comments
 (0)