Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -49,38 +49,38 @@ class G4WorkerTaskRunManager;
|
||||
|
||||
class G4UserTaskThreadInitialization : public G4UserWorkerThreadInitialization
|
||||
{
|
||||
public: // with description
|
||||
G4UserTaskThreadInitialization();
|
||||
virtual ~G4UserTaskThreadInitialization();
|
||||
public: // with description
|
||||
G4UserTaskThreadInitialization() = default;
|
||||
~G4UserTaskThreadInitialization() override = default;
|
||||
|
||||
virtual G4Thread* CreateAndStartWorker(G4WorkerThread* workerThreadContext);
|
||||
// Called by the kernel to create a new thread/worker
|
||||
// and start work.
|
||||
// Usere should not re-implement this function (in derived class), except only
|
||||
// if he/she wants to verwrite the default threading model (see StartThread
|
||||
// function)
|
||||
// Called by the kernel to create a new thread/worker
|
||||
// and start work.
|
||||
// Usere should not re-implement this function (in derived class), except only
|
||||
// if he/she wants to verwrite the default threading model (see StartThread
|
||||
// function)
|
||||
G4Thread* CreateAndStartWorker(G4WorkerThread* workerThreadContext) override;
|
||||
|
||||
virtual void SetupRNGEngine(const CLHEP::HepRandomEngine* aRNGEngine) const;
|
||||
// Called by worker threads to set the Random Number Generator Engine
|
||||
// The default implementation "clones" the engine from the master thread
|
||||
// User needs to re-implement this method if using a non-standard
|
||||
// RNG Engine (i.e. a different one w.r.t. the one provided in the CLHEP
|
||||
// version supported by G4.
|
||||
// Important: this method is called by all threads at the same time
|
||||
// if is user responsibilitiy to make it thread-safe
|
||||
// Called by worker threads to set the Random Number Generator Engine
|
||||
// The default implementation "clones" the engine from the master thread
|
||||
// User needs to re-implement this method if using a non-standard
|
||||
// RNG Engine (i.e. a different one w.r.t. the one provided in the CLHEP
|
||||
// version supported by G4.
|
||||
// Important: this method is called by all threads at the same time
|
||||
// if is user responsibilitiy to make it thread-safe
|
||||
void SetupRNGEngine(const CLHEP::HepRandomEngine* aRNGEngine) const override;
|
||||
|
||||
virtual void JoinWorker(G4Thread* aThread);
|
||||
// Called by the kernel when threads need to be terminated. Implements logic
|
||||
// of joining the aThread. Calling thread will wait for aThread to end. Usere
|
||||
// should not re-implement this function (in derived class), except only if
|
||||
// he/she wants to verwrite the default threading model (see StartThread
|
||||
// function)
|
||||
// Called by the kernel when threads need to be terminated. Implements logic
|
||||
// of joining the aThread. Calling thread will wait for aThread to end. Usere
|
||||
// should not re-implement this function (in derived class), except only if
|
||||
// he/she wants to verwrite the default threading model (see StartThread
|
||||
// function)
|
||||
void JoinWorker(G4Thread* aThread) override;
|
||||
|
||||
virtual G4WorkerRunManager* CreateWorkerRunManager() const;
|
||||
// Called by StartThread function to create a run-manager implementing worker
|
||||
// behvior. User should re-implemtn this function in derived class to
|
||||
// instantiate his/her user-defined WorkerRunManager. By default this method
|
||||
// instantiates G4WorkerTaskRunManager object.
|
||||
// Called by StartThread function to create a run-manager implementing worker
|
||||
// behvior. User should re-implemtn this function in derived class to
|
||||
// instantiate his/her user-defined WorkerRunManager. By default this method
|
||||
// instantiates G4WorkerTaskRunManager object.
|
||||
G4WorkerRunManager* CreateWorkerRunManager() const override;
|
||||
};
|
||||
|
||||
#endif // G4UserTaskThreadInitialization_hh
|
||||
|
||||
Reference in New Issue
Block a user