From ee61fcf571ee44663142e70205a2948fa00b7c3d Mon Sep 17 00:00:00 2001 From: jesgum Date: Tue, 10 Feb 2026 11:59:35 +0100 Subject: [PATCH 1/4] fix for when using ini file for a3 detector setup from ccdb --- ALICE3/Core/FastTracker.cxx | 20 ++++++++++++++++++- .../OTF/onTheFlyDetectorGeometryProvider.cxx | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ALICE3/Core/FastTracker.cxx b/ALICE3/Core/FastTracker.cxx index e20eb4b4227..1297690089a 100644 --- a/ALICE3/Core/FastTracker.cxx +++ b/ALICE3/Core/FastTracker.cxx @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -79,7 +80,24 @@ void GeometryContainer::init(o2::framework::InitContext& initContext) return; } LOG(info) << "Size of detector configuration: " << detectorConfiguration.size(); - for (const auto& configFile : detectorConfiguration) { + for (std::string& configFile : detectorConfiguration) { + if (configFile.rfind("ccdb:", 0) == 0) { + LOG(info) << "ccdb source detected from on-the-fly-detector-geometry-provider"; + const std::string ccdbPath = configFile.substr(5); // remove "ccdb:" prefix + const std::string outPath = "./.ALICE3/Configuration/"; + configFile = Form("%s/%s/snapshot.root", outPath.c_str(), ccdbPath.c_str()); + + int timeout = 600; // Wait max 10 minutes + while (!std::filesystem::exists(configFile) && --timeout > 0) { + std::this_thread::sleep_for(std::chrono::seconds(1)); + } + + if (!std::filesystem::exists(configFile)) { + LOG(fatal) << "Timed out waiting for geometry snapshot: " << configFile; + return; + } + } + LOG(info) << "Detector geometry configuration file used: " << configFile; addEntry(configFile); } diff --git a/ALICE3/TableProducer/OTF/onTheFlyDetectorGeometryProvider.cxx b/ALICE3/TableProducer/OTF/onTheFlyDetectorGeometryProvider.cxx index 27d0ab09ab4..8c45b973942 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyDetectorGeometryProvider.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyDetectorGeometryProvider.cxx @@ -50,7 +50,7 @@ struct OnTheFlyDetectorGeometryProvider { // If the filename starts with ccdb: then take the file from the ccdb if (configFile.rfind("ccdb:", 0) == 0) { std::string ccdbPath = configFile.substr(5); // remove "ccdb:" prefix - const std::string outPath = "/tmp/DetGeo/"; + const std::string outPath = "./.ALICE3/Configuration/"; configFile = Form("%s/%s/snapshot.root", outPath.c_str(), ccdbPath.c_str()); std::ifstream checkFile(configFile); // Check if file already exists if (!checkFile.is_open()) { // File does not exist, retrieve from CCDB @@ -64,6 +64,7 @@ struct OnTheFlyDetectorGeometryProvider { } detectorConfiguration.value[idx] = configFile; // Update the filename to the local file } + LOG(info) << "Adding " << configFile << "geometry container"; geometryContainer.addEntry(configFile); idx++; } From 8143e3910a06b50993c529b40246ec82fb61f48d Mon Sep 17 00:00:00 2001 From: jesgum Date: Tue, 10 Feb 2026 12:00:34 +0100 Subject: [PATCH 2/4] u --- ALICE3/Core/FastTracker.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/ALICE3/Core/FastTracker.cxx b/ALICE3/Core/FastTracker.cxx index 1297690089a..e03e1a9ddb0 100644 --- a/ALICE3/Core/FastTracker.cxx +++ b/ALICE3/Core/FastTracker.cxx @@ -24,6 +24,7 @@ #include #include +#include #include #include #include From 3da3720727e3846e782f18ddec3ba5baa82ff030 Mon Sep 17 00:00:00 2001 From: jesgum Date: Tue, 10 Feb 2026 12:01:05 +0100 Subject: [PATCH 3/4] u --- ALICE3/Core/FastTracker.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/ALICE3/Core/FastTracker.cxx b/ALICE3/Core/FastTracker.cxx index e03e1a9ddb0..ccc155b4d4f 100644 --- a/ALICE3/Core/FastTracker.cxx +++ b/ALICE3/Core/FastTracker.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include namespace o2 From 9765ce6b85dc1a84facd2114bb07bfe8644f34b5 Mon Sep 17 00:00:00 2001 From: jesgum Date: Tue, 10 Feb 2026 12:31:53 +0100 Subject: [PATCH 4/4] update --- ALICE3/Core/FastTracker.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ALICE3/Core/FastTracker.cxx b/ALICE3/Core/FastTracker.cxx index ccc155b4d4f..7d4de2a92d2 100644 --- a/ALICE3/Core/FastTracker.cxx +++ b/ALICE3/Core/FastTracker.cxx @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -90,11 +89,17 @@ void GeometryContainer::init(o2::framework::InitContext& initContext) configFile = Form("%s/%s/snapshot.root", outPath.c_str(), ccdbPath.c_str()); int timeout = 600; // Wait max 10 minutes - while (!std::filesystem::exists(configFile) && --timeout > 0) { + while (--timeout > 0) { + std::ifstream file(configFile); + if (file.good()) { + break; + } + std::this_thread::sleep_for(std::chrono::seconds(1)); } - if (!std::filesystem::exists(configFile)) { + std::ifstream checkFile(configFile); + if (!checkFile.good()) { LOG(fatal) << "Timed out waiting for geometry snapshot: " << configFile; return; }