Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHRandomSeed Class Reference

#include <coresoftware/blob/master/offline/framework/phool/PHRandomSeed.h>

Public Member Functions

 PHRandomSeed ()
 
virtual ~PHRandomSeed ()
 
 operator unsigned int () const
 conversion operator for unsigned int seed = PHRandomSeed();
 

Static Public Member Functions

static unsigned int GetSeed ()
 get a seed
 
static void LoadSeed (const unsigned int iseed)
 
static void Verbosity (const int iverb)
 
static int Verbosity ()
 

Static Protected Member Functions

static void InitSeed ()
 

Static Protected Attributes

static bool fFixed
 
static bool fInitialized
 
static int verbose
 

Detailed Description

standard way to get a random seed: unsigned int seed = PHRandomSeed(); It return fix seed sequence if recoConsts RANDOMSEED is set. If values are preloaded via PHRandomSeed::LoadSeed, they are returned in loaded order otherwise it return a random seed from std::random_device rdev

Definition at line 9 of file PHRandomSeed.h.

View newest version in sPHENIX GitHub at line 9 of file PHRandomSeed.h

Constructor & Destructor Documentation

PHRandomSeed::PHRandomSeed ( )
inline

Definition at line 12 of file PHRandomSeed.h.

View newest version in sPHENIX GitHub at line 12 of file PHRandomSeed.h

virtual PHRandomSeed::~PHRandomSeed ( )
inlinevirtual

Definition at line 13 of file PHRandomSeed.h.

View newest version in sPHENIX GitHub at line 13 of file PHRandomSeed.h

Member Function Documentation

unsigned int PHRandomSeed::GetSeed ( )
static

get a seed

Definition at line 17 of file PHRandomSeed.cc.

View newest version in sPHENIX GitHub at line 17 of file PHRandomSeed.cc

References fDistribution, fFixed, fInitialized, fRandomGenerator, InitSeed(), and verbose.

Referenced by operator unsigned int().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHRandomSeed::InitSeed ( )
staticprotected

Definition at line 48 of file PHRandomSeed.cc.

View newest version in sPHENIX GitHub at line 48 of file PHRandomSeed.cc

References fFixed, fInitialized, PHFlag::FlagExist(), fRandomGenerator, PHFlag::get_IntFlag(), recoConsts::instance(), and seed.

Referenced by GetSeed().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHRandomSeed::LoadSeed ( const unsigned int  iseed)
static

Definition at line 62 of file PHRandomSeed.cc.

View newest version in sPHENIX GitHub at line 62 of file PHRandomSeed.cc

PHRandomSeed::operator unsigned int ( ) const
inline

conversion operator for unsigned int seed = PHRandomSeed();

Definition at line 15 of file PHRandomSeed.h.

View newest version in sPHENIX GitHub at line 15 of file PHRandomSeed.h

References GetSeed().

+ Here is the call graph for this function:

void PHRandomSeed::Verbosity ( const int  iverb)
static

Definition at line 67 of file PHRandomSeed.cc.

View newest version in sPHENIX GitHub at line 67 of file PHRandomSeed.cc

References verbose.

Member Data Documentation

bool PHRandomSeed::fFixed
staticprotected

Definition at line 28 of file PHRandomSeed.h.

View newest version in sPHENIX GitHub at line 28 of file PHRandomSeed.h

Referenced by GetSeed(), and InitSeed().

bool PHRandomSeed::fInitialized
staticprotected

Definition at line 29 of file PHRandomSeed.h.

View newest version in sPHENIX GitHub at line 29 of file PHRandomSeed.h

Referenced by GetSeed(), and InitSeed().

int PHRandomSeed::verbose
staticprotected

Definition at line 30 of file PHRandomSeed.h.

View newest version in sPHENIX GitHub at line 30 of file PHRandomSeed.h

Referenced by GetSeed(), and Verbosity().


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