ATLAS Offline Software
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
() {
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
}
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition:
AthMsgStreamMacros.h:31
TestRandomSeqAlg::m_rndmSvc
ServiceHandle< IAtRndmGenSvc > m_rndmSvc
handle to the IAtRndmGenSvc we want to test
Definition:
TestRandomSeqAlg.h:34
TestRandomSeqAlg::initialize
virtual StatusCode initialize() override
Definition:
TestRandomSeqAlg.cxx:10
TestRandomSeqAlg::m_streamName
Gaudi::Property< std::string > m_streamName
Definition:
TestRandomSeqAlg.h:35
TestRandomSeqAlg::m_noOfNo
Gaudi::Property< int > m_noOfNo
Definition:
TestRandomSeqAlg.h:36
lumiFormat.i
int i
Definition:
lumiFormat.py:85
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
IAtRndmGenSvc.h
TestRandomSeqAlg.h
TestRandomSeqAlg::execute
virtual StatusCode execute() override
Definition:
TestRandomSeqAlg.cxx:18
DEBUG
#define DEBUG
Definition:
page_access.h:11
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition:
AthCommonMsg.h:24
TestRandomSeqAlg::m_pEng
CLHEP::HepRandomEngine * m_pEng
Definition:
TestRandomSeqAlg.h:37
Generated on Fri Sep 5 2025 21:19:54 for ATLAS Offline Software by
1.8.18