Project
Loading...
Searching...
No Matches
o2::framework::ConfigParamsHelper Struct Reference

#include <ConfigParamsHelper.h>

Static Public Member Functions

static void populateBoostProgramOptions (options_description &options, const std::vector< ConfigParamSpec > &specs, options_description vetos=options_description())
 
static bool dpl2BoostOptions (const std::vector< ConfigParamSpec > &spec, options_description &options, boost::program_options::options_description const &vetos=options_description())
 
static std::string defaultValueForHelp (std::string const &value)
 
static bool hasOption (const std::vector< ConfigParamSpec > &specs, const std::string &optName)
 Check if option is defined.
 
static void addOptionIfMissing (std::vector< ConfigParamSpec > &specs, const ConfigParamSpec &spec)
 
template<typename ContainerType >
static boost::program_options::options_description prepareOptionDescriptions (ContainerType const &workflow, std::vector< ConfigParamSpec > const &currentWorkflowOptions, options_description vetos=options_description(), std::string mode="full")
 populate boost program options for a complete workflow
 
template<VariantType V>
static void addConfigSpecOption (const ConfigParamSpec &spec, boost::program_options::options_description &options)
 

Static Public Attributes

static constexpr size_t MaxHelpDefaultLength = 40
 

Detailed Description

Definition at line 27 of file ConfigParamsHelper.h.

Member Function Documentation

◆ addConfigSpecOption()

template<VariantType V>
static void o2::framework::ConfigParamsHelper::addConfigSpecOption ( const ConfigParamSpec &  spec,
boost::program_options::options_description &  options 
)
inlinestatic

Definition at line 113 of file ConfigParamsHelper.h.

◆ addOptionIfMissing()

void o2::framework::ConfigParamsHelper::addOptionIfMissing ( std::vector< ConfigParamSpec > &  specs,
const ConfigParamSpec &  spec 
)
static

Add the ConfigParamSpec spec to specs if there is no parameter with the same name already.

Definition at line 150 of file ConfigParamsHelper.cxx.

◆ defaultValueForHelp()

std::string o2::framework::ConfigParamsHelper::defaultValueForHelp ( std::string const &  value)
static

Text to show in the help for the default value: values longer than MaxHelpDefaultLength are reduced to their beginning and end, separated by "..."

Definition at line 124 of file ConfigParamsHelper.cxx.

◆ dpl2BoostOptions()

bool o2::framework::ConfigParamsHelper::dpl2BoostOptions ( const std::vector< ConfigParamSpec > &  spec,
options_description &  options,
boost::program_options::options_description const &  vetos = options_description() 
)
static

populate boost program options making all options of type string this is used for filtering the command line argument all options which are found in the vetos are skipped

populate boost program options making all options of type string this is used for filtering the command line argument

Definition at line 159 of file ConfigParamsHelper.cxx.

◆ hasOption()

bool o2::framework::ConfigParamsHelper::hasOption ( const std::vector< ConfigParamSpec > &  specs,
const std::string &  optName 
)
static

Check if option is defined.

Definition at line 138 of file ConfigParamsHelper.cxx.

◆ populateBoostProgramOptions()

void o2::framework::ConfigParamsHelper::populateBoostProgramOptions ( options_description &  options,
const std::vector< ConfigParamSpec > &  specs,
options_description  vetos = options_description() 
)
static

this creates the boost program options description from the ConfigParamSpec taking the VariantType into account

Definition at line 27 of file ConfigParamsHelper.cxx.

◆ prepareOptionDescriptions()

template<typename ContainerType >
static boost::program_options::options_description o2::framework::ConfigParamsHelper::prepareOptionDescriptions ( ContainerType const &  workflow,
std::vector< ConfigParamSpec > const &  currentWorkflowOptions,
options_description  vetos = options_description(),
std::string  mode = "full" 
)
inlinestatic

populate boost program options for a complete workflow

Definition at line 58 of file ConfigParamsHelper.h.

Member Data Documentation

◆ MaxHelpDefaultLength

constexpr size_t o2::framework::ConfigParamsHelper::MaxHelpDefaultLength = 40
staticconstexpr

Maximum length of a default value shown in the help, so that an option and its description fit into a typical terminal line

Definition at line 42 of file ConfigParamsHelper.h.


The documentation for this struct was generated from the following files: