|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef CONFIGURATIONSETTINGS_H_
6 #define CONFIGURATIONSETTINGS_H_
35 const std::string&
value(
const std::string&
key)
const;
76 const std::map<std::string, StringData>&
stringData()
const;
83 const std::vector<SelectionConfigurationData>
selections()
const;
94 const std::string& default_val =
"",
const std::vector<std::string> allowed_values = {});
bool feature(std::string const &name) const
test whether an (experimental) feature should be enabled
static ConfigurationSettings * m_instance
Singletons: Good or bad, you decide. // John says they are bad.
char data[hepevt_bytes_allocation_ATLAS]
const std::string & value(const std::string &key) const
The user wants to know the value for the specified key.
ConfigurationSettings operator=(const ConfigurationSettings &)
Here but not implemented, resulting in a happy compile error if you try and use them.
TopConfig A simple configuration that is NOT a singleton.
const std::map< std::string, StringData > & stringData() const
All the user input that is stored as strings.
void checkSettings()
Validate that configured options make sense.
void loadFromFile(const std::string &filename)
Read the settings from a text file given by.
ConfigurationSettings()
private constructor
ConfigurationSettings(const ConfigurationSettings &)
Here but not implemented, resulting in a happy compile error if you try and use them.
std::ostream & operator<<(std::ostream &os, const SelectionConfigurationData &data)
Some configuration data to setup the selections.
static ConfigurationSettings * get(bool reset=false)
Design patterns 101.
std::map< std::string, StringData > strings_
Hold the configuration data.
bool m_configured
True if the class has read the settings from a file or something.
void registerParameter(const std::string &name, const std::string &message, const std::string &default_val="", const std::vector< std::string > allowed_values={})
Add a variable to the configuration settings.
void retrieve(std::string const &key, bool &value) const
The user wants to know the boolean value for the specified key.
std::vector< SelectionConfigurationData > m_selections
Data used when configuring the selections.
constexpr std::enable_if_t< is_bitmask_v< E >, E & > reset(E &lhs, E rhs)
Convenience function to clear bits in a class enum bitmask.
bool configured() const
Have the configuration settings been read from a file?
Hold the configuration information for the whole run.
const std::vector< SelectionConfigurationData > selections() const
Get all the data needed to configure the selections.
std::vector< std::string > m_killedFeatures
Kill-switch for experimental features.