Skip to content

Commit dddeeb2

Browse files
Fixing issue in the CCDB call
1 parent 2a639a3 commit dddeeb2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

PWGDQ/TableProducer/tableMaker_withAssoc.cxx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -861,20 +861,15 @@ struct TableMaker {
861861
// Function to compute the mu for pileup estimation, taken from EM code
862862
double calculateMu(const auto& bc)
863863
{
864-
auto& ccdbMgr = o2::ccdb::BasicCCDBManager::instance();
865-
866864
uint64_t timeStamp = bc.timestamp();
867-
std::map<std::string, std::string> metadata;
868-
mLHCIFdata = ccdbMgr.getSpecific<o2::parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF", timeStamp, metadata);
869-
870865
auto bfilling = mLHCIFdata->getBunchFilling();
871866
double nbc = bfilling.getFilledBCs().size();
872867

873868
double tvxRate;
874869
if (fConfigHistOutput.fConfigIrEstimator.value.empty()) {
875-
tvxRate = mRateFetcher.fetch(&ccdbMgr, timeStamp, bc.runNumber(), "T0VTX");
870+
tvxRate = mRateFetcher.fetch(fCCDB.service, timeStamp, bc.runNumber(), "T0VTX");
876871
} else {
877-
tvxRate = mRateFetcher.fetch(&ccdbMgr, timeStamp, bc.runNumber(), fConfigHistOutput.fConfigIrEstimator.value);
872+
tvxRate = mRateFetcher.fetch(fCCDB.service, timeStamp, bc.runNumber(), fConfigHistOutput.fConfigIrEstimator.value);
878873
}
879874

880875
double nTriggersPerFilledBC = tvxRate / nbc / o2::constants::lhc::LHCRevFreq;
@@ -1700,6 +1695,9 @@ struct TableMaker {
17001695
} else {
17011696
VarManager::SetZShift(fConfigCCDB.fManualZShift.value);
17021697
}
1698+
if (fConfigHistOutput.fConfigFillBcStat) {
1699+
mLHCIFdata = fCCDB->getSpecific<o2::parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF", bcs.begin().timestamp());
1700+
}
17031701
if (fConfigVariousOptions.fPropMuon) {
17041702
VarManager::SetupMuonMagField();
17051703
}

0 commit comments

Comments
 (0)