Skip to content

Commit 8d72906

Browse files
authored
[PWGDQ] Add loading of geometry to dilepton-track task (#11478)
1 parent df7102f commit 8d72906

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

PWGDQ/Tasks/tableReader_withAssoc.cxx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,6 +2903,10 @@ struct AnalysisDileptonTrack {
29032903
Configurable<std::string> fConfigGRPmagPath{"cfgGrpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
29042904
Configurable<float> fConfigMagField{"cfgMagField", 5.0f, "Manually set magnetic field"};
29052905

2906+
Configurable<string> fConfigCcdbUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
2907+
Configurable<int64_t> fConfigNoLaterThan{"ccdb-no-later-than", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"};
2908+
Configurable<std::string> fConfigGeoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
2909+
29062910
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
29072911
int fNCuts; // number of dilepton leg cuts
29082912
int fNLegCuts;
@@ -3152,6 +3156,16 @@ struct AnalysisDileptonTrack {
31523156

31533157
VarManager::SetUseVars(fHistMan->GetUsedVars());
31543158
fOutputList.setObject(fHistMan->GetMainHistogramList());
3159+
3160+
fCCDB->setURL(fConfigCcdbUrl.value);
3161+
fCCDB->setCaching(true);
3162+
fCCDB->setLocalObjectValidityChecking();
3163+
fCCDB->setCreatedNotAfter(fConfigNoLaterThan.value);
3164+
if (!o2::base::GeometryManager::isGeometryLoaded()) {
3165+
LOG(info) << "Loading geometry from CCDB in dilepton-track task";
3166+
fCCDB->get<TGeoManager>(fConfigGeoPath);
3167+
}
3168+
31553169
LOG(info) << "Initialization of AnalysisDileptonTrack finished (idstoreh)";
31563170
}
31573171

0 commit comments

Comments
 (0)