From ef3341b9f3524dc298c58b4fc43faa2b114f82a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 27 Jun 2025 16:06:00 +0200 Subject: [PATCH 1/3] Update TableHelper.h --- Common/Core/TableHelper.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Common/Core/TableHelper.h b/Common/Core/TableHelper.h index afb42c5669a..65f919a45aa 100644 --- a/Common/Core/TableHelper.h +++ b/Common/Core/TableHelper.h @@ -24,6 +24,9 @@ #include +namespace o2::common::core +{ + /// Function to print the table required in the full workflow /// @param initContext initContext of the init function void printTablesInWorkflow(o2::framework::InitContext& initContext); @@ -109,4 +112,11 @@ bool getTaskOptionValue(o2::framework::InitContext& initContext, const std::stri return getTaskOptionValue(initContext, taskName, configurable.name, configurable.value, verbose); } +} // namespace o2::common::core + +using o2::common::core::printTablesInWorkflow; +using o2::common::core::isTableRequiredInWorkflow; +using o2::common::core::enableFlagIfTableRequired; +using o2::common::core::getTaskOptionValue; + #endif // COMMON_CORE_TABLEHELPER_H_ From 8db8b1f749f7ea45fa91012786ba7585356f6232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 27 Jun 2025 16:06:43 +0200 Subject: [PATCH 2/3] Update TableHelper.cxx --- Common/Core/TableHelper.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Common/Core/TableHelper.cxx b/Common/Core/TableHelper.cxx index 4af58f00428..04745ffe694 100644 --- a/Common/Core/TableHelper.cxx +++ b/Common/Core/TableHelper.cxx @@ -17,14 +17,14 @@ #include "Common/Core/TableHelper.h" -#include - #include "Framework/InitContext.h" #include "Framework/RunningWorkflowInfo.h" +#include + /// Function to print the table required in the full workflow /// @param initContext initContext of the init function -void printTablesInWorkflow(o2::framework::InitContext& initContext) +void o2::common::core::printTablesInWorkflow(o2::framework::InitContext& initContext) { auto& workflows = initContext.services().get(); for (auto const& device : workflows.devices) { @@ -37,7 +37,7 @@ void printTablesInWorkflow(o2::framework::InitContext& initContext) /// Function to check if a table is required in a workflow /// @param initContext initContext of the init function /// @param table name of the table to check for -bool isTableRequiredInWorkflow(o2::framework::InitContext& initContext, const std::string& table) +bool o2::common::core::isTableRequiredInWorkflow(o2::framework::InitContext& initContext, const std::string& table) { LOG(debug) << "Checking if table " << table << " is needed"; bool tableNeeded = false; @@ -57,7 +57,7 @@ bool isTableRequiredInWorkflow(o2::framework::InitContext& initContext, const st /// @param initContext initContext of the init function /// @param table name of the table to check for /// @param flag bool value of flag to set, if the given value is true it will be kept, disregarding the table usage in the workflow. -void enableFlagIfTableRequired(o2::framework::InitContext& initContext, const std::string& table, bool& flag) +void o2::common::core::enableFlagIfTableRequired(o2::framework::InitContext& initContext, const std::string& table, bool& flag) { if (flag) { LOG(info) << "Table enabled: " + table; @@ -75,7 +75,7 @@ void enableFlagIfTableRequired(o2::framework::InitContext& initContext, const st /// @param initContext initContext of the init function /// @param table name of the table to check for /// @param flag int value of flag to set, only if initially set to -1. Initial values of 0 or 1 will be kept disregarding the table usage in the workflow. -void enableFlagIfTableRequired(o2::framework::InitContext& initContext, const std::string& table, int& flag) +void o2::common::core::enableFlagIfTableRequired(o2::framework::InitContext& initContext, const std::string& table, int& flag) { if (flag > 0) { flag = 1; From 8eaa81cd7215b2792cad2510be7ff2ff83cb04bd Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Fri, 27 Jun 2025 17:06:32 +0200 Subject: [PATCH 3/3] Please consider the following formatting changes to #11808 (#11809) --- Common/Core/TableHelper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Core/TableHelper.h b/Common/Core/TableHelper.h index 65f919a45aa..56d2264ed6c 100644 --- a/Common/Core/TableHelper.h +++ b/Common/Core/TableHelper.h @@ -114,9 +114,9 @@ bool getTaskOptionValue(o2::framework::InitContext& initContext, const std::stri } // namespace o2::common::core -using o2::common::core::printTablesInWorkflow; -using o2::common::core::isTableRequiredInWorkflow; using o2::common::core::enableFlagIfTableRequired; using o2::common::core::getTaskOptionValue; +using o2::common::core::isTableRequiredInWorkflow; +using o2::common::core::printTablesInWorkflow; #endif // COMMON_CORE_TABLEHELPER_H_