|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4RegionStore is a singleton class, acting as container for all geometrical regions, with functionality derived from std::vector<T>. All regions should be registered with G4RegionStore, and removed on their destruction. The underlying container initially has a capacity of 20. A map indexed by volume names is also recorded for fast search; pointers to regions with same name are stored in buckets. More...
#include <G4RegionStore.hh>
Public Member Functions | |
| virtual | ~G4RegionStore () |
| G4RegionStore (const G4RegionStore &)=delete | |
| G4RegionStore & | operator= (const G4RegionStore &)=delete |
| G4bool | IsModified () const |
| void | ResetRegionModified () |
| void | UpdateMaterialList (G4VPhysicalVolume *currentWorld=nullptr) |
| G4Region * | GetRegion (const G4String &name, G4bool verbose=true) const |
| G4bool | IsMapValid () const |
| void | SetMapValid (G4bool val) |
| const std::map< G4String, std::vector< G4Region * > > & | GetMap () const |
| void | UpdateMap () |
| G4Region * | FindOrCreateRegion (const G4String &name) |
| void | SetWorldVolume () |
Static Public Member Functions | |
| static void | Register (G4Region *pRegion) |
| static void | DeRegister (G4Region *pRegion) |
| static G4RegionStore * | GetInstance () |
| static void | SetNotifier (G4VStoreNotifier *pNotifier) |
| static void | Clean () |
Protected Member Functions | |
| G4RegionStore () | |
G4RegionStore is a singleton class, acting as container for all geometrical regions, with functionality derived from std::vector<T>. All regions should be registered with G4RegionStore, and removed on their destruction. The underlying container initially has a capacity of 20. A map indexed by volume names is also recorded for fast search; pointers to regions with same name are stored in buckets.
Definition at line 67 of file G4RegionStore.hh.
|
virtual |
Destructor: takes care to delete allocated regions.
Definition at line 68 of file G4RegionStore.cc.
|
delete |
Copy constructor and assignment operator not allowed.
Referenced by Clean(), DeRegister(), G4RegionStore(), GetInstance(), GetRegion(), operator=(), and Register().
|
protected |
Protected singleton constructor.
Definition at line 58 of file G4RegionStore.cc.
|
static |
Deletes all regions from the store, except for the world region.
Definition at line 78 of file G4RegionStore.cc.
Referenced by ~G4RegionStore().
|
static |
Removes the region 'pRegion' from the collection.
Definition at line 171 of file G4RegionStore.cc.
Referenced by G4Region::~G4Region().
Returns a pointer to a region through its name specification, if it exists. If it does not exist, it will allocate one, delegating ownership to the client.
Definition at line 303 of file G4RegionStore.cc.
|
static |
Returns a pointer to the unique instance of G4RegionStore, creating it if necessary.
Definition at line 212 of file G4RegionStore.cc.
Referenced by G4EmBiasingManager::ActivateForcedInteraction(), G4EmBiasingManager::ActivateSecondaryBiasing(), G4LowECapture::BuildPhysicsTable(), G4MicroElecCapture::BuildPhysicsTable(), G4RunManagerKernel::CheckRegions(), Clean(), G4CoherentPairProductionPhysics::ConstructProcess(), G4TheRayTracer::CreateBitMap(), G4EmExtraParameters::DefineRegParamForLoss(), DeRegister(), G4RunManagerKernel::DumpRegion(), G4RunManagerKernel::DumpRegion(), G4EmUtility::FillFluctFlags(), G4EmCalculator::FindCouple(), G4EmUtility::FindRegion(), G4ProductionCutsTable::G4ProductionCutsTable(), G4Region::G4Region(), G4Region::G4Region(), G4RunManagerKernel::G4RunManagerKernel(), G4VUserPhysicsList::GetCutValue(), GetRegion(), G4EmModelManager::Initialise(), G4PAIModel::Initialise(), G4PAIPhotModel::Initialise(), G4VAtomDeexcitation::InitialiseAtomicDeexcitation(), IsModified(), Register(), G4RunManager::ReinitializeGeometry(), ResetRegionModified(), G4VUserPhysicsList::SetCutValue(), G4VAtomDeexcitation::SetDeexcitationActiveRegion(), G4ScoringProbe::SetMaterial(), G4Region::SetName(), SetNotifier(), G4VUserPhysicsList::SetParticleCuts(), G4MaterialScanner::SetRegionName(), G4ScoringProbe::SetupGeometry(), SetWorldVolume(), G4GlobalFastSimulationManager::ShowSetup(), G4WorkerThread::UpdateGeometryAndPhysicsVectorFromMaster(), UpdateMap(), UpdateMaterialList(), G4RunManagerKernel::UpdateRegion(), and G4Region::~G4Region().
Returns a pointer to a region through its name specification. It uses the internal map for fast search and warns if a region in the collection is not unique or not found.
Definition at line 267 of file G4RegionStore.cc.
Referenced by G4EmBiasingManager::ActivateForcedInteraction(), G4EmBiasingManager::ActivateSecondaryBiasing(), G4LowECapture::BuildPhysicsTable(), G4CoherentPairProductionPhysics::ConstructProcess(), G4EmExtraParameters::DefineRegParamForLoss(), G4RunManagerKernel::DumpRegion(), G4EmUtility::FillFluctFlags(), FindOrCreateRegion(), G4EmUtility::FindRegion(), G4Region::G4Region(), G4RunManagerKernel::G4RunManagerKernel(), G4VUserPhysicsList::GetCutValue(), G4EmModelManager::Initialise(), G4VAtomDeexcitation::InitialiseAtomicDeexcitation(), G4VUserPhysicsList::SetCutValue(), G4ScoringProbe::SetMaterial(), G4VUserPhysicsList::SetParticleCuts(), G4MaterialScanner::SetRegionName(), and G4ScoringProbe::SetupGeometry().
|
inline |
Accessor and modifier to assess validity of the internal map.
Definition at line 135 of file G4RegionStore.hh.
| G4bool G4RegionStore::IsModified | ( | ) | const |
Loops through all regions to verify if a region has been modified.
Definition at line 227 of file G4RegionStore.cc.
|
delete |
|
static |
Adds the region 'pRegion' to the collection.
Definition at line 148 of file G4RegionStore.cc.
Referenced by G4Region::G4Region(), and G4Region::G4Region().
| void G4RegionStore::ResetRegionModified | ( | ) |
Loops through all regions to reset the flag for modification to false. Used by the run manager to notify that the physics table has been updated.
Definition at line 241 of file G4RegionStore.cc.
|
inline |
Definition at line 136 of file G4RegionStore.hh.
Referenced by G4Region::SetName().
|
static |
Assigns a notifier for allocation/deallocation of regions.
Definition at line 111 of file G4RegionStore.cc.
| void G4RegionStore::SetWorldVolume | ( | ) |
Sets a world volume pointer to a region that belongs to it. Scans over all world volumes. This method should be exclusively used by G4RunManagerKernel.
Definition at line 318 of file G4RegionStore.cc.
| void G4RegionStore::UpdateMap | ( | ) |
Brings contents of the internal map up to date and resets validity flag.
Definition at line 121 of file G4RegionStore.cc.
Referenced by GetRegion().
| void G4RegionStore::UpdateMaterialList | ( | G4VPhysicalVolume * | currentWorld = nullptr | ) |
Forces recomputation of the material lists in all regions in the store.
Definition at line 253 of file G4RegionStore.cc.
Referenced by G4TheRayTracer::CreateBitMap(), and G4RunManagerKernel::UpdateRegion().