Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4GeometryManager Class Reference

#include <G4GeometryManager.hh>

Public Member Functions

G4bool CloseGeometry (G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=nullptr)
 
void OpenGeometry (G4VPhysicalVolume *vol=nullptr)
 
void SetWorldMaximumExtent (G4double worldExtent)
 
 ~G4GeometryManager ()
 

Static Public Member Functions

static G4bool IsGeometryClosed ()
 
static G4GeometryManagerGetInstance ()
 
static G4GeometryManagerGetInstanceIfExist ()
 

Protected Member Functions

 G4GeometryManager ()=default
 

Detailed Description

Definition at line 52 of file G4GeometryManager.hh.

Constructor & Destructor Documentation

◆ ~G4GeometryManager()

G4GeometryManager::~G4GeometryManager ( )

Definition at line 66 of file G4GeometryManager.cc.

67{
68 fgInstance = nullptr;
69 fIsClosed = false;
70}

◆ G4GeometryManager()

G4GeometryManager::G4GeometryManager ( )
protecteddefault

Referenced by GetInstance().

Member Function Documentation

◆ CloseGeometry()

G4bool G4GeometryManager::CloseGeometry ( G4bool pOptimise = true,
G4bool verbose = false,
G4VPhysicalVolume * vol = nullptr )

Definition at line 79 of file G4GeometryManager.cc.

81{
82 if (!fIsClosed && G4Threading::IsMasterThread())
83 {
84 if (pVolume != nullptr)
85 {
86 BuildOptimisations(pOptimise, pVolume);
87 }
88 else
89 {
90 BuildOptimisations(pOptimise, verbose);
91 }
92 fIsClosed = true;
93 }
94 return true;
95}
G4bool IsMasterThread()

Referenced by G4TheRayTracer::CreateBitMap(), G4DNAChemistryManager::HandleStandaloneInitialization(), G4RunManagerKernel::ResetNavigator(), and G4TheRayTracer::StoreUserActions().

◆ GetInstance()

◆ GetInstanceIfExist()

G4GeometryManager * G4GeometryManager::GetInstanceIfExist ( )
static

Definition at line 146 of file G4GeometryManager.cc.

147{
148 return fgInstance;
149}

Referenced by G4RunManagerKernel::~G4RunManagerKernel().

◆ IsGeometryClosed()

G4bool G4GeometryManager::IsGeometryClosed ( )
static

◆ OpenGeometry()

void G4GeometryManager::OpenGeometry ( G4VPhysicalVolume * vol = nullptr)

Definition at line 103 of file G4GeometryManager.cc.

104{
105 if (fIsClosed && G4Threading::IsMasterThread())
106 {
107 if (pVolume != nullptr)
108 {
109 DeleteOptimisations(pVolume);
110 }
111 else
112 {
113 DeleteOptimisations();
114 }
115 fIsClosed = false;
116 }
117}

Referenced by G4ErrorPropagatorManager::CloseGeometry(), G4TheRayTracer::CreateBitMap(), G4DNAChemistryManager::HandleStandaloneInitialization(), G4RunManager::ReinitializeGeometry(), G4RunManagerKernel::ResetNavigator(), G4GDMLMessenger::SetNewValue(), G4TheRayTracer::StoreUserActions(), and G4RunManagerKernel::~G4RunManagerKernel().

◆ SetWorldMaximumExtent()

void G4GeometryManager::SetWorldMaximumExtent ( G4double worldExtent)

Definition at line 333 of file G4GeometryManager.cc.

334{
335 if (!G4SolidStore::GetInstance()->empty())
336 {
337 // Sanity check to assure that extent is fixed BEFORE creating
338 // any geometry object (solids in this case)
339 //
340 G4Exception("G4GeometryManager::SetMaximumExtent()",
341 "GeomMgt0003", FatalException,
342 "Extent can be set only BEFORE creating any geometry object!");
343 }
345}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void SetSurfaceTolerance(G4double worldExtent)
static G4GeometryTolerance * GetInstance()
static G4SolidStore * GetInstance()

The documentation for this class was generated from the following files: