66 fLogicalVolumeOffset = fpLogicalVolumeSIM->GetOffset();
68 fPhysicalVolumeOffset = fpPhysicalVolumeSIM->GetOffset();
70 fReplicaOffset = fpReplicaSIM->GetOffset();
72 fRegionOffset = fpRegionSIM->GetOffset();
83 fpLogicalVolumeSIM->UseWorkArea(fLogicalVolumeOffset);
84 fpPhysicalVolumeSIM->UseWorkArea(fPhysicalVolumeOffset);
86 fpReplicaSIM->UseWorkArea(fReplicaOffset);
87 fpRegionSIM->UseWorkArea(fRegionOffset);
99 fpLogicalVolumeSIM->UseWorkArea(
nullptr);
100 fpPhysicalVolumeSIM->UseWorkArea(
nullptr);
102 fpReplicaSIM->UseWorkArea(
nullptr);
103 fpRegionSIM->UseWorkArea(
nullptr);
111 for (
auto physVol : *physVolStore)
118 auto g4PVReplica =
dynamic_cast<G4PVReplica*
>(physVol);
119 if (g4PVReplica ==
nullptr)
127 g4PVReplica->InitialiseWorker(g4PVReplica);
150 if( workerSolid !=
nullptr )
161 ed <<
"ERROR - Unable to initialise geometry for worker node." <<
"\n"
162 <<
"A solid lacks the Clone() method - or Clone() failed." <<
"\n"
164 <<
" Parameters: " << *solid;
165 G4Exception(
"G4GeometryWorkspace::CloneReplicaSolid()",
179 fpLogicalVolumeSIM->SlaveCopySubInstanceArray();
180 fpPhysicalVolumeSIM->SlaveCopySubInstanceArray();
181 fpReplicaSIM->SlaveCopySubInstanceArray();
182 fpRegionSIM->SlaveInitializeSubInstance();
192 for (
auto physVol : *physVolStore)
195 auto g4PVReplica =
dynamic_cast<G4PVReplica*
>(physVol);
196 if (g4PVReplica !=
nullptr)
198 g4PVReplica->TerminateWorker(g4PVReplica);
207 fpLogicalVolumeSIM->FreeSlave();
208 fpPhysicalVolumeSIM->FreeSlave();
209 fpReplicaSIM->FreeSlave();
210 fpRegionSIM->FreeSlave();
G4TemplateAutoLock< G4Mutex > G4AutoLock
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GeomSplitter< G4LVData > G4LVManager
G4GeomSplitter< G4ReplicaData > G4PVRManager
G4GeomSplitter< G4RegionData > G4RegionManager
#define G4MUTEX_INITIALIZER
G4GeomSplitter< G4PVData > G4PVManager
void InitialisePhysicalVolumes()
void InitialiseWorkspace()
G4bool CloneReplicaSolid(G4PVReplica *)
G4TWorkspacePool< G4GeometryWorkspace > pool_type
static pool_type * GetPool()
G4VSolid * GetSolid() const
void TerminateWorker(G4LogicalVolume *ptrMasterObject)
static const G4LVManager & GetSubInstanceManager()
void InitialiseWorker(G4LogicalVolume *ptrMasterObject, G4VSolid *pSolid, G4VSensitiveDetector *pSDetector)
G4VSolid * GetMasterSolid() const
static const G4PVRManager & GetSubInstanceManager()
static G4PhysicalVolumeStore * GetInstance()
static const G4RegionManager & GetSubInstanceManager()
G4LogicalVolume * GetLogicalVolume() const
static const G4PVManager & GetSubInstanceManager()
virtual G4VSolid * Clone() const
virtual G4GeometryType GetEntityType() const =0