Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions 12 Framework/Core/include/Framework/BoostOptionsRetriever.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@
#include "Framework/ParamRetriever.h"

#include <boost/property_tree/ptree_fwd.hpp>
#include <boost/program_options/options_description.hpp>
#include <memory>
#include <vector>

namespace boost
{
namespace program_options
{
class options_description;
}
} // namespace boost

namespace o2::framework
{

Expand All @@ -32,7 +40,7 @@ class BoostOptionsRetriever : public ParamRetriever
boost::property_tree::ptree& provenance) override;

private:
boost::program_options::options_description mDescription;
std::unique_ptr<boost::program_options::options_description> mDescription;
int mArgc;
char** mArgv;
bool mIgnoreUnknown;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include "Framework/ChannelConfigurationPolicyHelpers.h"
#include "Framework/ChannelSpec.h"
#include "Framework/DeviceSpec.h"

#include <vector>
#include <functional>

namespace o2
Expand Down
4 changes: 0 additions & 4 deletions 4 Framework/Core/include/Framework/runDataProcessing.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -22,9 +21,6 @@
#include "Framework/CommonServices.h"
#include "Framework/Logger.h"

#include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp>

#include <unistd.h>
#include <vector>
#include <cstring>
Expand Down
9 changes: 5 additions & 4 deletions 9 Framework/Core/src/BoostOptionsRetriever.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "PropertyTreeHelpers.h"

#include <boost/program_options.hpp>
#include <boost/program_options/options_description.hpp>

#include <string>
#include <vector>
Expand All @@ -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<boost::program_options::options_description>("ALICE O2 Framework - Available options")},
mIgnoreUnknown{ignoreUnknown},
mArgc{argc},
mArgv{argv}
Expand All @@ -39,7 +40,7 @@ void BoostOptionsRetriever::update(std::vector<ConfigParamSpec> 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();
Expand Down Expand Up @@ -72,8 +73,8 @@ void BoostOptionsRetriever::update(std::vector<ConfigParamSpec> 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);
Expand Down
2 changes: 2 additions & 0 deletions 2 Framework/Core/src/DriverInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.