@@ -77,6 +77,7 @@ std::map<std::string, std::map<std::string, std::string>> GeometryEntry::parseTE
7777 return configMap;
7878}
7979
80+ bool GeometryContainer::mCleanLutWhenLoaded = true ;
8081void GeometryContainer::init (o2::framework::InitContext& initContext)
8182{
8283 std::vector<std::string> detectorConfiguration;
@@ -219,7 +220,7 @@ std::string GeometryEntry::accessFile(const std::string& path, const std::string
219220 LOG (info) << " --- CCDB source detected for detector geometry " << path;
220221 std::map<std::string, std::string> metadata;
221222 bool status = ccdb->getCCDBAccessor ().retrieveBlob (ccdbPath, downloadPath, metadata, 1 );
222- if (!status) {
223+ if (!status) {
223224 flock (lockFd, LOCK_UN);
224225 close (lockFd);
225226 LOG (fatal) << " --- Failed to retrieve geometry configuration from CCDB for path: " << ccdbPath;
@@ -251,10 +252,11 @@ std::string GeometryEntry::accessFile(const std::string& path, const std::string
251252 close (lockFd);
252253
253254 // If timeout is specified, schedule file deletion after timeout
254- if (timeoutSeconds > 0 ) {
255+ if (timeoutSeconds > 0 && GeometryContainer::cleanLutWhenLoaded ()) {
256+ LOG (info) << " --- Deleting geometry configuration file after timeout: " << localPath;
255257 std::thread deletionThread ([localPath, doneFile, timeoutSeconds]() {
258+ LOG (info) << " --- Operating deletion of geometry configuration file after timeout: " << localPath;
256259 std::this_thread::sleep_for (std::chrono::seconds (timeoutSeconds));
257- LOG (info) << " --- Deleting geometry configuration file after timeout: " << localPath;
258260 if (std::remove (localPath.c_str ()) == 0 ) {
259261 LOG (info) << " --- File deleted successfully: " << localPath;
260262 } else {
0 commit comments