12 _globalSeed( globalSeed ),
13 _generator( _globalSeed ) {
20 bool inserted =
_entryList.insert( entry ).second ;
22 throw Exception(
"RandomSeedManager: Entry '" + std::to_string(entry) +
"' already registered !") ;
35 std::unique_ptr<RandomSeedManager::RandomSeedMap>
38 unsigned int seed = 0 ;
41 auto uid = evt->
uid() ;
42 unsigned char * c = (
unsigned char *) &uid ;
50 std::unique_ptr<RandomSeedMap> seedMap(
new RandomSeedMap() ) ;
std::map< HashResult, SeedType > RandomSeedMap
const void * HashArgument
RandomDistribution _rdmDistribution
The random number distribution.
std::size_t uid() const
Get the event unique id.
unsigned jenkins_hash(unsigned char *k, unsigned length, unsigned initval)
std::hash< const void * > HashFunction
std::unique_ptr< RandomSeedMap > generateRandomSeeds(const EventStore *const evt)
Generate a random seed map.
void addEntry(HashResult entry)
Add an entry to the random seed manager.
EntryList _entryList
The entry list.
RandomGenerator _generator
The random generator engine.
SeedType _globalSeed
The global random seed, if set.
SeedType getRandom()
Get a new random number from the internal generator.
RandomSeedManager(const RandomSeedManager &)=delete