#include <G4PhysicalVolumeStore.hh>
Definition at line 54 of file G4PhysicalVolumeStore.hh.
◆ ~G4PhysicalVolumeStore()
G4PhysicalVolumeStore::~G4PhysicalVolumeStore |
( |
| ) |
|
|
virtual |
◆ G4PhysicalVolumeStore() [1/2]
◆ G4PhysicalVolumeStore() [2/2]
G4PhysicalVolumeStore::G4PhysicalVolumeStore |
( |
| ) |
|
|
protected |
◆ Clean()
void G4PhysicalVolumeStore::Clean |
( |
| ) |
|
|
static |
Definition at line 76 of file G4PhysicalVolumeStore.cc.
77{
78
79
81 {
82 G4cout <<
"WARNING - Attempt to delete the physical volume store"
83 <<
" while geometry closed !" <<
G4endl;
84 return;
85 }
86
87
88
89
90
92
93 std::size_t i=0;
95
96#ifdef G4GEOMETRY_VOXELDEBUG
97 G4cout <<
"Deleting Physical Volumes ... ";
98#endif
99
100 for(
auto pos=store->cbegin();
pos!=store->cend(); ++
pos)
101 {
104 }
105
106#ifdef G4GEOMETRY_VOXELDEBUG
107 if (store->size() < i-1)
108 {
G4cout <<
"No volumes deleted. Already deleted by user ?" <<
G4endl; }
109 else
111#endif
112
115 store->clear();
116}
static const G4double pos
G4GLOB_DLL std::ostream G4cout
static G4bool IsGeometryClosed()
static G4PhysicalVolumeStore * GetInstance()
static G4ThreadLocal G4VStoreNotifier * fgNotifier
std::map< G4String, std::vector< G4VPhysicalVolume * > > bmap
static G4ThreadLocal G4bool locked
virtual void NotifyDeRegistration()=0
References bmap, fgNotifier, G4cout, G4endl, GetInstance(), G4GeometryManager::IsGeometryClosed(), locked, mvalid, G4VNotifier::NotifyDeRegistration(), and pos.
Referenced by ExN03DetectorConstruction::ConstructCalorimeter(), DetectorConstruction::ConstructVolumes(), G4RunManager::ReinitializeGeometry(), and ~G4PhysicalVolumeStore().
◆ DeRegister()
◆ GetInstance()
Definition at line 269 of file G4PhysicalVolumeStore.cc.
270{
273 {
275 }
277}
static G4PhysicalVolumeStore * fgInstance
References fgInstance.
Referenced by G4AdjointCrossSurfChecker::AddanExtSurfaceOfAvolume(), G4AdjointCrossSurfChecker::AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(), Clean(), G4AdjointPosOnPhysVolGenerator::ComputeTransformationFromPhysVolToWorld(), G4SPSPosDistribution::ConfineSourceToVolume(), ExN03DetectorConstruction::ConstructCalorimeter(), DetectorConstruction::ConstructVolumes(), G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume(), DeRegister(), G4GeometryWorkspace::DestroyWorkspace(), G4GlobalFastSimulationManager::DisplayRegion(), G4ScoringCylinder::DumpPhysVols(), G4EnergySplitter::GetPhantomParam(), G4GDMLReadStructure::GetPhysvol(), G4tgbGeometryDumper::GetPVChildren(), G4tgbGeometryDumper::GetTopPhysVol(), GetVolume(), G4GeometryWorkspace::InitialisePhysicalVolumes(), Register(), G4RunManager::ReinitializeGeometry(), G4VPhysicalVolume::SetName(), SetNotifier(), G4VViewer::SetTouchable(), G4ScoringRealWorld::SetupGeometry(), G4RegionStore::SetWorldVolume(), G4GDMLRead::StripNames(), UpdateMap(), and G4PhysicalVolumeModel::Validate().
◆ GetMap()
◆ GetVolume()
Definition at line 227 of file G4PhysicalVolumeStore.cc.
229{
234 {
235 if ((verbose) && (
pos->second.size()>1))
236 {
237 std::ostringstream message;
238 message << "There exists more than ONE physical volume in store named: "
240 << "Returning the first found.";
243 }
244 if(reverseSearch)
245 {
246 return pos->second[
pos->second.size()-1];
247 }
248 else
249 {
250 return pos->second[0];
251 }
252 }
253 if (verbose)
254 {
255 std::ostringstream message;
256 message <<
"Volume NOT found in store !" <<
G4endl
257 <<
" Volume " <<
name <<
" NOT found in store !" <<
G4endl
258 << " Returning NULL pointer.";
261 }
262 return nullptr;
263}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
const char * name(G4int ptype)
References bmap, G4endl, G4Exception(), GetInstance(), JustWarning, mvalid, G4InuclParticleNames::name(), pos, and UpdateMap().
Referenced by G4AdjointCrossSurfChecker::AddanExtSurfaceOfAvolume(), G4AdjointCrossSurfChecker::AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(), G4SPSPosDistribution::ConfineSourceToVolume(), and G4GDMLReadStructure::GetPhysvol().
◆ IsMapValid()
G4bool G4PhysicalVolumeStore::IsMapValid |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ Register()
◆ SetMapValid()
void G4PhysicalVolumeStore::SetMapValid |
( |
G4bool |
val | ) |
|
|
inline |
◆ SetNotifier()
◆ UpdateMap()
void G4PhysicalVolumeStore::UpdateMap |
( |
| ) |
|
◆ bmap
◆ fgInstance
◆ fgNotifier
◆ locked
◆ mvalid
G4bool G4PhysicalVolumeStore::mvalid = false |
|
private |
The documentation for this class was generated from the following files: