9 #include <framework/gearbox/GearDir.h>
10 #include <ir/dbobjects/FarBeamLineGeo.h>
15 void FarBeamLineGeo::initialize(
const GearDir& content)
21 addParameter(
"LimitStepLength", content.getInt(
"LimitStepLength"));
23 std::vector<std::string> names = {
"TubeR",
"TubeL"};
25 for (
auto name : names) {
26 GearDir sect(content, name +
"/");
27 addParameters(sect, name);
30 std::string straightSections;
31 for (
const GearDir& straight : content.getNodes(
"Straight")) {
32 std::string name = straight.getString(
"@name");
33 addParameters(straight, name);
34 if (!straightSections.empty()) straightSections +=
" ";
35 straightSections += name;
37 addParameter(
"Straight", straightSections);
39 std::string bendingSections;
40 for (
const GearDir& bend : content.getNodes(
"Bending")) {
41 std::string name = bend.getString(
"@name");
42 addParameters(bend, name);
43 if (!bendingSections.empty()) bendingSections +=
" ";
44 bendingSections += name;
46 addParameter(
"Bending", bendingSections);
48 std::string collimators;
49 for (
const GearDir& coll : content.getNodes(
"Collimator")) {
50 std::string name = coll.getString(
"@name");
51 addParameters(coll, name);
52 if (!collimators.empty()) collimators +=
" ";
55 addParameter(
"Collimator", collimators);
58 for (
const GearDir& shield : content.getNodes(
"Shield")) {
59 std::string name = shield.getString(
"@name");
60 addParameters(shield, name);
61 if (!shields.empty()) shields +=
" ";
64 addParameter(
"Shield", shields);
GearDir is the basic class used for accessing the parameter store.
Abstract base class for different kinds of events.