LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenBase - EvtStdlibRandomEngine.hh (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 2 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 6 0.0 %

          Line data    Source code
       1             : /*******************************************************************************
       2             :  * Project: BaBar detector at the SLAC PEP-II B-factory
       3             :  * Package: EvtGenBase
       4             :  *    File: $Id: EvtStdlibRandomEngine.hh,v 1.2 2009-03-16 16:39:15 robbep Exp $
       5             :  *  Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
       6             :  *
       7             :  * Copyright (C) 2002 Caltech
       8             :  *******************************************************************************/
       9             : 
      10             : /*
      11             :  * Interface to stdlib's random number generator
      12             :  */
      13             :                       
      14             : #ifndef EVT_STDLIB_RANDOM_ENGINE_HH
      15             : #define EVT_STDLIB_RANDOM_ENGINE_HH
      16             : 
      17             : #include <stdlib.h>
      18             : #include <TRandom.h>
      19             : #include "EvtGenBase/EvtRandomEngine.hh"
      20             : 
      21           0 : class EvtStdlibRandomEngine : public EvtRandomEngine {
      22             : public:
      23             :   
      24             :   void setSeed(unsigned int seed)
      25             :   {
      26             :     //srand(seed);
      27             :     gRandom->SetSeed(seed);
      28             :   }
      29             :   
      30             :   virtual double random()
      31             :   {
      32             :     /*double x = rand();
      33             :     double y = RAND_MAX;
      34             :     return x/y;*/
      35           0 :     return gRandom->Rndm();
      36             :   }
      37             : };
      38             : 
      39             : #endif
      40             : 
      41             : 

Generated by: LCOV version 1.11