ATLAS Offline Software
|
A tool which sets up the worker-thread-local workspace for Geant4. More...
#include <G4ThreadInitTool.h>
Public Member Functions | |
G4ThreadInitTool (const std::string &, const std::string &, const IInterface *) | |
Standard tool constructor. More... | |
virtual void | initThread () override final |
Set up the Geant4 workspace for this worker thread. More... | |
virtual void | terminateThread () override final |
Tear down the Geant4 workspace for this worker thread. More... | |
virtual unsigned int | nInit () const override final |
Counter used for barrier mechanism in thread initialization. More... | |
Private Attributes | |
std::atomic_uint | m_nInitThreads |
Counter of threads that have been initialized. More... | |
A tool which sets up the worker-thread-local workspace for Geant4.
Definition at line 19 of file G4ThreadInitTool.h.
G4ThreadInitTool::G4ThreadInitTool | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
Standard tool constructor.
Definition at line 27 of file G4ThreadInitTool.cxx.
|
finaloverridevirtual |
Set up the Geant4 workspace for this worker thread.
Definition at line 38 of file G4ThreadInitTool.cxx.
|
inlinefinaloverridevirtual |
Counter used for barrier mechanism in thread initialization.
This number needs to be correctly reported to properly ensure scheduling of thread-initialization tasks on every thread.
Definition at line 36 of file G4ThreadInitTool.h.
|
finaloverridevirtual |
Tear down the Geant4 workspace for this worker thread.
Definition at line 118 of file G4ThreadInitTool.cxx.
|
private |
Counter of threads that have been initialized.
Definition at line 43 of file G4ThreadInitTool.h.