00001 //-------------------------------------------------------------------------- 00002 // 00003 // Environment: 00004 // This software is part of the EvtGen package developed jointly 00005 // for the BaBar and CLEO collaborations. If you use all or part 00006 // of it, please give an appropriate acknowledgement. 00007 // 00008 // Copyright Information: See EvtGen/COPYRIGHT 00009 // Copyright (C) 1998 Caltech, UCSB 00010 // 00011 // Module: EvtGen/EvtRandom.hh 00012 // 00013 // Description:Source of random numbers for EvtGen code 00014 // 00015 // Modification history: 00016 // 00017 // RYD March 24, 1998 Module created 00018 // 00019 //------------------------------------------------------------------------ 00020 00021 #ifndef EVTRANDOM_HH 00022 #define EVTRANDOM_HH 00023 00024 00025 class EvtRandomEngine; 00026 00027 class EvtRandom{ 00028 00029 public: 00030 00031 static double Flat(double min, double max); 00032 static double Flat(double max); 00033 static double Flat(); 00034 00035 static double random(); 00036 00037 //This class does not take ownership of the random engine; 00038 //the caller needs to make sure that the engine is not 00039 //destroyed. 00040 static void setRandomEngine(EvtRandomEngine* randomEngine); 00041 00042 private: 00043 00044 static EvtRandomEngine* _randomEngine; 00045 00046 }; 00047 00048 #endif 00049