11 #include <framework/gearbox/GearDir.h>
12 #include <ir/dbobjects/FarBeamLineGeo.h>
17 void FarBeamLineGeo::initialize(
const GearDir& content)
23 addParameter(
"LimitStepLength", content.getInt(
"LimitStepLength"));
25 std::vector<std::string> names = {
"TubeR",
"TubeL",
"GateShield",
"PolyShieldR",
"PolyShieldL",
"ConcreteShieldR",
"ConcreteShieldL"};
27 for (
auto name : names) {
28 GearDir sect(content, name +
"/");
29 addParameters(sect, name);
32 std::string straightSections;
33 for (
const GearDir& straight : content.getNodes(
"Straight")) {
34 std::string name = straight.getString(
"@name");
35 addParameters(straight, name);
36 if (!straightSections.empty()) straightSections +=
" ";
37 straightSections += name;
39 addParameter(
"Straight", straightSections);
41 std::string bendingSections;
42 for (
const GearDir& bend : content.getNodes(
"Bending")) {
43 std::string name = bend.getString(
"@name");
44 addParameters(bend, name);
45 if (!bendingSections.empty()) bendingSections +=
" ";
46 bendingSections += name;
48 addParameter(
"Bending", bendingSections);