Skip to content

Commit 2d44451

Browse files
authored
[PWGLF] Adds a ccdbNoLaterThan configurable (#11298)
1 parent 6a8c6cd commit 2d44451

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PWGLF/Tasks/GlobalEventProperties/uccZdc.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
#include "ReconstructionDataFormats/GlobalTrackID.h"
4646
#include "ReconstructionDataFormats/Track.h"
4747
#include "TPDGCode.h"
48-
#include "TF1.h"
4948

5049
using namespace std;
5150
using namespace o2;
@@ -123,6 +122,7 @@ struct UccZdc {
123122
Configurable<std::string> paTH{"paTH", "Users/o/omvazque/TrackingEfficiency", "base path to the ccdb object"};
124123
Configurable<std::string> paTHmeanNch{"paTHmeanNch", "Users/o/omvazque/FitMeanNch_9May2025", "base path to the ccdb object"};
125124
Configurable<std::string> paTHsigmaNch{"paTHsigmaNch", "Users/o/omvazque/FitSigmaNch_9May2025", "base path to the ccdb object"};
125+
Configurable<int64_t> ccdbNoLaterThan{"ccdbNoLaterThan", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"};
126126

127127
enum EvCutLabel {
128128
All = 1,
@@ -278,6 +278,7 @@ struct UccZdc {
278278
registry.add("ZNDifVsNch", ";#it{N}_{ch} (|#eta|<0.8);ZNA-ZNC;", kTH2F, {{{nBinsNch, minNch, maxNch}, {100, -50., 50.}}});
279279
}
280280

281+
LOG(info) << "\tccdbNoLaterThan=" << ccdbNoLaterThan.value;
281282
LOG(info) << "\tapplyEff=" << applyEff.value;
282283
LOG(info) << "\tpaTH=" << paTH.value;
283284
LOG(info) << "\tuseMidRapNchSel=" << useMidRapNchSel.value;
@@ -291,8 +292,7 @@ struct UccZdc {
291292
ccdb->setFatalWhenNull(false);
292293
// Not later than now, will be replaced by the value of the train creation
293294
// This avoids that users can replace objects **while** a train is running
294-
int64_t now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
295-
ccdb->setCreatedNotAfter(now);
295+
ccdb->setCreatedNotAfter(ccdbNoLaterThan.value);
296296
}
297297

298298
template <typename CheckCol>

0 commit comments

Comments
 (0)