125{
126 if (context() && workerRM()) return;
127
132 _fut->wait();
133 return;
134 }
135
136
137
138
139
140
141
142
143
144
145
146
148 context() = std::make_unique<G4WorkerThread>();
149
150
151
152
153
154
155
158 G4int thisID = context()->GetThreadId();
161
162
163
164
165
167
168
169
170
171
174
175
176
177
180
184 }
185
187 workerRM().reset(static_cast<G4WorkerTaskRunManager*>(
189 auto& wrm = workerRM();
190 wrm->SetWorkerThread(context().get());
191
192
193
194
195
197 wrm->G4RunManager::SetUserInitialization(const_cast<G4VUserDetectorConstruction*>(detector));
199 wrm->SetUserInitialization(const_cast<G4VUserPhysicsList*>(physicslist));
200
201
202
203
208
209 workerRM()->Initialize();
210
213
214 wrm->ProcessUI();
215}
G4int GetPinAffinity() const
const CLHEP::HepRandomEngine * getMasterRandomEngine() const
const G4UserWorkerInitialization * GetUserWorkerInitialization() const
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
const G4VUserActionInitialization * GetUserActionInitialization() const
G4VUserActionInitialization * GetNonConstUserActionInitialization() const
const G4VUserPhysicsList * GetUserPhysicsList() const
const G4UserWorkerThreadInitialization * GetUserWorkerThreadInitialization() const
void SetUpForAThread(G4int tId)
G4int ApplyCommand(const char *aCommand)
static G4UImanager * GetUIpointer()
virtual void WorkerStart() const
virtual void WorkerInitialize() const
virtual void SetupRNGEngine(const CLHEP::HepRandomEngine *aRNGEngine) const
virtual G4WorkerRunManager * CreateWorkerRunManager() const
static void SetInstance(G4VSteppingVerbose *Instance)
virtual G4VSteppingVerbose * InitializeSteppingVerbose() const
virtual void Build() const =0
static void BuildGeometryAndPhysicsVector()
ThreadPool * GetThreadPool() const
static uintmax_t get_this_thread_id()
G4int WorkerThreadJoinsPool()
void G4SetThreadId(G4int aNewValue)