Skip to content

Commit 86860c8

Browse files
authored
[ALICE3] Make geometry provider not interfere other instances (#14713)
1 parent 9dcddba commit 86860c8

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

ALICE3/Core/DelphesO2TrackSmearer.cxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ bool TrackSmearer::loadTable(int pdg, const char* filename, bool forceReload)
6464
if (strncmp(filename, "ccdb:", 5) == 0) { // Check if filename starts with "ccdb:"
6565
LOG(info) << " --- LUT file source identified as CCDB.";
6666
std::string path = std::string(filename).substr(5); // Remove "ccdb:" prefix
67-
const std::string outPath = "/tmp/LUTs/";
68-
filename = Form("%s/%s/snapshot.root", outPath.c_str(), path.c_str());
67+
filename = Form("%s/%s/snapshot.root", mOutPath.c_str(), path.c_str());
6968
LOG(info) << " --- Local LUT filename will be: " << filename;
7069
std::ifstream checkFile(filename); // Check if file already exists
7170
if (!checkFile.is_open()) { // File does not exist, retrieve from CCDB
@@ -74,7 +73,7 @@ bool TrackSmearer::loadTable(int pdg, const char* filename, bool forceReload)
7473
LOG(fatal) << " --- CCDB manager not set. Please set it before loading LUT from CCDB.";
7574
}
7675
std::map<std::string, std::string> metadata;
77-
mCcdbManager->getCCDBAccessor().retrieveBlob(path, outPath, metadata, 1);
76+
mCcdbManager->getCCDBAccessor().retrieveBlob(path, mOutPath, metadata, 1);
7877
// Add CCDB handling logic here if needed
7978
LOG(info) << " --- Now retrieving LUT file from CCDB to: " << filename;
8079
if (mCleanupDownloadedFile) { // Clean up the downloaded file if needed

ALICE3/Core/DelphesO2TrackSmearer.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <fstream>
3434
#include <iostream>
3535
#include <map>
36+
#include <string>
3637

3738
///////////////////////////////
3839
/// DelphesO2/src/lutCovm.hh //
@@ -248,9 +249,10 @@ class TrackSmearer
248249
return "pion"; // Default: pion
249250
}
250251
}
251-
void setdNdEta(float val) { mdNdEta = val; } //;
252-
void setCcdbManager(o2::ccdb::BasicCCDBManager* mgr) { mCcdbManager = mgr; } //;
253-
void setCleanupDownloadedFile(bool val) { mCleanupDownloadedFile = val; } //;
252+
void setdNdEta(float val) { mdNdEta = val; } //;
253+
void setCcdbManager(o2::ccdb::BasicCCDBManager* mgr) { mCcdbManager = mgr; } //;
254+
void setCleanupDownloadedFile(bool val) { mCleanupDownloadedFile = val; } //;
255+
void setDownloadPath(const std::string& path) { mOutPath = "/tmp/LUTs/" + path; } //;
254256

255257
protected:
256258
static constexpr unsigned int nLUTs = 9; // Number of LUT available
@@ -265,6 +267,7 @@ class TrackSmearer
265267
private:
266268
o2::ccdb::BasicCCDBManager* mCcdbManager = nullptr;
267269
bool mCleanupDownloadedFile = true;
270+
std::string mOutPath = "/tmp/LUTs/";
268271
};
269272

270273
} // namespace delphes

ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ struct OnTheFlyRichPid {
301301
mSmearer.emplace_back(std::make_unique<o2::delphes::DelphesO2TrackSmearer>());
302302
mSmearer[icfg]->setCleanupDownloadedFile(cleanLutWhenLoaded.value);
303303
mSmearer[icfg]->setCcdbManager(ccdb.operator->());
304+
mSmearer[icfg]->setDownloadPath("RICHPID");
304305
std::map<std::string, std::string> globalConfiguration = mGeoContainer.getConfiguration(icfg, "global");
305306
for (const auto& entry : globalConfiguration) {
306307
int pdg = 0;

ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ struct OnTheFlyTofPid {
160160
mSmearer.emplace_back(std::make_unique<o2::delphes::DelphesO2TrackSmearer>());
161161
mSmearer[icfg]->setCleanupDownloadedFile(cleanLutWhenLoaded.value);
162162
mSmearer[icfg]->setCcdbManager(ccdb.operator->());
163+
mSmearer[icfg]->setDownloadPath("TOFPID");
163164
std::map<std::string, std::string> globalConfiguration = mGeoContainer.getConfiguration(icfg, "global");
164165
for (const auto& entry : globalConfiguration) {
165166
int pdg = 0;

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ struct OnTheFlyTracker {
320320
mSmearer.emplace_back(std::make_unique<o2::delphes::DelphesO2TrackSmearer>());
321321
mSmearer[icfg]->setCleanupDownloadedFile(cleanLutWhenLoaded.value);
322322
mSmearer[icfg]->setCcdbManager(ccdb.operator->());
323+
mSmearer[icfg]->setDownloadPath("Tracker");
323324
std::map<std::string, std::string> globalConfiguration = mGeoContainer.getConfiguration(icfg, "global");
324325
if (enablePrimarySmearing) {
325326
// load LUTs for primaries

0 commit comments

Comments
 (0)