Belle II Software  release-05-01-25
CryostatGeo.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <framework/gearbox/GearDir.h>
12 #include <ir/dbobjects/CryostatGeo.h>
13 
14 using namespace std;
15 using namespace Belle2;
16 
17 void CryostatGeo::initialize(const GearDir& content)
18 {
19  //------------------------------
20  // Get Cryostat geometry parameters from the gearbox
21  //------------------------------
22 
23  addParameter("LimitStepLength", content.getInt("LimitStepLength"));
24 
25  std::vector<std::string> names = {"TubeR", "TubeR2", "TubeL", "A1spc1", "A1spc2", "B1spc1", "B1spc2", "D1spc1", "E1spc1", "C1wal1", "F1wal1"};
26 
27  for (auto name : names) {
28  GearDir sect(content, name + "/");
29  addParameters(sect, name);
30  }
31 
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;
38  }
39  addParameter("Straight", straightSections);
40 }
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::GearDir
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:41