RandGeneral.icc

Go to the documentation of this file.
00001 // $Id:$
00002 // -*- C++ -*-
00003 // 
00004 // -----------------------------------------------------------------------
00005 //                             HEP Random
00006 //                         --- RandGeneral ---
00007 //                 inlined functions implementation file
00008 // -----------------------------------------------------------------------
00009  
00010 // =======================================================================
00011 // Gabriele Cosmo - Created: 20th August 1998
00012 //
00013 // M. Fischler    - Moved fire() and shoot(anEngine) into inline so that
00014 //                  the use of mapRandom does not cost an extra function call.
00015 // =======================================================================
00016 
00017 namespace CLHEP {
00018 
00019 inline double RandGeneral::fire()
00020 {
00021   double rand = localEngine->flat();
00022   return mapRandom(rand);
00023 }
00024 
00025 inline double RandGeneral::shoot()
00026 {
00027   return fire();
00028 }
00029 
00030 inline double RandGeneral::operator() ()
00031 {
00032   return fire();
00033 }
00034 
00035 inline double RandGeneral::shoot( HepRandomEngine* anEngine )
00036 { 
00037   double rand = anEngine->flat();
00038   return mapRandom(rand);
00039 }
00040 
00041 inline void RandGeneral::shootArray( const int size, double* vect )
00042 {
00043   fireArray(size, vect);
00044 }
00045 
00046 }  // namespace CLHEP

Generated on Mon May 27 17:50:33 2013 for Geant4 by  doxygen 1.4.7