LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
pyRandomize.cc File Reference
#include <boost/python.hpp>
#include "Randomize.hh"
#include <vector>

Go to the source code of this file.

Namespaces

 pyRandomize
 

Functions

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

Function Documentation

void export_Randomize ( )

Definition at line 176 of file pyRandomize.cc.

References pyRandomize::f1_RandBit_shootBit(), pyRandomize::f1_RandGaussQ_shoot(), pyRandomize::f1_restoreEngineStatus(), pyRandomize::f1_saveEngineStatus(), pyRandomize::f1_setTheSeed(), pyRandomize::f1_setTheSeeds(), pyRandomize::f2_RandGaussQ_shoot(), pyRandomize::f2_restoreEngineStatus(), pyRandomize::f2_saveEngineStatus(), pyRandomize::f2_setTheSeed(), pyRandomize::f2_setTheSeeds(), pyRandomize::f_G4UniformRand(), pyRandomize::f_getTheSeeds(), and pyRandomize::f_getTheTableSeeds().

Referenced by BOOST_PYTHON_MODULE().

177 {
178  class_<HepRandom>("HepRandom", "generate random number")
179  // ---
180  .def(init<long>())
181  .def(init<HepRandomEngine&>())
182  .def(init<HepRandomEngine*>())
183  // ---
184  .def("setTheSeed", f1_setTheSeed)
185  .def("setTheSeed", f2_setTheSeed)
186  .staticmethod("setTheSeed")
187  .def("getTheSeed", &HepRandom::getTheSeed)
188  .staticmethod("getTheSeed")
189  .def("setTheSeeds", f1_setTheSeeds)
190  .def("setTheSeeds", f2_setTheSeeds)
191  .staticmethod("setTheSeeds")
192  .def("getTheSeeds", f_getTheSeeds)
193  .staticmethod("getTheSeeds")
194  .def("getTheTableSeeds", f_getTheTableSeeds)
195  .staticmethod("getTheTableSeeds")
196  // ---
197  .def("getTheGenerator", &HepRandom::getTheGenerator,
198  return_value_policy<reference_existing_object>())
199  .staticmethod("getTheGenerator")
200  .def("setTheEngine", &HepRandom::setTheEngine)
201  .staticmethod("setTheEngine")
202  .def("getTheEngine", &HepRandom::getTheEngine,
203  return_value_policy<reference_existing_object>())
204  .staticmethod("getTheEngine")
205  .def("saveEngineStatus", f1_saveEngineStatus)
206  .def("saveEngineStatus", f2_saveEngineStatus)
207  .staticmethod("saveEngineStatus")
208  .def("restoreEngineStatus", f1_restoreEngineStatus)
209  .def("restoreEngineStatus", f2_restoreEngineStatus)
210  .staticmethod("restoreEngineStatus")
211  .def("showEngineStatus", &HepRandom::showEngineStatus)
212  .staticmethod("showEngineStatus")
213  .def("createInstance", &HepRandom::createInstance)
214  .staticmethod("createInstance")
215  ;
216 
217  // ---
218  class_<RandBit, boost::noncopyable>
219  ("RandBit", "generate bit random number", no_init)
220  .def("shootBit", f1_RandBit_shootBit)
221  .staticmethod("shootBit")
222  ;
223 
224  // ---
225  class_<G4RandGauss, boost::noncopyable>
226  ("G4RandGauss", "generate gaussian random number", no_init)
227  .def("shoot", f1_RandGaussQ_shoot)
228  .def("shoot", f2_RandGaussQ_shoot)
229  .staticmethod("shoot")
230  ;
231 
232  // ---
233  def("G4UniformRand", f_G4UniformRand);
234 
235 }
void f1_setTheSeed(long seed)
Definition: pyRandomize.cc:45
void f1_setTheSeeds(const list &seedList)
Definition: pyRandomize.cc:56
void f1_saveEngineStatus()
Definition: pyRandomize.cc:124
list f_getTheSeeds()
Definition: pyRandomize.cc:96
void f2_setTheSeed(long seed, int lux)
Definition: pyRandomize.cc:50
list f_getTheTableSeeds(int index)
Definition: pyRandomize.cc:110
double f1_RandGaussQ_shoot()
Definition: pyRandomize.cc:152
void f2_saveEngineStatus(const char *filename)
Definition: pyRandomize.cc:129
void f1_restoreEngineStatus()
Definition: pyRandomize.cc:135
int f1_RandBit_shootBit()
Definition: pyRandomize.cc:146
void f2_restoreEngineStatus(const char *filename)
Definition: pyRandomize.cc:140
double f_G4UniformRand()
Definition: pyRandomize.cc:164
double f2_RandGaussQ_shoot(double mean, double stdDev)
Definition: pyRandomize.cc:157
void f2_setTheSeeds(const list &seedList, int aux)
Definition: pyRandomize.cc:76