MCPcopy Create free account
hub / github.com/Geant4/geant4 / RunTermination

Method RunTermination

source/run/src/G4WorkerTaskRunManager.cc:328–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326//============================================================================//
327
328void G4WorkerTaskRunManager::RunTermination()
329{
330 if (!fakeRun && (currentRun != nullptr)) {
331 MergePartialResults();
332
333 // Call a user hook: note this is before the next barrier
334 // so threads execute this method asyncrhonouzly
335 //(TerminateRun allows for synch via G4RunAction::EndOfRun)
336 const G4UserWorkerInitialization* uwi =
337 G4MTRunManager::GetMasterRunManager()->GetUserWorkerInitialization();
338 if (uwi != nullptr) uwi->WorkerRunEnd();
339 }
340
341 if (currentRun != nullptr) {
342 G4RunManager::RunTermination();
343 }
344 // Signal this thread has finished envent-loop.
345 // Note this will return only whan all threads reach this point
346 G4MTRunManager::GetMasterRunManager()->ThisWorkerEndEventLoop();
347}
348
349//============================================================================//
350

Callers

nothing calls this directly

Calls 3

WorkerRunEndMethod · 0.45

Tested by

no test coverage detected