Skip to content

Commit b6e33f8

Browse files
authored
[PWGCF] Flow Event Plane Update CCDB timestamp (#16240)
1 parent b02418e commit b6e33f8

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

PWGCF/Flow/Tasks/flowEventPlane.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ struct SpectatorPlaneTableProducer {
180180
// CCDB
181181
Configurable<std::string> cCcdbUrl{"cCcdbUrl", "http://ccdb-test.cern.ch:8080", "url of ccdb"};
182182
Configurable<std::string> cCcdbPath{"cCcdbPath", "Users/y/ypatley/DFOO", "Path for ccdb-object"};
183+
Configurable<int64_t> nolaterthan{"nolaterthan", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"};
183184

184185
// Tracks
185186
Configurable<float> cTrackMinPt{"cTrackMinPt", 0.1, "p_{T} minimum"};
@@ -238,6 +239,8 @@ struct SpectatorPlaneTableProducer {
238239
// Set CCDB url
239240
ccdbService->setURL(cCcdbUrl.value);
240241
ccdbService->setCaching(true);
242+
ccdbService->setLocalObjectValidityChecking();
243+
ccdbService->setCreatedNotAfter(nolaterthan.value);
241244

242245
// Define axes
243246
const AxisSpec axisZDCEnergy{500, 0, 500, "ZD[AC] Signal"};
@@ -379,7 +382,7 @@ struct SpectatorPlaneTableProducer {
379382
// Load ZDC gain calibration
380383
if (cDoGainCalib) {
381384
std::string ccdbPath = static_cast<std::string>(cCcdbPath) + "/GainCalib" + "/Run" + std::to_string(cRunNum);
382-
auto ccdbObj = ccdbService->getForTimeStamp<TList>(ccdbPath, 1);
385+
auto ccdbObj = ccdbService->getForTimeStamp<TList>(ccdbPath, nolaterthan.value);
383386
CorrectionHistContainer.hGainCalib[0] = reinterpret_cast<TH2F*>(ccdbObj->FindObject("hZNASignal"));
384387
CorrectionHistContainer.hGainCalib[1] = reinterpret_cast<TH2F*>(ccdbObj->FindObject("hZNCSignal"));
385388
}
@@ -407,7 +410,7 @@ struct SpectatorPlaneTableProducer {
407410
std::string ccdbPath = static_cast<std::string>(cCcdbPath) + "/CorrItr_" + std::to_string(i + 1) + "/Run" + std::to_string(cRunNum);
408411

409412
// Get object from CCDB
410-
auto ccdbObject = ccdbService->getForTimeStamp<TList>(ccdbPath, 1);
413+
auto ccdbObject = ccdbService->getForTimeStamp<TList>(ccdbPath, nolaterthan.value);
411414

412415
// Check CCDB Object
413416
if (!ccdbObject) {

0 commit comments

Comments
 (0)