|
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/ISvcLocator.h"
7 #include "GaudiKernel/DataSvc.h"
8 #include "GaudiKernel/Incident.h"
10 #include "CLHEP/Random/RandomEngine.h"
30 return StatusCode::SUCCESS;
35 const EventContext& ctx)
const
39 rngWrapper->
setSeed( rngName, ctx );
45 const EventContext& ctx)
const
48 rngWrapper->
setSeed(
streamName, ctx.slot(), randomSeedOffset, ctx.eventID().run_number() );
58 ctx.setEventID (EventIDBase (conditionsRun,
59 EventIDBase::UNDEFEVT,
60 EventIDBase::UNDEFNUM,
61 EventIDBase::UNDEFNUM,
105 if (
name() ==
"ParticleDecayer") {
112 return StatusCode::SUCCESS;
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
GenEvent * newGenEvent(const int a, const int b)
void fillBarcodesAttribute(GenEvent *)
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
BooleanProperty m_mkMcEvent
Flag to determine if a new MC event collection should be made if it doesn't exist.
virtual StatusCode genuserInitialize()
For initialization of user code, if required. Called after genInitialize.
ServiceHandle< IAthRNGSvc > m_rndmSvc
Data members.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode genInitialize()
For initializing the generator, if required.
Base class for common behaviour of MC truth algorithms.
::StatusCode StatusCode
StatusCode definition for legacy code.
BooleanProperty m_isAfterburner
Flag for normal vs. afterburner generators.
#define CHECK(...)
Evaluate an expression and check for errors.
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
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.
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
virtual StatusCode initialize() override
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const