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) {
194 if (affinity == 0)
return;
199 G4int offset = affinity;
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)
G4DummyThread::native_handle_type G4NativeThread
G4GLOB_DLL std::ostream G4cout
void InitialiseWorkspace()
static pool_type * GetPool()
static G4LogicalVolumeStore * GetInstance()
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
static pool_type * GetPool()
static pool_type * GetPool()
static G4RegionStore * GetInstance()
void SetFastSimulationManager(G4FastSimulationManager *fsm)
void SetRegionalSteppingAction(G4UserSteppingAction *rusa)
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()