CLHEP 2.4.7.1
C++ Class Library for High Energy Physics
RandGeneral.icc
Go to the documentation of this file.
1// $Id: RandGeneral.icc,v 1.2 2003/07/17 19:20:02 garren Exp $
2// -*- C++ -*-
3//
4// -----------------------------------------------------------------------
5// HEP Random
6// --- RandGeneral ---
7// inlined functions implementation file
8// -----------------------------------------------------------------------
9
10// =======================================================================
11// Gabriele Cosmo - Created: 20th August 1998
12//
13// M. Fischler - Moved fire() and shoot(anEngine) into inline so that
14// the use of mapRandom does not cost an extra function call.
15// =======================================================================
16
17namespace CLHEP {
18
19inline double RandGeneral::fire()
20{
21 double rand = localEngine->flat();
22 return mapRandom(rand);
23}
24
25inline double RandGeneral::shoot()
26{
27 return fire();
28}
29
31{
32 return fire();
33}
34
35inline double RandGeneral::shoot( HepRandomEngine* anEngine )
36{
37 double rand = anEngine->flat();
38 return mapRandom(rand);
39}
40
41inline void RandGeneral::shootArray( const int size, double* vect )
42{
43 fireArray(size, vect);
44}
45
46} // namespace CLHEP
virtual double flat()=0
void fireArray(const int size, double *vect)
void shootArray(const int size, double *vect)