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; diff --git a/Common/Core/TableHelper.h b/Common/Core/TableHelper.h index afb42c5669a..56d2264ed6c 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::enableFlagIfTableRequired; +using o2::common::core::getTaskOptionValue; +using o2::common::core::isTableRequiredInWorkflow; +using o2::common::core::printTablesInWorkflow; + #endif // COMMON_CORE_TABLEHELPER_H_