ATLAS Offline Software
Loading...
Searching...
No Matches
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
6#include "CLHEP/Random/RandomEngine.h"
7#include "TestRandomSeqAlg.h"
8
9
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
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}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
MsgStream & msg() const
Gaudi::Property< std::string > m_streamName
virtual StatusCode initialize() override
CLHEP::HepRandomEngine * m_pEng
Gaudi::Property< int > m_noOfNo
ServiceHandle< IAtRndmGenSvc > m_rndmSvc
handle to the IAtRndmGenSvc we want to test
virtual StatusCode execute() override