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 
5 #include "G4VPhysicalVolume.hh"
6 
7 class DDG4Builder;
8 class DDCompactView;
9 
10 class DDDWorld {
11 
12 public:
14  SensitiveDetectorCatalog &, bool check=false);
15  ~DDDWorld();
16  static void SetAsWorld(G4VPhysicalVolume * pv);
17  static void WorkerSetAsWorld(G4VPhysicalVolume * pv);
18  const G4VPhysicalVolume * GetWorldVolume() const { return m_world; }
19 
20  // In order to share the world volume with the worker threads, we
21  // need a non-const pointer. Thread-safety is handled inside Geant4
22  // with TLS. Should we consider a friend declaration here in order
23  // to avoid misuse?
24  G4VPhysicalVolume *GetWorldVolumeForWorker() const { return m_world; }
25 
26 private:
27  G4VPhysicalVolume * m_world;
28 };
29 
30 #endif
const G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:18
static void SetAsWorld(G4VPhysicalVolume *pv)
Definition: DDDWorld.cc:31
type of data representation of DDCompactView
Definition: DDCompactView.h:76
~DDDWorld()
Definition: DDDWorld.cc:29
bool check(const std::string &)
G4VPhysicalVolume * m_world
Definition: DDDWorld.h:27
DDDWorld(const DDCompactView *, G4LogicalVolumeToDDLogicalPartMap &, SensitiveDetectorCatalog &, bool check=false)
Definition: DDDWorld.cc:13
G4VPhysicalVolume * GetWorldVolumeForWorker() const
Definition: DDDWorld.h:24
static void WorkerSetAsWorld(G4VPhysicalVolume *pv)
Definition: DDDWorld.cc:38