Belle II Software development
BeamabortGeo.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <beast/beamabort/dbobjects/BeamabortGeo.h>
10
11using namespace Belle2;
12
14{
15 //------------------------------
16 // Get BEAMABORT geometry parameters from the gearbox
17 //------------------------------
18
19 addParameter("stepSize", content.getWithUnit("stepSize"));
20 addParameter("BeamBackgroundStudy", content.getInt("BeamBackgroundStudy"));
21 addParameter("divisions", content.getInt("divisions"));
22 addParameter("foo", content.getBool("foo"));
23 addArray("bar", content.getArray("bar"));
24 addParameter("WorkFunction", content.getDouble("WorkFunction"));
25 addParameter("FanoFactor", content.getDouble("FanoFactor"));
26
27 GearDir cActive(content, "Active/");
28 addParameter("Active.phase", cActive.getInt("phase"));
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"));
35}
void addParameter(const std::string &name, double val)
Add parameter to map of parameters.
Definition: BeamabortGeo.h:88
void addArray(const std::string &name, std::vector< double > arr)
Add parameter array to map of parameters.
Definition: BeamabortGeo.h:101
void initialize(const GearDir &content)
Initialze from the gearbox (xml file)
Definition: BeamabortGeo.cc:13
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
std::vector< double > getArray(const std::string &path) const noexcept(false)
Get the parameter path as a list of double values converted to the standard unit.
Definition: Interface.cc:123
int getInt(const std::string &path="") const noexcept(false)
Get the parameter path as a int.
Definition: Interface.cc:60
Abstract base class for different kinds of events.