00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef EVT_STDLIB_RANDOM_ENGINE_HH
00015 #define EVT_STDLIB_RANDOM_ENGINE_HH
00016
00017 #include <stdlib.h>
00018 #include "EvtGenBase/EvtRandomEngine.hh"
00019
00020 class EvtStdlibRandomEngine : public EvtRandomEngine {
00021 public:
00022
00023 void setSeed(unsigned int seed)
00024 {
00025 srand(seed);
00026 }
00027
00028 virtual double random()
00029 {
00030 double x = rand();
00031 double y = RAND_MAX;
00032 return x/y;
00033 }
00034 };
00035
00036 #endif
00037
00038