51 Rndm::Numbers rndmflat(
randSvc(), Rndm::Flat( 0., 1. ) );
52 Rndm::Numbers rndmgauss(
randSvc(), Rndm::Gauss( 10., 1. ) );
55 Event* hdr =
new Event();
62 error() <<
"Unable to register Event Header" <<
endmsg;
67 int n = (int)( rndmflat() * 100. );
69 for (
int i = 0; i <
n; ++i ) {
72 double c = rndmgauss();
73 double b = rndmgauss();
74 double a = rndmgauss();
75 MyTrack* track =
new MyTrack(
float( a ),
float( b ),
float( c ) );
HepRndm::Engine< HepJamesRandom > e6
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
SmartIF< IRndmGenSvc > & randSvc() const
The standard RandomGen service, Return a pointer to the service if present.
void setRun(int value)
Update run number.
void setTime(const Gaudi::Time &value)
Update reference to event time stamp.
void setEvent(int value)
Update event number.
void setEvent(Event *evt)
Access to event object.
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
virtual StatusCode setSeeds(const std::vector< long > &seeds)=0
Allow to set new seeds.
virtual IRndmEngine * engine()=0
Retrieve engine.
const key_type & insert(const value_type val, const key_type &kval)
Insert entry to the container with a valid key.
This class is used for returning status codes from appropriate routines.
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
constexpr static const auto SUCCESS
WriteAlg class for the RootIOExample.
StatusCode initialize() override
Initialize.
StatusCode execute() override
Event callback.
KeyedContainer< MyTrack > MyTrackVector