|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "CLHEP/Random/RandomEngine.h"
10 #include "CLHEP/Random/RandFlat.h"
13 ISvcLocator* pSvcLocator ) :
15 m_hes(
"HiveExSvc",
name),
16 m_ccs(
"CPUCrunchSvc",
name),
17 m_rngSvc(
"AthRNGSvc",
name) {}
36 return StatusCode::SUCCESS;
44 const auto& ctx = Gaudi::Hive::currentContext();
53 m_ccs->crunch_for( std::chrono::milliseconds(
sleep) );
56 std::this_thread::sleep_for(std::chrono::milliseconds(
sleep ));
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
HiveAlgBase(const std::string &name, ISvcLocator *pSvcLocator)
ServiceHandle< IHiveExSvc > m_hes
virtual StatusCode initialize() override
Gaudi::Property< unsigned int > m_time
::StatusCode StatusCode
StatusCode definition for legacy code.
ServiceHandle< ICPUCrunchSvc > m_ccs
A wrapper class for event-slot-local random engines.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Gaudi::Property< bool > m_doCrunch
ServiceHandle< IAthRNGSvc > m_rngSvc
Base class for AthExHive example Algs to provide functionality to sleep for a certain amount of time,...