9#include <framework/gearbox/GearDir.h>
10#include <ir/dbobjects/FarBeamLineGeo.h>
21 addParameter(
"LimitStepLength", content.getInt(
"LimitStepLength"));
23 std::vector<std::string> names = {
"TubeR",
"TubeL"};
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;
39 std::string bendingSections;
40 for (
const GearDir& bend : content.getNodes(
"Bending")) {
41 std::string name = bend.getString(
"@name");
43 if (!bendingSections.empty()) bendingSections +=
" ";
44 bendingSections += name;
48 std::string collimators;
49 for (
const GearDir& coll : content.getNodes(
"Collimator")) {
50 std::string name = coll.getString(
"@name");
52 if (!collimators.empty()) collimators +=
" ";
58 for (
const GearDir& shield : content.getNodes(
"Shield")) {
59 std::string name = shield.getString(
"@name");
61 if (!shields.empty()) shields +=
" ";
void initialize(const GearDir &content)
Initialize from gearbox (xml files)
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.
Abstract base class for different kinds of events.