CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
corsika::RNGManager< CBPRNG > Class Template Reference
Inheritance diagram for corsika::RNGManager< CBPRNG >:

Public Types

typedef CBPRNG prng_type
 
typedef std::uint64_t seed_type
 
typedef std::string string_type
 
typedef std::map< std::string, prng_type > streams_type
 

Public Member Functions

 RNGManager (RNGManager< CBPRNG > const &)=delete
 
RNGManager< CBPRNG > & operator= (RNGManager< CBPRNG > const &)=delete
 
void registerRandomStream (string_type const &streamName)
 
prng_type & getRandomStream (string_type const &streamName)
 
bool isRegistered (string_type const &streamName) const
 
std::stringstream dumpState () const
 
const streams_type & getRngs () const
 
streams_type & Rngs ()
 Non-constant access to the streams. More...
 
seed_type getSeed () const
 
void setSeed (seed_type seed)
 
- Public Member Functions inherited from corsika::Singleton< RNGManager< CBPRNG > >
 Singleton (const Singleton &)=delete
 
Singletonoperator= (const Singleton &)=delete
 

Friends

class corsika::Singleton< RNGManager< CBPRNG > >
 

Detailed Description

template<typename CBPRNG = random_iterator::philox>
class corsika::RNGManager< CBPRNG >

Definition at line 26 of file RNGManager.hpp.

Member Function Documentation

◆ dumpState()

template<typename CBPRNG = random_iterator::philox>
std::stringstream corsika::RNGManager< CBPRNG >::dumpState ( ) const
inline

dumps the names and states of all registered random-number streams into a std::stringstream.

◆ getRandomStream()

template<typename CBPRNG = random_iterator::philox>
prng_type& corsika::RNGManager< CBPRNG >::getRandomStream ( string_type const &  streamName)
inline

returns the pre-stored stream of given name pStreamName if available

◆ isRegistered()

template<typename CBPRNG = random_iterator::philox>
bool corsika::RNGManager< CBPRNG >::isRegistered ( string_type const &  streamName) const
inline

Check whether a stream has been registered.

◆ registerRandomStream()

template<typename CBPRNG = random_iterator::philox>
void corsika::RNGManager< CBPRNG >::registerRandomStream ( string_type const &  streamName)
inline

This function is to be called by a module requiring a random-number stream during its initialization.

Exceptions
sth.when stream pModuleName is already registered

◆ Rngs()

template<typename CBPRNG = random_iterator::philox>
streams_type corsika::RNGManager< CBPRNG >::Rngs ( )
inline

Non-constant access to the streams.

Precondition
Postcondition
Returns
RNGManager::streams_type&

Definition at line 83 of file RNGManager.hpp.


The documentation for this class was generated from the following file: