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