9#include "CLHEP/Random/RandomEngine.h"
10#include "CLHEP/Random/RandFlat.h"
13 ISvcLocator* pSvcLocator ) :
34 return StatusCode::SUCCESS;
42 const auto& ctx = Gaudi::Hive::currentContext();
44 rngWrapper->
setSeed( name(), ctx );
51 m_ccs->crunch_for( std::chrono::milliseconds(
sleep) );
54 std::this_thread::sleep_for(std::chrono::milliseconds(
sleep ));
#define ATH_CHECK
Evaluate an expression and check for errors.
Base class for AthExHive example Algs to provide functionality to sleep for a certain amount of time,...
A wrapper class for event-slot-local random engines.
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Property< unsigned int > m_time
HiveAlgBase(const std::string &name, ISvcLocator *pSvcLocator)
ServiceHandle< ICPUCrunchSvc > m_ccs
ServiceHandle< IAthRNGSvc > m_rngSvc
ServiceHandle< IHiveExSvc > m_hes
virtual StatusCode initialize() override
Gaudi::Property< bool > m_doCrunch