Gaudi Framework, version v25r2
Home
Generated: Wed Jun 4 2014
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
.cern.ch
sw
Gaudi
releases
GAUDI
GAUDI_v25r2
GaudiSvc
src
RndmGenSvc
RndmEngine.cpp
Go to the documentation of this file.
1
//====================================================================
2
// Random Engine implementation
3
//--------------------------------------------------------------------
4
//
5
// Package : Gaudi/RndmGen ( The LHCb Offline System)
6
// Author : M.Frank
7
// History :
8
// +---------+----------------------------------------------+---------
9
// | Date | Comment | Who
10
// +---------+----------------------------------------------+---------
11
// | 29/10/99| Initial version | MF
12
// +---------+----------------------------------------------+---------
13
//
14
//====================================================================
15
#define GAUDI_RANDOMGENSVC_RndmEngine_CPP
16
17
// STL include files
18
#include <cfloat>
19
20
// Framework include files
21
#include "
GaudiKernel/IMessageSvc.h
"
22
#include "
GaudiKernel/ISvcLocator.h
"
23
#include "
GaudiKernel/IIncidentSvc.h
"
24
#include "
GaudiKernel/IOpaqueAddress.h
"
25
#include "
GaudiKernel/IDataProviderSvc.h
"
26
#include "
GaudiKernel/DataObject.h
"
27
#include "
GaudiKernel/MsgStream.h
"
28
#include "
RndmEngine.h
"
29
31
RndmEngine::RndmEngine
(
const
std::string& name,
ISvcLocator
* loc)
32
:
base_class
(name, loc)
33
{
34
}
35
37
RndmEngine::~RndmEngine
() {
38
}
39
41
StatusCode
RndmEngine::initialize
() {
42
StatusCode
status =
Service::initialize
();
43
if
( status.
isSuccess
() ) {
44
status =
setProperties
();
45
if
( status.
isSuccess
() ) {
46
m_pIncidentSvc
=
serviceLocator
()->service(
"IncidentSvc"
);
47
if
(!
m_pIncidentSvc
.
isValid
()) {
48
status =
StatusCode::FAILURE
;
49
}
50
}
51
}
52
return
status;
53
}
54
56
StatusCode
RndmEngine::finalize
() {
57
m_pIncidentSvc
= 0;
// release
58
return
Service::finalize
();
59
}
60
62
63
StreamBuffer
&
RndmEngine::serialize
(
StreamBuffer
& str) {
64
return
str;
65
}
66
68
StreamBuffer
&
RndmEngine::serialize
(
StreamBuffer
& str)
const
{
69
return
str;
70
}
71
73
double
RndmEngine::rndm
()
const
{
74
return
DBL_MAX;
75
}
76
78
void
RndmEngine::handle
(
const
Incident
&
/* inc */
) {
79
}
80
87
StatusCode
RndmEngine::rndmArray
( std::vector<double>&
array
,
long
howmany,
long
start
)
const
{
88
long
cnt =
start
;
89
array.resize(start+howmany);
90
for
(
long
i
= start, num = start+howmany;
i
< num;
i
++ ) {
91
array[cnt++] =
rndm
();
92
}
93
return
StatusCode::SUCCESS
;
94
}
95
Generated at Wed Jun 4 2014 14:48:58 for Gaudi Framework, version v25r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004