ATLAS Offline Software
Loading...
Searching...
No Matches
ISF::ParticleKillerSimTool Class Reference

#include <ParticleKillerSimTool.h>

Inheritance diagram for ISF::ParticleKillerSimTool:
Collaboration diagram for ISF::ParticleKillerSimTool:

Public Member Functions

 ParticleKillerSimTool (const std::string &type, const std::string &name, const IInterface *parent)
 ~ParticleKillerSimTool ()
virtual StatusCode initialize () override
virtual StatusCode simulate (const EventContext &ctx, ISFParticle &isp, ISFParticleContainer &, McEventCollection *) override
virtual StatusCode simulateVector (const EventContext &ctx, const ISFParticleVector &particles, ISFParticleContainer &, McEventCollection *, McEventCollection *) override
 Simulation call for vectors of particles.
virtual StatusCode setupEvent (const EventContext &) override
 Setup Event chain - in case of a begin-of event action is needed.
virtual StatusCode releaseEvent (const EventContext &) override
 Release Event chain - in case of an end-of event action is needed.
virtual ISF::SimulationFlavor simFlavor () const override
virtual StatusCode sysInitialize () override
 Gaudi sysInitialize() methods.
virtual StatusCode setupEventST () override
 Setup Event chain - in case of a begin-of event action is needed (called by ISimulationSvc)
virtual StatusCode releaseEventST () override
 Release Event chain - in case of an end-of event action is needed (called by ISimulationSvc)
const ChronoEntity * chronoStart (const IChronoSvc::ChronoTag &tag)
 wrapper call to start chrono with given tag
const ChronoEntity * chronoStop (const IChronoSvc::ChronoTag &tag)
 wrapper call to stop chrono with given tag

Protected Attributes

ServiceHandle< IChronoStatSvc > m_chrono {this, "ChronoStatService", "ChronoStatSvc"}
 The timing service for general usage.

Detailed Description

Definition at line 22 of file ParticleKillerSimTool.h.

Constructor & Destructor Documentation

◆ ParticleKillerSimTool()

ISF::ParticleKillerSimTool::ParticleKillerSimTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 7 of file ParticleKillerSimTool.cxx.

8 : BaseSimulatorTool(type, name, parent)
9{
10}
BaseSimulatorTool()
Default constructor.

◆ ~ParticleKillerSimTool()

ISF::ParticleKillerSimTool::~ParticleKillerSimTool ( )

Definition at line 12 of file ParticleKillerSimTool.cxx.

12 {
13
14}

Member Function Documentation

◆ chronoStart()

const ChronoEntity * ISF::BaseSimulatorTool::chronoStart ( const IChronoSvc::ChronoTag & tag)
inlineinherited

wrapper call to start chrono with given tag

Definition at line 98 of file BaseSimulatorTool.h.

98 {
99 if (m_chrono) return m_chrono->chronoStart( tag);
100 return nullptr;
101 }
ServiceHandle< IChronoStatSvc > m_chrono
The timing service for general usage.

◆ chronoStop()

const ChronoEntity * ISF::BaseSimulatorTool::chronoStop ( const IChronoSvc::ChronoTag & tag)
inlineinherited

wrapper call to stop chrono with given tag

Definition at line 104 of file BaseSimulatorTool.h.

104 {
105 if (m_chrono) return m_chrono->chronoStop( tag);
106 return nullptr;
107 }

◆ initialize()

StatusCode ISF::ParticleKillerSimTool::initialize ( )
overridevirtual

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 16 of file ParticleKillerSimTool.cxx.

16 {
17 return StatusCode::SUCCESS;
18}

◆ releaseEvent()

virtual StatusCode ISF::ParticleKillerSimTool::releaseEvent ( const EventContext & )
inlineoverridevirtual

Release Event chain - in case of an end-of event action is needed.

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 37 of file ParticleKillerSimTool.h.

37{ return StatusCode::SUCCESS; };

◆ releaseEventST()

virtual StatusCode ISF::BaseSimulatorTool::releaseEventST ( )
inlineoverridevirtualinherited

