Geant4 10.7.0
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 ()
 

Detailed Description

Definition at line 51 of file G4GeometryManager.hh.

Constructor & Destructor Documentation

◆ ~G4GeometryManager()

G4GeometryManager::~G4GeometryManager ( )

Definition at line 72 of file G4GeometryManager.cc.

73{
74 fgInstance = nullptr;
75 fIsClosed = false;
76}

◆ G4GeometryManager()

G4GeometryManager::G4GeometryManager ( )
protected

Definition at line 64 of file G4GeometryManager.cc.

65{
66}

Referenced by GetInstance().

Member Function Documentation

◆ CloseGeometry()

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

Definition at line 85 of file G4GeometryManager.cc.

87{
88 if (!fIsClosed)
89 {
90 if (pVolume != nullptr)
91 {
92 BuildOptimisations(pOptimise, pVolume);
93 }
94 else
95 {
96 BuildOptimisations(pOptimise, verbose);
97 }
98 fIsClosed = true;
99 }
100 return true;
101}

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

◆ GetInstance()

◆ GetInstanceIfExist()

G4GeometryManager * G4GeometryManager::GetInstanceIfExist ( )
static

Definition at line 152 of file G4GeometryManager.cc.

153{
154 return fgInstance;
155}

Referenced by G4RunManagerKernel::~G4RunManagerKernel().

◆ IsGeometryClosed()

G4bool G4GeometryManager::IsGeometryClosed ( )
static

◆ OpenGeometry()

void G4GeometryManager::OpenGeometry ( G4VPhysicalVolume vol = nullptr)

Definition at line 109 of file G4GeometryManager.cc.

110{
111 if (fIsClosed)
112 {
113 if (pVolume != nullptr)
114 {
115 DeleteOptimisations(pVolume);
116 }
117 else
118 {
119 DeleteOptimisations();
120 }
121 fIsClosed = false;
122 }
123}

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 339 of file G4GeometryManager.cc.

340{
341 if (G4SolidStore::GetInstance()->size())
342 {
343 // Sanity check to assure that extent is fixed BEFORE creating
344 // any geometry object (solids in this case)
345 //
346 G4Exception("G4GeometryManager::SetMaximumExtent()",
347 "GeomMgt0003", FatalException,
348 "Extent can be set only BEFORE creating any geometry object!");
349 }
351}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
void SetSurfaceTolerance(G4double worldExtent)
static G4GeometryTolerance * GetInstance()
static G4SolidStore * GetInstance()

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