Geometry parameters of Beamabort.
More...
#include <BeamabortGeo.h>
|
| BeamabortGeo () |
| Default constructor.
|
|
double | getParameter (const std::string &name) const |
| Get parameter value. More...
|
|
double | getParameter (const std::string &name, double def) const |
| Get parameter value with giving default value in case parameter doesn't exist in DB. More...
|
|
std::vector< double > | getParArray (const std::string &name) const |
| Get parameter value array. More...
|
|
std::vector< double > | getParArray (const std::string &name, std::vector< double > def) const |
| Get parameter value array with giving default array in case parameter doesn't exist in DB. More...
|
|
void | addParameter (const std::string &name, double val) |
| Add parameter to map of parameters. More...
|
|
void | addArray (const std::string &name, std::vector< double > arr) |
| Add parameter array to map of parameters. More...
|
|
const std::map< std::string, double > & | getParameters () const |
| Get map of all parameters.
|
|
const std::map< std::string, std::vector< double > > & | getParArrays () const |
| Get map of all parameter arrays.
|
|
void | print () const |
| Print all parameters.
|
|
void | initialize (const GearDir &content) |
| Initialze from the gearbox (xml file) More...
|
|
|
std::map< std::string, double > | m_params |
| map of numeric parameters
|
|
std::map< std::string, std::vector< double > > | m_par_arrays |
| map of numeric parameter arrays
|
|
Geometry parameters of Beamabort.
Definition at line 27 of file BeamabortGeo.h.
◆ addArray()
void addArray |
( |
const std::string & |
name, |
|
|
std::vector< double > |
arr |
|
) |
| |
|
inline |
Add parameter array to map of parameters.
- Parameters
-
name | parameter name |
arr | parameter array |
Definition at line 101 of file BeamabortGeo.h.
103 if (
m_par_arrays.insert(std::pair<std::string, std::vector<double>>(name, arr)).second)
return;
std::map< std::string, std::vector< double > > m_par_arrays
map of numeric parameter arrays
◆ addParameter()
void addParameter |
( |
const std::string & |
name, |
|
|
double |
val |
|
) |
| |
|
inline |
Add parameter to map of parameters.
- Parameters
-
name | parameter name |
val | parameter value |
Definition at line 88 of file BeamabortGeo.h.
◆ getParameter() [1/2]
double getParameter |
( |
const std::string & |
name | ) |
const |
|
inline |
◆ getParameter() [2/2]
double getParameter |
( |
const std::string & |
name, |
|
|
double |
def |
|
) |
| const |
|
inline |
Get parameter value with giving default value in case parameter doesn't exist in DB.
- Parameters
-
name | parameter name |
def | default parameter value |
Definition at line 53 of file BeamabortGeo.h.
◆ getParArray() [1/2]
std::vector<double> getParArray |
( |
const std::string & |
name | ) |
const |
|
inline |
Get parameter value array.
- Parameters
-
Definition at line 64 of file BeamabortGeo.h.
◆ getParArray() [2/2]
std::vector<double> getParArray |
( |
const std::string & |
name, |
|
|
std::vector< double > |
def |
|
) |
| const |
|
inline |
Get parameter value array with giving default array in case parameter doesn't exist in DB.
- Parameters
-
name | parameter name |
def | default parameter value |
Definition at line 76 of file BeamabortGeo.h.
◆ initialize()
void initialize |
( |
const GearDir & |
content | ) |
|
Initialze from the gearbox (xml file)
- Parameters
-
Definition at line 13 of file BeamabortGeo.cc.
19 addParameter(
"stepSize", content.getWithUnit(
"stepSize"));
20 addParameter(
"BeamBackgroundStudy", content.getInt(
"BeamBackgroundStudy"));
23 addArray(
"bar", content.getArray(
"bar"));
24 addParameter(
"WorkFunction", content.getDouble(
"WorkFunction"));
25 addParameter(
"FanoFactor", content.getDouble(
"FanoFactor"));
27 GearDir cActive(content,
"Active/");
29 addArray(
"Active.z", cActive.getArray(
"z"));
30 addArray(
"Active.r_dia", cActive.getArray(
"r_dia"));
31 addArray(
"Active.ThetaZ", cActive.getArray(
"ThetaZ"));
32 addArray(
"Active.Phi", cActive.getArray(
"Phi"));
33 addArray(
"Active.deltaX", cActive.getArray(
"deltaX"));
34 addArray(
"Active.addAngle", cActive.getArray(
"addAngle"));
void addParameter(const std::string &name, double val)
Add parameter to map of parameters.
void addArray(const std::string &name, std::vector< double > arr)
Add parameter array to map of parameters.
GearDir is the basic class used for accessing the parameter store.
The documentation for this class was generated from the following files: