hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
|
description More...
#include <ParameterSet.h>
Classes | |
struct | Element |
Backing data structure containing parameter values. More... | |
Public Types | |
enum | ElementType { et_NoType , et_Bool , et_Integer , et_Double , et_String , et_VInteger , et_VDouble , et_VString , et_ParameterSet } |
Public Member Functions | |
int | getInteger (const std::string &name) const |
Get an integer by name or throw an exception if not available, or not the right type. | |
int | getInteger (const std::string &name, int defaultValue) const |
Get an integer by name or use the given default if not available. | |
double | getDouble (const std::string &name) const |
Get a double by name or throw an exception if not available, or not the right type. | |
double | getDouble (const std::string &name, double defaultValue) const |
Get a double by name or use the given default if not available. | |
const std::string & | getString (const std::string &name) const |
const std::string & | getString (const std::string &name, const std::string &defaultValue) const |
Get a string by name or use the given default if not available. | |
const std::vector< int > & | getVInteger (const std::string &name) const |
Get a vector of integers by name or throw an exception if not available, or not the right type. | |
const std::vector< int > & | getVInteger (const std::string &name, const std::vector< int > &defaultValue) const |
Get a vector of integers by name or use the given default if not available. | |
const std::vector< double > & | getVDouble (const std::string &name) const |
Get a vector of doubles by name or throw an exception if not available, or not the right type. | |
const std::vector< double > & | getVDouble (const std::string &name, const std::vector< double > &defaultValue) const |
Get a vector of doubles by name or use the given default if not available. | |
const std::vector< std::string > & | getVString (const std::string &name) const |
Get a vector of strings by name or throw an exception if not available, or not the right type. | |
const std::vector< std::string > & | getVString (const std::string &name, const std::vector< std::string > &defaultValue) const |
Get a vector of strings by name or use the given default if not available. | |
void | insert (const std::string &name, int value) |
Add an integer to the ParameterSet. | |
void | insert (const std::string &name, double value) |
Add a double to the ParameterSet. | |
void | insert (const std::string &name, const std::string &value) |
Add a string to the ParameterSet. | |
void | insert (const std::string &name, const std::vector< int > &values) |
Add a vector of integers to the ParameterSet. | |
void | insert (const std::string &name, const std::vector< double > &values) |
Add a vector of doubles to the ParameterSet. | |
void | insert (const std::string &name, const std::vector< std::string > &values) |
Add a vector of strings to the ParameterSet. | |
Public Attributes | |
std::map< std::string, Element > | elements_ |
description
Definition at line 22 of file ParameterSet.h.
enum ElementType |
Enumerator | |
---|---|
et_NoType | |
et_Bool | |
et_Integer | |
et_Double | |
et_String | |
et_VInteger | |
et_VDouble | |
et_VString | |
et_ParameterSet |
Definition at line 178 of file ParameterSet.h.
double getDouble | ( | const std::string & | name | ) | const |
Get a double by name or throw an exception if not available, or not the right type.
name | Name of the double parameter. |
Definition at line 34 of file ParameterSet.cxx.
double getDouble | ( | const std::string & | name, |
double | defaultValue | ||
) | const |
Get a double by name or use the given default if not available.
If the wrong type, throw an exception.
name | Name of the double parameter. |
defaultValue | Default value to ue if the parameter was not provided. |
Definition at line 45 of file ParameterSet.cxx.
int getInteger | ( | const std::string & | name | ) | const |
Get an integer by name or throw an exception if not available, or not the right type.
name | Name of the integer. |
Definition at line 8 of file ParameterSet.cxx.
int getInteger | ( | const std::string & | name, |
int | defaultValue | ||
) | const |
Get an integer by name or use the given default if not available.
If the wrong type, throw an exception.
name | Name of the integer. |
defaultValue | Default value to use if the parameter was not provided. |
Definition at line 19 of file ParameterSet.cxx.
const std::string & getString | ( | const std::string & | name | ) | const |
Get a string by name or throw an exception if not available, or not the right type.
name | Name of the string parameter. |
Definition at line 60 of file ParameterSet.cxx.
const std::string & getString | ( | const std::string & | name, |
const std::string & | defaultValue | ||
) | const |
Get a string by name or use the given default if not available.
If the wrong type, throw an exception.
name | Name of the string parameter. |
defaultValue | Default value to ue if the parameter was not provided. |
Definition at line 71 of file ParameterSet.cxx.
const std::vector< double > & getVDouble | ( | const std::string & | name | ) | const |
Get a vector of doubles by name or throw an exception if not available, or not the right type.
name | Name of the vector of doubles. |
Definition at line 122 of file ParameterSet.cxx.
const std::vector< double > & getVDouble | ( | const std::string & | name, |
const std::vector< double > & | defaultValue | ||
) | const |
Get a vector of doubles by name or use the given default if not available.
If the wrong type, throw an exception.
name | Name of the vector of doubles. |
defaultValue | Default value to ue if the parameter was not provided. |
Definition at line 133 of file ParameterSet.cxx.
const std::vector< int > & getVInteger | ( | const std::string & | name | ) | const |
Get a vector of integers by name or throw an exception if not available, or not the right type.
name | Name of the vector of integers. |
Definition at line 91 of file ParameterSet.cxx.
const std::vector< int > & getVInteger | ( | const std::string & | name, |
const std::vector< int > & | defaultValue | ||
) | const |
Get a vector of integers by name or use the given default if not available.
If the wrong type, throw an exception.
name | Name of the vector of integers. |
defaultValue | Default value to ue if the parameter was not provided. |
Definition at line 102 of file ParameterSet.cxx.
const std::vector< std::string > & getVString | ( | const std::string & | name | ) | const |
Get a vector of strings by name or throw an exception if not available, or not the right type.
name | Name of the vector of strings. |
Definition at line 153 of file ParameterSet.cxx.
const std::vector< std::string > & getVString | ( | const std::string & | name, |
const std::vector< std::string > & | defaultValue | ||
) | const |
Get a vector of strings by name or use the given default if not available.
If the wrong type, throw an exception.
name | Name of the vector of strings. |
defaultValue | Default value to ue if the parameter was not provided. |
Definition at line 164 of file ParameterSet.cxx.
void insert | ( | const std::string & | name, |
const std::string & | value | ||
) |
Add a string to the ParameterSet.
name | Name of the string parameter. |
value | Value of the string parameter. |
Definition at line 56 of file ParameterSet.cxx.
void insert | ( | const std::string & | name, |
const std::vector< double > & | values | ||
) |
Add a vector of doubles to the ParameterSet.
name | Name of the double vector parameter. |
values | Values of the double vector parameter. |
Definition at line 118 of file ParameterSet.cxx.
void insert | ( | const std::string & | name, |
const std::vector< int > & | values | ||
) |
Add a vector of integers to the ParameterSet.
name | Name of the integer vector parameter. |
values | Values of the integer vector parameter. |
Definition at line 87 of file ParameterSet.cxx.
void insert | ( | const std::string & | name, |
const std::vector< std::string > & | values | ||
) |
Add a vector of strings to the ParameterSet.
name | Name of the string vector parameter. |
values | Values of the string vector parameter. |
Definition at line 149 of file ParameterSet.cxx.
void insert | ( | const std::string & | name, |
double | value | ||
) |
Add a double to the ParameterSet.
name | Name of the double parameter. |
value | Value of the double parameter. |
Definition at line 30 of file ParameterSet.cxx.
void insert | ( | const std::string & | name, |
int | value | ||
) |
Add an integer to the ParameterSet.
name | Name of the integer parameter. |
value | Value of the integer parameter. |
Definition at line 4 of file ParameterSet.cxx.
std::map<std::string, Element> elements_ |
Definition at line 225 of file ParameterSet.h.