CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
RandomObjects
src
RandomVector.cc
Go to the documentation of this file.
1
// $Id: RandomVector.cc,v 1.3 2003/08/13 20:00:13 garren Exp $
2
// -*- C++ -*-
3
//
4
// -----------------------------------------------------------------------
5
// HEP Random
6
// --- HepRandomVector ---
7
// class implementation file
8
// -----------------------------------------------------------------------
9
// =======================================================================
10
// Mark Fischler - Created: 19 OCtober, 1998
11
// =======================================================================
12
13
#include "CLHEP/Random/JamesRandom.h"
14
#include "
CLHEP/RandomObjects/RandomVector.h
"
15
#include "
CLHEP/RandomObjects/defs.h
"
16
17
namespace
CLHEP {
18
19
//------------------------- HepRandomVector ---------------------------------
20
21
HepRandomVector::HepRandomVector
()
22
:
theEngine
(new
HepJamesRandom
(11327503L)), deleteEngine(true)
23
{
24
}
25
26
HepRandomVector::HepRandomVector
(
long
seed)
27
:
theEngine
(new
HepJamesRandom
(seed)), deleteEngine(true) {
28
}
29
30
HepRandomVector::HepRandomVector
(
HepRandomEngine
& engine)
31
:
theEngine
(&engine), deleteEngine(false) {
32
}
33
34
HepRandomVector::HepRandomVector
(
HepRandomEngine
* engine)
35
:
theEngine
(engine), deleteEngine(true) {
36
}
37
38
HepRandomVector::~HepRandomVector
() {
39
if
( deleteEngine )
delete
theEngine
;
40
}
41
42
HepVector
HepRandomVector::operator()
() {
43
return
flat
();
44
}
45
46
}
// namespace CLHEP
47
Generated on Sun Jun 17 2012 08:08:27 for CLHEP by
1.8.1.1