The Gaudi Framework
master (f31105fd)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
n
o
p
q
r
s
t
v
Enumerator
a
b
c
d
e
f
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Properties
Related Functions
:
a
b
c
d
e
g
h
i
m
o
p
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
b
c
e
f
g
h
i
l
m
n
o
p
r
s
t
u
z
Variables
a
b
c
d
e
g
h
i
m
o
p
q
r
s
t
v
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerations
Enumerator
c
e
f
p
u
v
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
HepRndmBaseEngine.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
//====================================================================
12
// CLHEP Basic Random Engine definition file
13
//--------------------------------------------------------------------
14
//
15
// Package : HepRndm ( The LHCb Offline System)
16
// Author : M.Frank
17
// History :
18
// +---------+----------------------------------------------+---------
19
// | Date | Comment | Who
20
// +---------+----------------------------------------------+---------
21
// | 29/10/99| Initial version | MF
22
// +---------+----------------------------------------------+---------
23
//
24
//====================================================================
25
#ifndef HEPRNDM_HEPRNDMBASEENGINE_H
26
#define HEPRNDM_HEPRNDMBASEENGINE_H 1
27
28
// Framework include files
29
#include "
RndmEngine.h
"
30
#include <CLHEP/Random/Random.h>
31
32
// Forward declarations
33
namespace
CLHEP
{
34
class
HepRandomEngine;
35
}
36
37
namespace
HepRndm
{
38
39
class
BaseEngine
:
public
RndmEngine
{
40
protected
:
41
std::unique_ptr<CLHEP::HepRandomEngine>
m_hepEngine
;
42
43
public
:
44
BaseEngine
(
const
std::string
&
name
,
ISvcLocator
* loc ) :
RndmEngine
(
name
, loc ) {}
45
CLHEP::HepRandomEngine*
hepEngine
() {
return
m_hepEngine
.
get
(); }
46
const
CLHEP::HepRandomEngine*
hepEngine
()
const
{
return
m_hepEngine
.
get
(); }
47
// Retrieve single random number
48
double
rndm
()
const override
{
return
m_hepEngine
->flat(); }
49
50
StatusCode
finalize
()
override
{
51
if
(
m_hepEngine
) CLHEP::HepRandom::setTheEngine(
nullptr
);
52
m_hepEngine
.
reset
();
53
return
RndmEngine::finalize
();
54
}
55
56
protected
:
57
void
initEngine
() {
m_hepEngine
=
createEngine
(); }
58
virtual
std::unique_ptr<CLHEP::HepRandomEngine>
createEngine
() = 0;
59
};
60
}
// namespace HepRndm
61
#endif // HEPRNDM_HEPRNDMBASEENGINE_H
HepRndm::BaseEngine::hepEngine
CLHEP::HepRandomEngine * hepEngine()
Definition:
HepRndmBaseEngine.h:45
std::string
STL class.
ISvcLocator
Definition:
ISvcLocator.h:46
HepRndm::BaseEngine::createEngine
virtual std::unique_ptr< CLHEP::HepRandomEngine > createEngine()=0
HepRndm::BaseEngine::initEngine
void initEngine()
Definition:
HepRndmBaseEngine.h:57
HepRndm::BaseEngine
Definition:
HepRndmBaseEngine.h:39
HepRndm::BaseEngine::finalize
StatusCode finalize() override
Definition:
HepRndmBaseEngine.h:50
std::unique_ptr::get
T get(T... args)
HepRndm::BaseEngine::hepEngine
const CLHEP::HepRandomEngine * hepEngine() const
Definition:
HepRndmBaseEngine.h:46
std::unique_ptr::reset
T reset(T... args)
Service::finalize
StatusCode finalize() override
Definition:
Service.cpp:222
HepRndm::BaseEngine::m_hepEngine
std::unique_ptr< CLHEP::HepRandomEngine > m_hepEngine
Definition:
HepRndmBaseEngine.h:41
HepRndm
Definition:
HepRndmBaseEngine.h:37
RndmEngine.h
Service::name
const std::string & name() const override
Retrieve name of the service
Definition:
Service.cpp:332
StatusCode
Definition:
StatusCode.h:65
HepRndm::BaseEngine::rndm
double rndm() const override
Definition:
HepRndmBaseEngine.h:48
CLHEP
Definition:
HepRndmBaseEngine.h:33
HepRndm::BaseEngine::BaseEngine
BaseEngine(const std::string &name, ISvcLocator *loc)
Definition:
HepRndmBaseEngine.h:44
std::unique_ptr< CLHEP::HepRandomEngine >
RndmEngine
Random Generator engine definition.
Definition:
RndmEngine.h:52
GaudiSvc
src
RndmGenSvc
HepRndmBaseEngine.h
Generated on Mon Apr 7 2025 16:26:25 for The Gaudi Framework by
1.8.18