CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDDWorld.h
Go to the documentation of this file.
1 #ifndef SimG4Core_DDDWorld_h
2 #define SimG4Core_DDDWorld_h
3 
4 #include "G4VPhysicalVolume.hh"
6 
7 class DDG4Builder;
8 class DDCompactView;
9 
10 class DDDWorld {
11 public:
13  ~DDDWorld();
14  static void SetAsWorld(G4VPhysicalVolume *pv);
15  static void WorkerSetAsWorld(G4VPhysicalVolume *pv);
16  const G4VPhysicalVolume *GetWorldVolume() const { return m_world; }
17 
18  // In order to share the world volume with the worker threads, we
19  // need a non-const pointer. Thread-safety is handled inside Geant4
20  // with TLS. Should we consider a friend declaration here in order
21  // to avoid misuse?
22  G4VPhysicalVolume *GetWorldVolumeForWorker() const { return m_world; }
23 
24 private:
25  G4VPhysicalVolume *m_world;
26 };
27 
28 #endif
const G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:16
static void SetAsWorld(G4VPhysicalVolume *pv)
Definition: DDDWorld.cc:30
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
~DDDWorld()
Definition: DDDWorld.cc:28
def pv(vc)
Definition: MetAnalyzer.py:7
G4VPhysicalVolume * m_world
Definition: DDDWorld.h:25
DDDWorld(const DDCompactView *, G4LogicalVolumeToDDLogicalPartMap &, SensitiveDetectorCatalog &, bool check=false)
Definition: DDDWorld.cc:13
G4VPhysicalVolume * GetWorldVolumeForWorker() const
Definition: DDDWorld.h:22
static void WorkerSetAsWorld(G4VPhysicalVolume *pv)
Definition: DDDWorld.cc:39
def check(config)
Definition: trackerTree.py:14