Release Event chain - in case of an end-of event action is needed (called by ISimulationSvc)

Reimplemented in ISF::BaseSimulatorG4Tool, and ISF::FastCaloSimV2Tool.

Definition at line 94 of file BaseSimulatorTool.h.

95 { return releaseEvent(Gaudi::Hive::currentContext()); }
virtual StatusCode releaseEvent(const EventContext &) override
Release Event chain - in case of an end-of event action is needed.

◆ setupEvent()

virtual StatusCode ISF::ParticleKillerSimTool::setupEvent ( const EventContext & )
inlineoverridevirtual

Setup Event chain - in case of a begin-of event action is needed.

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 35 of file ParticleKillerSimTool.h.

35{ return StatusCode::SUCCESS; };

◆ setupEventST()

virtual StatusCode ISF::BaseSimulatorTool::setupEventST ( )
inlineoverridevirtualinherited

Setup Event chain - in case of a begin-of event action is needed (called by ISimulationSvc)

Reimplemented in ISF::BaseSimulatorG4Tool, and ISF::FastCaloSimV2Tool.

Definition at line 67 of file BaseSimulatorTool.h.

68 { return setupEvent(Gaudi::Hive::currentContext()); }
virtual StatusCode setupEvent(const EventContext &) override
Setup Event chain - in case of a begin-of event action is needed.

◆ simFlavor()

virtual ISF::SimulationFlavor ISF::ParticleKillerSimTool::simFlavor ( ) const
inlineoverridevirtual

Definition at line 39 of file ParticleKillerSimTool.h.

39{ return ISF::ParticleKiller; };
@ ParticleKiller

◆ simulate()

StatusCode ISF::ParticleKillerSimTool::simulate ( const EventContext & ctx,
ISFParticle & isp,
ISFParticleContainer & ,
McEventCollection *  )
overridevirtual

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 20 of file ParticleKillerSimTool.cxx.

20 {
21
22 // give a screen output that you entered ParticleKillerSimSvc
23 ATH_MSG_VERBOSE( "Particle '" << isp << "' received for simulation." );
24 ATH_MSG_VERBOSE( "Killing this particle, since this"
25 << "is the soul purpose of this 'simulation engine'." );
26
27 // particle 'simulation' done
28 // (memory management, ie delete, of the ISFParticle is done inside the ISFKernel)
29 return StatusCode::SUCCESS;
30}
#define ATH_MSG_VERBOSE(x)

◆ simulateVector()

StatusCode ISF::ParticleKillerSimTool::simulateVector ( const EventContext & ctx,
const ISFParticleVector & particles,
ISFParticleContainer & secondaries,
McEventCollection * mcEventCollection,
McEventCollection *  )
overridevirtual

Simulation call for vectors of particles.

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 32 of file ParticleKillerSimTool.cxx.

32 {
33 for (auto isp : particles) {
34 ATH_CHECK(simulate(ctx, *isp, secondaries, mcEventCollection));
35 }
36 return StatusCode::SUCCESS;
37}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode simulate(const EventContext &ctx, ISFParticle &isp, ISFParticleContainer &, McEventCollection *) override

◆ sysInitialize()

virtual StatusCode ISF::BaseSimulatorTool::sysInitialize ( )
inlineoverridevirtualinherited

Gaudi sysInitialize() methods.

Definition at line 49 of file BaseSimulatorTool.h.

50 {
52 ATH_CHECK( m_chrono.retrieve() );
53 return StatusCode::SUCCESS;
54 }
virtual StatusCode sysInitialize() override

Member Data Documentation

◆ m_chrono

ServiceHandle<IChronoStatSvc> ISF::BaseSimulatorTool::m_chrono {this, "ChronoStatService", "ChronoStatSvc"}
protectedinherited

The timing service for general usage.

Definition at line 115 of file BaseSimulatorTool.h.

115{this, "ChronoStatService", "ChronoStatSvc"};

The documentation for this class was generated from the following files: