Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyRandomize Namespace Reference

Functions

void f1_setTheSeed (long seed)
 
void f2_setTheSeed (long seed, int lux)
 
void f1_setTheSeeds (const list &seedList)
 
void f2_setTheSeeds (const list &seedList, int aux)
 
list f_getTheSeeds ()
 
list f_getTheTableSeeds (int index)
 
void f1_saveEngineStatus ()
 
void f2_saveEngineStatus (const char *filename)
 
void f1_restoreEngineStatus ()
 
void f2_restoreEngineStatus (const char *filename)
 
int f1_RandBit_shootBit ()
 
double f1_RandGaussQ_shoot ()
 
double f2_RandGaussQ_shoot (double mean, double stdDev)
 
double f_G4UniformRand ()
 

Function Documentation

int pyRandomize::f1_RandBit_shootBit ( )

Definition at line 147 of file pyRandomize.cc.

148 {
149  return RandBit::shootBit();
150 }

Here is the caller graph for this function:

double pyRandomize::f1_RandGaussQ_shoot ( )

Definition at line 153 of file pyRandomize.cc.

154 {
155  return RandGaussQ::shoot();
156 }
ThreeVector shoot(const G4int Ap, const G4int Af)

Here is the call graph for this function:

Here is the caller graph for this function:

void pyRandomize::f1_restoreEngineStatus ( )

Definition at line 136 of file pyRandomize.cc.

137 {
138  HepRandom::restoreEngineStatus();
139 }

Here is the caller graph for this function:

void pyRandomize::f1_saveEngineStatus ( )

Definition at line 125 of file pyRandomize.cc.

126 {
127  HepRandom::saveEngineStatus();
128 }

Here is the caller graph for this function:

void pyRandomize::f1_setTheSeed ( long  seed)

Definition at line 46 of file pyRandomize.cc.

47 {
48  HepRandom::setTheSeed(seed);
49 }
long seed
Definition: chem4.cc:68

Here is the caller graph for this function:

void pyRandomize::f1_setTheSeeds ( const list &  seedList)

Definition at line 57 of file pyRandomize.cc.

58 {
59  // check size...
60  int idx=0;
61  while(1) {
62  long val= extract<long>(seedList[idx]);
63  if(val==0) break;
64  idx++;
65  }
66  int nsize= idx+1;
67 
68  long* seedArray= new long[nsize]; // should not be deleted!!
69  // (this is a problem with CLHEP.)
70  for (int i=0; i< nsize; i++) {
71  seedArray[i]= extract<long>(seedList[i]);
72  }
73 
74  HepRandom::setTheSeeds(seedArray);
75 }

Here is the caller graph for this function:

double pyRandomize::f2_RandGaussQ_shoot ( double  mean,
double  stdDev 
)

Definition at line 158 of file pyRandomize.cc.

159 {
160  return RandGaussQ::shoot(mean, stdDev);
161 }
ThreeVector shoot(const G4int Ap, const G4int Af)

Here is the call graph for this function:

Here is the caller graph for this function:

void pyRandomize::f2_restoreEngineStatus ( const char *  filename)

Definition at line 141 of file pyRandomize.cc.

142 {
143  HepRandom::restoreEngineStatus(filename);
144 }

Here is the caller graph for this function:

void pyRandomize::f2_saveEngineStatus ( const char *  filename)

Definition at line 130 of file pyRandomize.cc.

131 {
132  HepRandom::saveEngineStatus(filename);
133 }

Here is the caller graph for this function:

void pyRandomize::f2_setTheSeed ( long  seed,
int  lux 
)

Definition at line 51 of file pyRandomize.cc.

52 {
53  HepRandom::setTheSeed(seed, lux);
54 }
static constexpr double lux
Definition: G4SIunits.hh:327
long seed
Definition: chem4.cc:68

Here is the caller graph for this function:

void pyRandomize::f2_setTheSeeds ( const list &  seedList,
int  aux 
)

Definition at line 77 of file pyRandomize.cc.

78 {
79  // check size...
80  int idx=0;
81  while(1) {
82  long val= extract<long>(seedList[idx]);
83  if(val==0) break;
84  idx++;
85  }
86  int nsize= idx+1;
87 
88  long* seedArray= new long[nsize];
89  for (int i=0; i< nsize; i++) {
90  seedArray[i]= extract<long>(seedList[i]);
91  }
92 
93  HepRandom::setTheSeeds(seedArray, aux);
94 }

Here is the caller graph for this function:

double pyRandomize::f_G4UniformRand ( )

Definition at line 165 of file pyRandomize.cc.

166 {
167  return G4UniformRand();
168 }
#define G4UniformRand()
Definition: Randomize.hh:97

Here is the caller graph for this function:

list pyRandomize::f_getTheSeeds ( )

Definition at line 97 of file pyRandomize.cc.

98 {
99  list seedList;
100  const long* seeds= HepRandom::getTheSeeds();
101  int idx=0;
102  while(1) {
103  if( seeds[idx]==0) break;
104  seedList.append(seeds[idx]);
105  idx++;
106  }
107  return seedList;
108 }

Here is the caller graph for this function:

list pyRandomize::f_getTheTableSeeds ( int  index)

Definition at line 111 of file pyRandomize.cc.

112 {
113  long seedPair[2];
114  HepRandom::getTheTableSeeds(seedPair, index);
115 
116  list seedList;
117  seedList.append(seedPair[0]);
118  seedList.append(seedPair[1]);
119 
120  return seedList;
121 }

Here is the caller graph for this function: