#include <RandGeneral.h>
 | 
|   | RandGeneral (const double *aProbFunc, int theProbSize, int IntType=0) | 
|   | 
|   | RandGeneral (HepRandomEngine &anEngine, const double *aProbFunc, int theProbSize, int IntType=0) | 
|   | 
|   | RandGeneral (HepRandomEngine *anEngine, const double *aProbFunc, int theProbSize, int IntType=0) | 
|   | 
| virtual  | ~RandGeneral () | 
|   | 
| double  | shoot () | 
|   | 
| void  | shootArray (const int size, double *vect) | 
|   | 
| double  | shoot (HepRandomEngine *anEngine) | 
|   | 
| void  | shootArray (HepRandomEngine *anEngine, const int size, double *vect) | 
|   | 
| double  | fire () | 
|   | 
| void  | fireArray (const int size, double *vect) | 
|   | 
| double  | operator() () | 
|   | 
| std::ostream &  | put (std::ostream &os) const  | 
|   | 
| std::istream &  | get (std::istream &is) | 
|   | 
| std::string  | name () const  | 
|   | 
| HepRandomEngine &  | engine () | 
|   | 
  Public Member Functions inherited from CLHEP::HepRandom | 
|   | HepRandom () | 
|   | 
|   | HepRandom (long seed) | 
|   | 
|   | HepRandom (HepRandomEngine &algorithm) | 
|   | 
|   | HepRandom (HepRandomEngine *algorithm) | 
|   | 
| virtual  | ~HepRandom () | 
|   | 
| double  | flat () | 
|   | 
| void  | flatArray (const int size, double *vect) | 
|   | 
| double  | flat (HepRandomEngine *theNewEngine) | 
|   | 
| void  | flatArray (HepRandomEngine *theNewEngine, const int size, double *vect) | 
|   | 
- Author
 
Definition at line 39 of file RandGeneral.h.
 
      
        
          | CLHEP::RandGeneral::RandGeneral  | 
          ( | 
          const double *  | 
          aProbFunc,  | 
        
        
           | 
           | 
          int  | 
          theProbSize,  | 
        
        
           | 
           | 
          int  | 
          IntType = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 64 of file RandGeneral.cc.
   70     InterpolationType(IntType)
 
   72   prepareTable(aProbFunc);
 
static HepRandomEngine * getTheEngine()
 
 
 
 
      
        
          | CLHEP::RandGeneral::RandGeneral  | 
          ( | 
          HepRandomEngine &  | 
          anEngine,  | 
        
        
           | 
           | 
          const double *  | 
          aProbFunc,  | 
        
        
           | 
           | 
          int  | 
          theProbSize,  | 
        
        
           | 
           | 
          int  | 
          IntType = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 75 of file RandGeneral.cc.
   80   localEngine(&anEngine, do_nothing_deleter()), 
 
   82   InterpolationType(IntType)
 
   84   prepareTable(aProbFunc);
 
 
 
 
      
        
          | CLHEP::RandGeneral::RandGeneral  | 
          ( | 
          HepRandomEngine *  | 
          anEngine,  | 
        
        
           | 
           | 
          const double *  | 
          aProbFunc,  | 
        
        
           | 
           | 
          int  | 
          theProbSize,  | 
        
        
           | 
           | 
          int  | 
          IntType = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 87 of file RandGeneral.cc.
   92   localEngine(anEngine), 
 
   94   InterpolationType(IntType)
 
   96   prepareTable(aProbFunc);
 
 
 
 
  
  
      
        
          | CLHEP::RandGeneral::~RandGeneral  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | static std::string CLHEP::RandGeneral::distributionName  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
 
      
        
          | double CLHEP::RandGeneral::fire  | 
          ( | 
           | ) | 
           | 
        
      
 
 
      
        
          | void CLHEP::RandGeneral::fireArray  | 
          ( | 
          const int  | 
          size,  | 
        
        
           | 
           | 
          double *  | 
          vect  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
  
  
      
        
          | std::istream & CLHEP::RandGeneral::get  | 
          ( | 
          std::istream &  | 
          is | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
Reimplemented from CLHEP::HepRandom.
Definition at line 264 of file RandGeneral.cc.
  267   if (inName != 
name()) {
 
  268     is.clear(std::ios::badbit | is.rdstate());
 
  269     std::cerr << 
"Mismatch when expecting to read state of a " 
  270               << 
name() << 
" distribution\n" 
  271           << 
"Name found was " << inName
 
  272           << 
"\nistream is left in the badbit state\n";
 
  276     std::vector<unsigned long> t(2);
 
  277     is >> nBins >> oneOverNbins >> InterpolationType;
 
  279     theIntegralPdf.resize(nBins+1);
 
  280     for (
unsigned int i=0; i<theIntegralPdf.size(); ++i) {
 
  281       is >> theIntegralPdf[i] >> t[0] >> t[1];
 
  287   is >> oneOverNbins >> InterpolationType;
 
  288   theIntegralPdf.resize(nBins+1);
 
  289   for (
unsigned int i=0; i<theIntegralPdf.size(); ++i) is >> theIntegralPdf[i];
 
bool possibleKeywordInput(IS &is, const std::string &key, T &t)
 
static double longs2double(const std::vector< unsigned long > &v)
 
 
 
 
  
  
      
        
          | std::string CLHEP::RandGeneral::name  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | double CLHEP::RandGeneral::operator()  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | std::ostream & CLHEP::RandGeneral::put  | 
          ( | 
          std::ostream &  | 
          os | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Reimplemented from CLHEP::HepRandom.
Definition at line 247 of file RandGeneral.cc.
  248   int pr=os.precision(20);
 
  249   std::vector<unsigned long> t(2);
 
  250   os << 
" " << 
name() << 
"\n";
 
  251   os << 
"Uvec" << 
"\n";
 
  252   os << nBins << 
" " << oneOverNbins << 
" " << InterpolationType << 
"\n";    
 
  254   os << t[0] << 
" " << t[1] << 
"\n";
 
  255   assert (static_cast<int>(theIntegralPdf.size())==nBins+1);
 
  256   for (
unsigned int i=0; i<theIntegralPdf.size(); ++i) {
 
  258     os << theIntegralPdf[i] << 
" " << t[0] << 
" " << t[1] << 
"\n";
 
static std::vector< unsigned long > dto2longs(double d)
 
 
 
 
  
  
      
        
          | double CLHEP::RandGeneral::shoot  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | void CLHEP::RandGeneral::shootArray  | 
          ( | 
          const int  | 
          size,  | 
         
        
           | 
           | 
          double *  | 
          vect  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
 
The documentation for this class was generated from the following files:
- source/geant4.10.03.p03/source/externals/clhep/include/CLHEP/Random/RandGeneral.h
 
- source/geant4.10.03.p03/source/externals/clhep/src/RandGeneral.cc