From b7dcf6a6af02c9876627d6dec9b44df212dc4728 Mon Sep 17 00:00:00 2001 From: Ernst Hellbar Date: Fri, 9 Jan 2026 15:15:52 +0000 Subject: [PATCH 1/2] Event Display: remove return statements from handled filesystem exceptions --- EventVisualisation/Base/src/DirectoryLoader.cxx | 3 --- 1 file changed, 3 deletions(-) diff --git a/EventVisualisation/Base/src/DirectoryLoader.cxx b/EventVisualisation/Base/src/DirectoryLoader.cxx index f2f5a421c0ef9..50b3de61295a3 100644 --- a/EventVisualisation/Base/src/DirectoryLoader.cxx +++ b/EventVisualisation/Base/src/DirectoryLoader.cxx @@ -37,7 +37,6 @@ deque DirectoryLoader::load(const std::string& path, const std::string& } } catch (std::filesystem::filesystem_error const& ex) { LOGF(error, "filesystem problem during DirectoryLoader::load: %s", ex.what()); - return result; } // comparison with safety if marker not in the filename (-1+1 gives 0) std::sort(result.begin(), result.end(), @@ -62,7 +61,6 @@ bool DirectoryLoader::canCreateNextFile(const std::vector& paths, c } } catch (std::filesystem::filesystem_error const& ex) { LOGF(error, "filesystem problem during DirectoryLoader::canCreateNextFile: %s", ex.what()); - return false; } } @@ -103,7 +101,6 @@ deque DirectoryLoader::load(const std::vector& paths, const } } catch (std::filesystem::filesystem_error const& ex) { LOGF(error, "filesystem problem during DirectoryLoader::load: %s", ex.what()); - return result; } // comparison with safety if marker not in the filename (-1+1 gives 0) std::sort(result.begin(), result.end(), From e09958c3e57feeb7eb97b4a62c3e52f1cbe10854 Mon Sep 17 00:00:00 2001 From: Ernst Hellbar Date: Thu, 15 Jan 2026 15:17:28 +0100 Subject: [PATCH 2/2] Event Display: add OnlineMode and safety checks --- .../Base/src/DirectoryLoader.cxx | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/EventVisualisation/Base/src/DirectoryLoader.cxx b/EventVisualisation/Base/src/DirectoryLoader.cxx index 50b3de61295a3..e106eaf7ebb47 100644 --- a/EventVisualisation/Base/src/DirectoryLoader.cxx +++ b/EventVisualisation/Base/src/DirectoryLoader.cxx @@ -14,6 +14,8 @@ /// \author julian.myrcha@cern.ch #include "EventVisualisationBase/DirectoryLoader.h" +#include "Framework/DefaultsHelpers.h" +#include "Framework/DataTakingContext.h" #include #include #include @@ -65,10 +67,13 @@ bool DirectoryLoader::canCreateNextFile(const std::vector& paths, c } // comparison with safety if marker not in the filename (-1+1 gives 0) - std::ranges::sort(result.begin(), result.end(), - [marker](const std::string& a, const std::string& b) { - return a.substr(a.find_first_of(marker) + 1) > b.substr(b.find_first_of(marker) + 1); - }); + if (result.size() > 1) { + std::ranges::sort(result.begin(), result.end(), + [marker](const std::string& a, const std::string& b) { + return a.substr(a.find_first_of(marker) + 1) > b.substr(b.find_first_of(marker) + 1); + }); + } + unsigned long accumulatedSize = 0L; const std::regex delimiter{"_"}; for (auto const& file : result) { @@ -113,11 +118,15 @@ deque DirectoryLoader::load(const std::vector& paths, const std::vector DirectoryLoader::allFolders(const std::string& location) { - auto const pos = location.find_last_of('_'); std::vector folders; - folders.push_back(location.substr(0, pos) + "_PHYSICS"); - folders.push_back(location.substr(0, pos) + "_COSMICS"); - folders.push_back(location.substr(0, pos) + "_SYNTHETIC"); + if (o2::framework::DefaultsHelpers::deploymentMode() == o2::framework::DeploymentMode::OnlineDDS) { + auto const pos = location.find_last_of('_'); + folders.push_back(location.substr(0, pos) + "_PHYSICS"); + folders.push_back(location.substr(0, pos) + "_COSMICS"); + folders.push_back(location.substr(0, pos) + "_SYNTHETIC"); + } else { + folders.push_back(location); + } return folders; }