Skip to content

Commit 6bac19d

Browse files
authored
Update eventSelection.cxx
1 parent fd0615b commit 6bac19d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Common/TableProducer/eventSelection.cxx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ struct BcSelectionTask {
8484
int mITSROFrameEndBorderMargin = 20; // default value
8585
int mTimeFrameStartBorderMargin = 300; // default value
8686
int mTimeFrameEndBorderMargin = 4000; // default value
87+
std::string strLPMProductionTag = ""; // MC production tag to be retrieved from AO2D metadata
88+
8789
TriggerAliases* aliases = nullptr;
8890
EventSelectionParams* par = nullptr;
8991
std::map<uint64_t, uint32_t>* mapRCT = nullptr;
@@ -99,6 +101,8 @@ struct BcSelectionTask {
99101
ccdb->setURL("http://alice-ccdb.cern.ch");
100102
ccdb->setCaching(true);
101103
ccdb->setLocalObjectValidityChecking();
104+
strLPMProductionTag = metadataInfo.get("LPMProductionTag"); // to extract info from ccdb by the tag
105+
102106
histos.add("hCounterInvalidBCTimestamp", "", kTH1D, {{1, 0., 1.}});
103107
}
104108

@@ -256,7 +260,7 @@ struct BcSelectionTask {
256260
// duration of TF in bcs
257261
nBCsPerTF = 32; // hard-coded for Run3 MC (no info from ccdb at the moment)
258262
} else {
259-
auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), run);
263+
auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), run, strLPMProductionTag);
260264
// SOR and EOR timestamps
261265
sorTimestamp = runInfo.sor;
262266
eorTimestamp = runInfo.eor;
@@ -511,10 +515,11 @@ struct EventSelectionTask {
511515
int lastRun = -1; // last run number (needed to access ccdb only if run!=lastRun)
512516
std::bitset<nBCsPerOrbit> bcPatternB; // bc pattern of colliding bunches
513517

514-
int64_t bcSOR = -1; // global bc of the start of the first orbit
515-
int64_t nBCsPerTF = -1; // duration of TF in bcs, should be 128*3564 or 32*3564
516-
int rofOffset = -1; // ITS ROF offset, in bc
517-
int rofLength = -1; // ITS ROF length, in bc
518+
int64_t bcSOR = -1; // global bc of the start of the first orbit
519+
int64_t nBCsPerTF = -1; // duration of TF in bcs, should be 128*3564 or 32*3564
520+
int rofOffset = -1; // ITS ROF offset, in bc
521+
int rofLength = -1; // ITS ROF length, in bc
522+
std::string strLPMProductionTag = ""; // MC production tag to be retrieved from AO2D metadata
518523

519524
int32_t findClosest(int64_t globalBC, std::map<int64_t, int32_t>& bcs)
520525
{
@@ -580,6 +585,7 @@ struct EventSelectionTask {
580585
}
581586
}
582587
}
588+
strLPMProductionTag = metadataInfo.get("LPMProductionTag"); // to extract info from ccdb by the tag
583589

584590
ccdb->setURL("http://alice-ccdb.cern.ch");
585591
ccdb->setCaching(true);
@@ -678,7 +684,7 @@ struct EventSelectionTask {
678684
int run3min = 500000;
679685
if (run != lastRun && run >= run3min) {
680686
lastRun = run;
681-
auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), run);
687+
auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), run, strLPMProductionTag);
682688
// first bc of the first orbit
683689
bcSOR = runInfo.orbitSOR * nBCsPerOrbit;
684690
// duration of TF in bcs

0 commit comments

Comments
 (0)