ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaServices
src
TestRandomSeqAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
AthenaKernel/IAtRndmGenSvc.h
"
6
#include "CLHEP/Random/RandomEngine.h"
7
#include "
TestRandomSeqAlg.h
"
8
9
10
StatusCode
TestRandomSeqAlg::initialize
() {
11
ATH_MSG_INFO
(
"Initializing"
);
12
ATH_CHECK
(
m_rndmSvc
.retrieve() );
13
ATH_CHECK
( (
m_pEng
=
m_rndmSvc
->GetEngine(
m_streamName
)) !=
nullptr
);
14
return
StatusCode::SUCCESS;
15
}
16
17
18
StatusCode
TestRandomSeqAlg::execute
(
const
EventContext&
/*ctx*/
) {
19
msg
() << MSG::DEBUG <<
"execute: random sequence: "
;
20
for
(
int
i=0; i<
m_noOfNo
.value(); ++i)
msg
() <<
m_pEng
->flat() <<
" "
;
21
msg
() <<
endmsg
;
22
return
StatusCode::SUCCESS;
23
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x,...)
Definition
AthMsgStreamMacros.h:45
IAtRndmGenSvc.h
TestRandomSeqAlg.h
AthCommonAlgorithm< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition
AthCommonMsg.h:24
TestRandomSeqAlg::m_streamName
Gaudi::Property< std::string > m_streamName
Definition
TestRandomSeqAlg.h:35
TestRandomSeqAlg::initialize
virtual StatusCode initialize() override
Definition
TestRandomSeqAlg.cxx:10
TestRandomSeqAlg::m_pEng
CLHEP::HepRandomEngine * m_pEng
Definition
TestRandomSeqAlg.h:37
TestRandomSeqAlg::m_noOfNo
Gaudi::Property< int > m_noOfNo
Definition
TestRandomSeqAlg.h:36
TestRandomSeqAlg::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
TestRandomSeqAlg.cxx:18
TestRandomSeqAlg::m_rndmSvc
ServiceHandle< IAtRndmGenSvc > m_rndmSvc
handle to the IAtRndmGenSvc we want to test
Definition
TestRandomSeqAlg.h:34
Generated on
for ATLAS Offline Software by
1.17.0