1 #ifndef _fwk_RandomEngineRegistry_h_
2 #define _fwk_RandomEngineRegistry_h_
12 #include <utl/Singleton.h>
13 #include <utl/AugerException.h>
14 #include <utl/RandomEngine.h>
15 #include <utl/ShadowPtr.h>
60 : AugerException(message) { }
64 {
return "Invalid random engine in registry exception"; }
83 typedef std::map<RandomEngineID, utl::RandomEngine*>
Registry;
Base class for all exceptions used in the auger offline code.
utl::ShadowPtr< Registry > fRegistry
utl::RandomEngine & Get(const RandomEngineID id=eDetector)
Get a pre-defined random engine.
Wraps the random number engine used to generate distributions.
void Init()
Initialise the registry.
virtual std::string GetExceptionName() const
Retrieve verbose exception name.
void GenerateSeeds(long *const seed, const int n) const
Collection of pre-defined random engines.
InvalidRandomEngineException(const std::string &message="")
Construct random engine exception with message.
void RegisterOne(const RandomEngineID id, utl::RandomEngine *const engine)
Register an engine.
std::map< RandomEngineID, utl::RandomEngine * > Registry
RandomEngineID
Identifiers for all pre-defined random engines.
Base class for exceptions in the RandomEngineRegistry.
Curiously Recurring Template Pattern (CRTP) for Meyers singleton.