Loading [MathJax]/extensions/tex2jax.js
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
RndmEngine.cpp
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
// Random Engine implementation
13
//--------------------------------------------------------------------
14
//
15
// Package : Gaudi/RndmGen ( 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
#define GAUDI_RANDOMGENSVC_RndmEngine_CPP
26
27
// STL include files
28
#include <cfloat>
29
30
// Framework include files
31
#include "
RndmEngine.h
"
32
#include <
GaudiKernel/DataObject.h
>
33
#include <
GaudiKernel/IDataProviderSvc.h
>
34
#include <
GaudiKernel/IIncidentSvc.h
>
35
#include <
GaudiKernel/IMessageSvc.h
>
36
#include <
GaudiKernel/IOpaqueAddress.h
>
37
#include <
GaudiKernel/ISvcLocator.h
>
38
#include <
GaudiKernel/MsgStream.h
>
39
41
StreamBuffer
&
RndmEngine::serialize
(
StreamBuffer
& str ) {
return
str; }
43
45
StreamBuffer
&
RndmEngine::serialize
(
StreamBuffer
& str )
const
{
return
str; }
46
48
double
RndmEngine::rndm
()
const
{
return
DBL_MAX; }
49
56
StatusCode
RndmEngine::rndmArray
(
std::vector<double>
&
array
,
long
howmany,
long
start
)
const
{
57
array
.resize(
start
+ howmany );
58
std::generate_n
(
std::next
(
array
.begin(),
start
), howmany, [&]() { return this->rndm(); } );
59
return
StatusCode::SUCCESS
;
60
}
std::generate_n
T generate_n(T... args)
RndmEngine::serialize
StreamBuffer & serialize(StreamBuffer &str) override
Input serialization from stream buffer.
Definition:
RndmEngine.cpp:42
Service::start
StatusCode start() override
Definition:
Service.cpp:187
std::vector< double >
IOTest.start
start
Definition:
IOTest.py:110
IMessageSvc.h
IDataProviderSvc.h
StreamBuffer
Definition:
StreamBuffer.h:52
IIncidentSvc.h
RndmEngine.h
StatusCode
Definition:
StatusCode.h:65
IOpaqueAddress.h
RndmEngine::rndmArray
StatusCode rndmArray(std::vector< double > &array, long howmany, long start=0) const override
Multiple shots returning vector with flat random numbers.
Definition:
RndmEngine.cpp:56
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition:
StatusCode.h:100
DataObject.h
Containers::array
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
Definition:
KeyedObjectManager.h:37
RndmEngine::rndm
double rndm() const override
Single shot returning single random number.
Definition:
RndmEngine.cpp:48
ISvcLocator.h
MsgStream.h
std::next
T next(T... args)
GaudiSvc
src
RndmGenSvc
RndmEngine.cpp
Generated on Mon Apr 7 2025 16:26:25 for The Gaudi Framework by
1.8.18