From 8093ae35c49554fed909b7d36a0787a38b8b9ccb Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 8 Sep 2020 15:49:12 +0200 Subject: [PATCH] DPL: hide a few more headers --- .../Core/include/Framework/BoostOptionsRetriever.h | 12 ++++++++++-- .../include/Framework/ChannelConfigurationPolicy.h | 2 +- Framework/Core/include/Framework/runDataProcessing.h | 4 ---- Framework/Core/src/BoostOptionsRetriever.cxx | 9 +++++---- Framework/Core/src/DriverInfo.h | 2 ++ 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Framework/Core/include/Framework/BoostOptionsRetriever.h b/Framework/Core/include/Framework/BoostOptionsRetriever.h index 6d33627e8bdc2..148d5c4192b20 100644 --- a/Framework/Core/include/Framework/BoostOptionsRetriever.h +++ b/Framework/Core/include/Framework/BoostOptionsRetriever.h @@ -14,9 +14,17 @@ #include "Framework/ParamRetriever.h" #include -#include +#include #include +namespace boost +{ +namespace program_options +{ +class options_description; +} +} // namespace boost + namespace o2::framework { @@ -32,7 +40,7 @@ class BoostOptionsRetriever : public ParamRetriever boost::property_tree::ptree& provenance) override; private: - boost::program_options::options_description mDescription; + std::unique_ptr mDescription; int mArgc; char** mArgv; bool mIgnoreUnknown; diff --git a/Framework/Core/include/Framework/ChannelConfigurationPolicy.h b/Framework/Core/include/Framework/ChannelConfigurationPolicy.h index 29387ac05cc8e..0fa3be6f1dd86 100644 --- a/Framework/Core/include/Framework/ChannelConfigurationPolicy.h +++ b/Framework/Core/include/Framework/ChannelConfigurationPolicy.h @@ -12,8 +12,8 @@ #include "Framework/ChannelConfigurationPolicyHelpers.h" #include "Framework/ChannelSpec.h" -#include "Framework/DeviceSpec.h" +#include #include namespace o2 diff --git a/Framework/Core/include/Framework/runDataProcessing.h b/Framework/Core/include/Framework/runDataProcessing.h index d4807a782b646..3bed257a41fe4 100644 --- a/Framework/Core/include/Framework/runDataProcessing.h +++ b/Framework/Core/include/Framework/runDataProcessing.h @@ -13,7 +13,6 @@ #include "Framework/ChannelConfigurationPolicy.h" #include "Framework/CompletionPolicy.h" #include "Framework/DispatchPolicy.h" -#include "Framework/ConfigParamsHelper.h" #include "Framework/DataProcessorSpec.h" #include "Framework/WorkflowSpec.h" #include "Framework/ConfigContext.h" @@ -22,9 +21,6 @@ #include "Framework/CommonServices.h" #include "Framework/Logger.h" -#include -#include - #include #include #include diff --git a/Framework/Core/src/BoostOptionsRetriever.cxx b/Framework/Core/src/BoostOptionsRetriever.cxx index e3081aee4b143..892574e3eae11 100644 --- a/Framework/Core/src/BoostOptionsRetriever.cxx +++ b/Framework/Core/src/BoostOptionsRetriever.cxx @@ -14,6 +14,7 @@ #include "PropertyTreeHelpers.h" #include +#include #include #include @@ -28,7 +29,7 @@ namespace o2::framework BoostOptionsRetriever::BoostOptionsRetriever(bool ignoreUnknown, int argc, char** argv) - : mDescription{"ALICE O2 Framework - Available options"}, + : mDescription{std::make_unique("ALICE O2 Framework - Available options")}, mIgnoreUnknown{ignoreUnknown}, mArgc{argc}, mArgv{argv} @@ -39,7 +40,7 @@ void BoostOptionsRetriever::update(std::vector const& specs, boost::property_tree::ptree& store, boost::property_tree::ptree& provenance) { - auto options = mDescription.add_options(); + auto options = mDescription->add_options(); for (auto& spec : specs) { const char* name = spec.name.c_str(); const char* help = spec.help.c_str(); @@ -72,8 +73,8 @@ void BoostOptionsRetriever::update(std::vector const& specs, using namespace bpo::command_line_style; auto style = (allow_short | short_allow_adjacent | short_allow_next | allow_long | long_allow_adjacent | long_allow_next | allow_sticky | allow_dash_for_short); - auto parsed = mIgnoreUnknown ? bpo::command_line_parser(mArgc, mArgv).options(mDescription).style(style).allow_unregistered().run() - : bpo::parse_command_line(mArgc, mArgv, mDescription, style); + auto parsed = mIgnoreUnknown ? bpo::command_line_parser(mArgc, mArgv).options(*mDescription).style(style).allow_unregistered().run() + : bpo::parse_command_line(mArgc, mArgv, *mDescription, style); bpo::variables_map vmap; bpo::store(parsed, vmap); PropertyTreeHelpers::populate(specs, store, vmap, provenance); diff --git a/Framework/Core/src/DriverInfo.h b/Framework/Core/src/DriverInfo.h index 80907e71e9519..494e5604e6f90 100644 --- a/Framework/Core/src/DriverInfo.h +++ b/Framework/Core/src/DriverInfo.h @@ -20,6 +20,8 @@ #include "Framework/ChannelConfigurationPolicy.h" #include "Framework/ConfigParamSpec.h" #include "Framework/TerminationPolicy.h" +#include "Framework/CompletionPolicy.h" +#include "Framework/DispatchPolicy.h" #include "DataProcessorInfo.h" namespace o2::framework