Belle II Software  release-08-01-10
BeamPipeGeo.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 <framework/gearbox/GearDir.h>
10 #include <ir/dbobjects/BeamPipeGeo.h>
11 
12 using namespace std;
13 using namespace Belle2;
14 
15 void BeamPipeGeo::initialize(const GearDir& content)
16 {
17  //------------------------------
18  // Get BeamPipe geometry parameters from the gearbox
19  //------------------------------
20 
21  GearDir cSafety(content, "Safety/");
22  addParameter("Safety.L1", cSafety.getLength("L1"));
23 
24  addParameter("LimitStepLength", content.getInt("LimitStepLength"));
25 
26  std::vector<std::string> names = {"Lv1SUS", "Lv2OutTi", "Lv2OutBe", "Lv2InBe", "Lv2Paraf", "Lv2Vacuum", "Lv3AuCoat", "Lv1TaFwd", "Lv2VacFwd", "Lv1TaBwd", "Lv2VacBwd", "Flange", "AreaTubeFwd", "Lv1TaLERUp", "Lv1SUSLERUp", "Lv2VacLERUp", "Lv1TaHERDwn", "Lv1SUSHERDwn", "Lv2VacHERDwn", "AreaTubeBwd", "Lv1TaHERUp", "Lv1SUSHERUp", "Lv2VacHERUp", "Lv1TaLERDwn", "Lv1SUSLERDwn", "Lv2VacLERDwn", "PXDMountFwd", "PXDMountBwd", "PXDMountFixtureFwd", "PXDMountFixtureBwd"};
27 
28 
29 
30  for (auto name : names) {
31  GearDir sect(content, name + "/");
32  addParameters(sect, name);
33  }
34 
35 }
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
double getLength(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard length unit.
Definition: Interface.h:259
Abstract base class for different kinds of events.