LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 177 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().

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