Geometry parameters of Cryostat.
More...
#include <CryostatGeo.h>
|
|
| CryostatGeo () |
| | Default constructor.
|
| |
| void | initialize (const GearDir &content) |
| | Initialize from gearbox (xml file) More...
|
| |
| 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...
|
| |
| const std::string & | getParameterStr (const std::string &name) const |
| | Get string parameter. More...
|
| |
| const std::string & | getParameterStr (const std::string &name, const std::string &def) const |
| | Get string parameter with giving default value in case of non-existence. More...
|
| |
|
const std::map< std::string, double > & | getParameters () const |
| | Get map of all parameters.
|
| |
|
const std::map< std::string, std::string > & | getParametersStr () const |
| | Get map of all string parameters.
|
| |
| void | addParameter (const std::string &name, double val) |
| | Add parameter to map of parameters. More...
|
| |
| void | addParameter (const std::string &name, const std::string &val) |
| | Add string parameter to map of parameters. More...
|
| |
| void | addParameters (const GearDir &content, const std::string §ion) |
| | Add parameters from Gearbox. More...
|
| |
|
void | print () const |
| | Print all parameters.
|
| |
|
|
std::map< std::string, double > | m_params |
| | map of numeric parameters
|
| |
|
std::map< std::string, std::string > | m_strparams |
| | map of string parameters
|
| |
Geometry parameters of Cryostat.
Definition at line 23 of file CryostatGeo.h.
◆ addParameter() [1/2]
| void addParameter |
( |
const std::string & |
name, |
|
|
const std::string & |
val |
|
) |
| |
|
inlineinherited |
Add string parameter to map of parameters.
- Parameters
-
| name | parameter name |
| val | parameter value |
Definition at line 111 of file IRGeoBase.h.
◆ addParameter() [2/2]
| void addParameter |
( |
const std::string & |
name, |
|
|
double |
val |
|
) |
| |
|
inlineinherited |
Add parameter to map of parameters.
- Parameters
-
| name | parameter name |
| val | parameter value |
Definition at line 98 of file IRGeoBase.h.
◆ addParameters()
| void addParameters |
( |
const GearDir & |
content, |
|
|
const std::string & |
section |
|
) |
| |
|
inlineinherited |
Add parameters from Gearbox.
- Parameters
-
| content | gearbox folder |
| section | name of section of parameters to add |
Definition at line 124 of file IRGeoBase.h.
◆ getParameter() [1/2]
| double getParameter |
( |
const std::string & |
name | ) |
const |
|
inlineinherited |
Get parameter value.
- Parameters
-
Definition at line 41 of file IRGeoBase.h.
◆ getParameter() [2/2]
| double getParameter |
( |
const std::string & |
name, |
|
|
double |
def |
|
) |
| const |
|
inlineinherited |
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 IRGeoBase.h.
◆ getParameterStr() [1/2]
| const std::string& getParameterStr |
( |
const std::string & |
name | ) |
const |
|
inlineinherited |
Get string parameter.
- Parameters
-
Definition at line 64 of file IRGeoBase.h.
◆ getParameterStr() [2/2]
| const std::string& getParameterStr |
( |
const std::string & |
name, |
|
|
const std::string & |
def |
|
) |
| const |
|
inlineinherited |
Get string parameter with giving default value in case of non-existence.
- Parameters
-
| name | parameter name |
| def | default parameter value |
Definition at line 76 of file IRGeoBase.h.
◆ initialize()
| void initialize |
( |
const GearDir & |
content | ) |
|
Initialize from gearbox (xml file)
- Parameters
-
Definition at line 15 of file CryostatGeo.cc.
21 addParameter(
"LimitStepLength", content.getInt(
"LimitStepLength"));
23 std::vector<std::string> names = {
"CrossingAngle",
"TubeR",
"TubeR2",
"TubeL",
"A1spc1",
"A1spc2",
"B1spc1",
"B1spc2",
"D1spc1",
"E1spc1",
"C1wal1",
"F1wal1"};
25 for (
auto name : names) {
26 GearDir sect(content, name +
"/");
30 std::string straightSections;
31 for (
const GearDir& straight : content.getNodes(
"Straight")) {
32 std::string name = straight.getString(
"@name");
34 if (!straightSections.empty()) straightSections +=
" ";
35 straightSections += name;
40 for (
const GearDir& shield : content.getNodes(
"Shield")) {
41 std::string name = shield.getString(
"@name");
43 if (!shields.empty()) shields +=
" ";
49 for (
const GearDir& support : content.getNodes(
"Support")) {
50 std::string name = support.getString(
"@name");
52 if (!supports.empty()) supports +=
" ";
GearDir is the basic class used for accessing the parameter store.
void addParameters(const GearDir &content, const std::string §ion)
Add parameters from Gearbox.
void addParameter(const std::string &name, double val)
Add parameter to map of parameters.
The documentation for this class was generated from the following files: