@@ -251,41 +251,14 @@ void FastTracker::AddTPC(float phiResMean, float zResMean)
251251 }
252252}
253253
254- std::map<std::string, std::map<std::string, std::string>> FastTracker::parseTEnvConfiguration (std::string filename )
254+ void FastTracker::AddGenericDetector ( std::map<std::string, std::map<std::string, std::string>> configMap, o2::ccdb::BasicCCDBManager* ccdbManager )
255255{
256- return GeometryContainer::parseTEnvConfiguration (filename);
257- }
258-
259- void FastTracker::AddGenericDetector (std::string filename, o2::ccdb::BasicCCDBManager* ccdbManager)
260- {
261- LOG (info) << " Adding generic detector from file " << filename;
262- // If the filename starts with ccdb: then take the file from the ccdb
263- if (filename.rfind (" ccdb:" , 0 ) == 0 ) {
264- std::string ccdbPath = filename.substr (5 ); // remove "ccdb:" prefix
265- if (ccdbManager == nullptr ) {
266- LOG (fatal) << " CCDB manager is null, cannot retrieve file " << ccdbPath;
267- return ;
268- }
269- const std::string outPath = " /tmp/DetGeo/" ;
270- filename = Form (" %s/%s/snapshot.root" , outPath.c_str (), ccdbPath.c_str ());
271- std::ifstream checkFile (filename); // Check if file already exists
272- if (!checkFile.is_open ()) { // File does not exist, retrieve from CCDB
273- LOG (info) << " --- CCDB source detected for detector geometry " << filename;
274- std::map<std::string, std::string> metadata;
275- ccdbManager->getCCDBAccessor ().retrieveBlob (ccdbPath, outPath, metadata, 1 );
276- // Add CCDB handling logic here if needed
277- LOG (info) << " --- Now retrieving geometry configuration from CCDB to: " << filename;
278- } else { // File exists, proceed to load
279- LOG (info) << " --- Geometry configuration file already exists: " << filename << " . Skipping download." ;
280- checkFile.close ();
281- }
282- AddGenericDetector (filename, nullptr );
283- return ;
284- }
285-
286- std::map<std::string, std::map<std::string, std::string>> configMap = parseTEnvConfiguration (filename);
287256 // Layers
288257 for (const auto & layer : configMap) {
258+ if (layer.first .find (" global" ) != std::string::npos) { // Layers with global tag are skipped
259+ LOG (info) << " Skipping global configuration entry " << layer.first ;
260+ continue ;
261+ }
289262 LOG (info) << " Reading layer " << layer.first ;
290263 const float r = std::stof (layer.second .at (" r" ));
291264 LOG (info) << " Layer " << layer.first << " has radius " << r;
0 commit comments