101 using LV2SDFM = std::map<G4LogicalVolume*, std::pair<G4VSensitiveDetector*, G4FieldManager*>>;
104 using R2FSM = std::map<G4Region*, std::pair<G4FastSimulationManager*, G4UserSteppingAction*>>;
108 for (
auto lv : *mLogVolStore) {
134 if (lv->GetMasterSensitiveDetector() !=
nullptr) {
135 sd = lv->GetSensitiveDetector();
137 if (lv->GetMasterFieldManager() !=
nullptr) {
138 fmgr = lv->GetFieldManager();
140 if (sd !=
nullptr || fmgr !=
nullptr) {
141 lvmap[lv] = std::make_pair(sd, fmgr);
145 for (
auto reg : *mRegStore) {
148 if (reg !=
nullptr || usa !=
nullptr) {
149 rgnmap[reg] = std::make_pair(fsm, usa);
170 for (
const auto& it : lvmap) {
182 for (
const auto& it3 : rgnmap) {
185 if (fsm !=
nullptr) reg->SetFastSimulationManager(fsm);
187 if (usa !=
nullptr) reg->SetRegionalSteppingAction(usa);
194 if (affinity == 0)
return;
203 "Cannot set thread affinity, affinity parameter larger than "
218 cpuindex = myidx +
static_cast<G4int>(myidx >=
offset);
222# if defined(G4MULTITHREADED)
231 "Cannot set thread affinity.");
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4ThreadLocal T * G4GeomSplitter< T >::offset
G4DummyThread::native_handle_type G4NativeThread
G4GLOB_DLL std::ostream G4cout
G4FieldManager is a manager (store) for a pointer to the Field subclass that describes the field of a...
G4GeometryWorkspace is a class managing the per-thread state of the geometry, spanning those which ha...
void InitialiseWorkspace()
static pool_type * GetPool()
G4LogicalVolumeStore is a singleton class, acting as container for all logical volumes,...
static G4LogicalVolumeStore * GetInstance()
G4LogicalVolume represents a leaf node or unpositioned subtree in the geometry hierarchy....
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
static pool_type * GetPool()
static pool_type * GetPool()
G4RegionStore is a singleton class, acting as container for all geometrical regions,...
static G4RegionStore * GetInstance()
G4Region defines a region or a group of regions in the detector geometry setup, sharing properties as...
G4SolidsWorkspace manages the per-thread state of thoese solids which have a per-thread state and dep...
void InitialiseWorkspace()
static pool_type * GetPool()
void CreateAndUseWorkspace()
void CleanUpAndDestroyAllWorkspaces()
G4int GetThreadId() const
static void BuildGeometryAndPhysicsVector()
static void UpdateGeometryAndPhysicsVectorFromMaster()
static void DestroyGeometryAndPhysicsVector()
void SetNumberThreads(G4int numnberThreads)
void SetPinAffinity(G4int aff) const
void SetThreadId(G4int threadId)
G4int GetNumberThreads() const
G4bool G4SetPinAffinity(G4int idx, G4NativeThread &at)
G4int G4GetNumberOfCores()