CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

RandomVector.cc

Go to the documentation of this file.
00001 // $Id: RandomVector.cc,v 1.3 2003/08/13 20:00:13 garren Exp $
00002 // -*- C++ -*-
00003 //
00004 // -----------------------------------------------------------------------
00005 //                             HEP Random
00006 //                        --- HepRandomVector ---
00007 //                      class implementation file
00008 // -----------------------------------------------------------------------
00009 // =======================================================================
00010 // Mark Fischler  - Created: 19 OCtober, 1998
00011 // =======================================================================
00012 
00013 #include "CLHEP/Random/JamesRandom.h"
00014 #include "CLHEP/RandomObjects/RandomVector.h"
00015 #include "CLHEP/RandomObjects/defs.h"
00016 
00017 namespace CLHEP {
00018 
00019 //------------------------- HepRandomVector ---------------------------------
00020 
00021 HepRandomVector::HepRandomVector()
00022 : theEngine(new HepJamesRandom(11327503L)), deleteEngine(true)
00023 {
00024 }
00025 
00026 HepRandomVector::HepRandomVector(long seed)
00027 : theEngine(new HepJamesRandom(seed)), deleteEngine(true) {
00028 }
00029 
00030 HepRandomVector::HepRandomVector(HepRandomEngine & engine)
00031 : theEngine(&engine), deleteEngine(false) {
00032 }
00033 
00034 HepRandomVector::HepRandomVector(HepRandomEngine * engine)
00035 : theEngine(engine), deleteEngine(true) {
00036 }
00037 
00038 HepRandomVector::~HepRandomVector() {
00039   if ( deleteEngine ) delete theEngine;
00040 }
00041 
00042 HepVector HepRandomVector::operator()() {
00043   return flat();
00044 }
00045 
00046 }  // namespace CLHEP
00047 

Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7