![]() |
ATLAS Offline Software
|
A service to manage multiple RNG streams in thread-safe way. More...
#include <AthRNGSvc.h>
Public Member Functions | |
| AthRNGSvc (const std::string &name, ISvcLocator *svc) | |
| Standard constructor. More... | |
| virtual | ~AthRNGSvc () |
| StatusCode | initialize () override final |
| Initialize the service. More... | |
| virtual ATHRNG::RNGWrapper * | getEngine (const INamedInterface *client, const std::string &streamName="") override final |
| IAthRNGSvc method to retrieve the random number wrapper. More... | |
| virtual void | printEngineState (const INamedInterface *client, const std::string &streamName="") override final |
| Print engine state. More... | |
Private Types | |
| typedef std::function< CLHEP::HepRandomEngine *(void)> | factoryFunc |
| Factory function which constructs a HepRandomEngine. More... | |
Private Attributes | |
| std::string | m_rngType |
| Random number engine type (e.g. dSFMT, ranecu) More... | |
| std::unordered_map< std::string, ATHRNG::RNGWrapper * > | m_wrappers |
| The structure for storing the RNGWrappers. More... | |
| factoryFunc | m_fact |
| std::mutex | m_mutex |
| Mutex for protecting access to the wrapper structure. More... | |
A service to manage multiple RNG streams in thread-safe way.
The random engines are provided via the RNGWrapper which dereferences to the appropriate slot-local engine.
Definition at line 33 of file AthRNGSvc.h.
|
private |
Factory function which constructs a HepRandomEngine.
Definition at line 62 of file AthRNGSvc.h.
| AthRNGSvc::AthRNGSvc | ( | const std::string & | name, |
| ISvcLocator * | svc | ||
| ) |
|
virtual |
Definition at line 97 of file AthRNGSvc.cxx.
|
finaloverridevirtual |
IAthRNGSvc method to retrieve the random number wrapper.
Definition at line 49 of file AthRNGSvc.cxx.
|
finaloverride |
|
finaloverridevirtual |
|
private |
Definition at line 63 of file AthRNGSvc.h.
|
private |
Mutex for protecting access to the wrapper structure.
Definition at line 66 of file AthRNGSvc.h.
|
private |
Random number engine type (e.g. dSFMT, ranecu)
Definition at line 56 of file AthRNGSvc.h.
|
private |
The structure for storing the RNGWrappers.
Definition at line 59 of file AthRNGSvc.h.
1.8.18