1 #ifndef MARLINMT_RANDOMSEEDMANAGER_h 2 #define MARLINMT_RANDOMSEEDMANAGER_h 1 9 #include <unordered_set> 36 static const SeedType
MaxSeed = std::numeric_limits<SeedType>::max() ;
44 RandomSeedManager( SeedType globalSeed = static_cast<unsigned int>(time(
nullptr)) ) ;
std::map< HashResult, SeedType > RandomSeedMap
const void * HashArgument
RandomDistribution _rdmDistribution
The random number distribution.
std::hash< const void * > HashFunction
std::unordered_set< HashResult > EntryList
std::unique_ptr< RandomSeedMap > generateRandomSeeds(const EventStore *const evt)
Generate a random seed map.
static const SeedType MaxSeed
std::mt19937 RandomGenerator
void addEntry(HashResult entry)
Add an entry to the random seed manager.
std::uniform_int_distribution< SeedType > RandomDistribution
EntryList _entryList
The entry list.
RandomGenerator _generator
The random generator engine.
RandomSeedManager & operator=(const RandomSeedManager &)=delete
static const SeedType MinSeed
SeedType _globalSeed
The global random seed, if set.
SeedType getRandom()
Get a new random number from the internal generator.
~RandomSeedManager()=default
RandomSeedManager(const RandomSeedManager &)=delete