ATLAS Offline Software
GeoModelExperiment.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //-------------------------------------------------------------------------------------------//
6 // //
7 // This class (GeoModelExperiment) is a stored manager of managers. It provides access to //
8 // the world physical volume and all of the managers; so, indirectly, all of the detector //
9 // specific top level physical volumes. //
10 // //
11 // Joe Boudreau October 2003 //
12 // //
13 //-------------------------------------------------------------------------------------------//
14 
15 #ifndef GEOMODELUTILITIES_GEOMODELEXPERIMENT_H
16 #define GEOMODELUTILITIES_GEOMODELEXPERIMENT_H
17 
20 
21 #include "GeoModelKernel/GeoPhysVol.h"
22 #ifndef BUILDVP1LIGHT
23  #include "AthenaKernel/CLASS_DEF.h"
24  #include "AthenaKernel/CondCont.h"
25 #endif
26 #include <set>
27 #include <string>
28 #include <vector>
29 
30 class GeoVDetectorManager;
31 
33 
34 public:
35 
36 
37  //-----------------------------Internal----------------------------------------------------//
38  // //
39  typedef const GeoVDetectorManager * value_type; //
40  //
41  class NameEquals{ //
42  public: //
43  //
44  NameEquals(const std::string & name); //
45  bool operator () (const value_type & m) const; //
46  //
47  private: //
48  //
49  std::string m_name; //
50  //
51  }; //
52  //
54  public: //
55  bool operator () (const value_type & a, const value_type & b) const; //
56  }; //
57  //
59  typedef std::set<value_type, order_type> collection_type; //
61  typedef collection_type::const_iterator const_iterator_type; //
62  //
63  //
65  // //
66  //-----------------------------------------------------------------------------------------//
67 
68 
69  // ---------------------------For you: ----------------------------------------------------//
70  // //
71  // Standard Constructor //
72  GeoModelExperiment(GeoPhysVol* physVol); //
73  // //
74  // Standard Destructor //
75  virtual ~GeoModelExperiment() = default; //
76  // //
77  // Return the World physical volume: //
78  GeoPhysVol *getPhysVol(); //
79  const GeoPhysVol *getPhysVol() const; //
80  //
81  // Print a list of all the managers:
82  std::vector<std::string> getListOfManagers() const;
83  // //
84  // Manage the managers: //
85  void addManager(const GeoVDetectorManager *); //
86  // //
87  // Access those managers: //
88  const GeoVDetectorManager *getManager(const std::string & name) const; //
89  ConstIterator beginManager() const; //
90  ConstIterator endManager() const; //
91  // Add temporary volumes created during Geo2G4 translation //
92  void addTmpVolume(PVConstLink volume); //
93  // //
94  //-----------------------------------------------------------------------------------------//
95 
96  private:
97 
98  GeoIntrusivePtr<GeoPhysVol> m_physVol{};
100  std::vector<PVConstLink> m_tmpVolumes;
101 
102 };
103 
104 #ifndef BUILDVP1LIGHT
105 //using the macros below we can assign an identifier (and a version)
106 //This is required and checked at compile time when you try to record/retrieve
109 #endif
110 
111 #endif // GEOMODELSVC_GEOMODELEXPERIMENT_H
112 
113 
114 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
GeoModelExperiment::getPhysVol
GeoPhysVol * getPhysVol()
Destructor.
Definition: GeoModelExperiment.cxx:21
CLASS_DEF
CLASS_DEF(GeoModelExperiment, 9875, 1)
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
CondCont.h
Hold mappings of ranges to condition objects.
GeoModelExperiment::order_type
LexigraphicalOrder order_type
Definition: GeoModelExperiment.h:58
GeoModelExperiment::NameEquals
Definition: GeoModelExperiment.h:41
GeoModelExperiment::collection_type
std::set< value_type, order_type > collection_type
Definition: GeoModelExperiment.h:59
GeoModelExperiment::ConstIterator
const_iterator_type ConstIterator
Definition: GeoModelExperiment.h:64
GeoModelExperiment::~GeoModelExperiment
virtual ~GeoModelExperiment()=default
GeoModelExperiment::value_type
const GeoVDetectorManager * value_type
Definition: GeoModelExperiment.h:39
GeoModelExperiment
Definition: GeoModelExperiment.h:32
GeoModelExperiment::getListOfManagers
std::vector< std::string > getListOfManagers() const
Definition: GeoModelExperiment.cxx:64
GeoModelExperiment::addTmpVolume
void addTmpVolume(PVConstLink volume)
Definition: GeoModelExperiment.cxx:84
GeoModelExperiment::NameEquals::m_name
std::string m_name
Definition: GeoModelExperiment.h:49
GeoPrimitives.h
GeoModelExperiment::LexigraphicalOrder
Definition: GeoModelExperiment.h:53
GeoModelExperiment::m_physVol
GeoIntrusivePtr< GeoPhysVol > m_physVol
Definition: GeoModelExperiment.h:98
GeoModelExperiment::m_managers
collection_type m_managers
Definition: GeoModelExperiment.h:99
GeoModelExperiment::getManager
const GeoVDetectorManager * getManager(const std::string &name) const
Definition: GeoModelExperiment.cxx:52
GeoModelExperiment::LexigraphicalOrder::operator()
bool operator()(const value_type &a, const value_type &b) const
Definition: GeoModelExperiment.cxx:80
GeoModelExperiment::m_tmpVolumes
std::vector< PVConstLink > m_tmpVolumes
Definition: GeoModelExperiment.h:100
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
GeoModelExperiment::iterator_type
collection_type::iterator iterator_type
Definition: GeoModelExperiment.h:60
GeoModelExperiment::beginManager
ConstIterator beginManager() const
Definition: GeoModelExperiment.cxx:32
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition: GeoModelExperiment.cxx:40
GeoModelExperiment::endManager
ConstIterator endManager() const
Definition: GeoModelExperiment.cxx:36
CONDCONT_MIXED_DEF
CONDCONT_MIXED_DEF(GeoModelExperiment, 67974987)
a
TList * a
Definition: liststreamerinfos.cxx:10
GeoModelExperiment::NameEquals::NameEquals
NameEquals(const std::string &name)
Definition: GeoModelExperiment.cxx:73
GeoModelExperiment::GeoModelExperiment
GeoModelExperiment(GeoPhysVol *physVol)
Constructor(s)
Definition: GeoModelExperiment.cxx:14
GeoModelExperiment::NameEquals::operator()
bool operator()(const value_type &m) const
Definition: GeoModelExperiment.cxx:76
CLASS_DEF.h
macros to associate a CLID to a type
GeoModelExperiment::const_iterator_type
collection_type::const_iterator const_iterator_type
Definition: GeoModelExperiment.h:61