ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
ISF::BaseSimulatorTool Class Reference

#include <BaseSimulatorTool.h>

Inheritance diagram for ISF::BaseSimulatorTool:
Collaboration diagram for ISF::BaseSimulatorTool:

Public Member Functions

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

Protected Attributes

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

Private Member Functions

 BaseSimulatorTool ()
 Default constructor. More...
 

Detailed Description

Concrete base class for all simulator Tools

Definition at line 36 of file BaseSimulatorTool.h.

Constructor & Destructor Documentation

◆ BaseSimulatorTool() [1/2]

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

Definition at line 40 of file BaseSimulatorTool.h.

41  : base_class(type, name, parent)
42  {
43  }

◆ ~BaseSimulatorTool()

virtual ISF::BaseSimulatorTool::~BaseSimulatorTool ( )
inlinevirtual

Destructor.

Definition at line 46 of file BaseSimulatorTool.h.

46 {}

◆ BaseSimulatorTool() [2/2]

ISF::BaseSimulatorTool::BaseSimulatorTool ( )
private

Default constructor.

Member Function Documentation

◆ chronoStart()

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

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  }

◆ chronoStop()

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

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()

virtual StatusCode ISF::BaseSimulatorTool::initialize ( )
inlineoverridevirtual

Reimplemented in iGeant4::G4TransportTool, iGeant4::G4LegacyTransportTool, ISF::FastCaloSimV2Tool, ISF::ActsFatrasSimTool, ISF::ParticleKillerSimTool, and ISF::FatrasSimTool.

Definition at line 57 of file BaseSimulatorTool.h.

58  {
59  return StatusCode::SUCCESS;
60  }

◆ releaseEvent()

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

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

Reimplemented in ISF::FastCaloSimV2Tool, ISF::ActsFatrasSimTool, iGeant4::G4TransportTool, iGeant4::G4LegacyTransportTool, ISF::ParticleKillerSimTool, and ISF::FatrasSimTool.

Definition at line 90 of file BaseSimulatorTool.h.

91  { return StatusCode::FAILURE; }

◆ releaseEventST()

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

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

Reimplemented in ISF::FastCaloSimV2Tool.

Definition at line 94 of file BaseSimulatorTool.h.

95  { return releaseEvent(Gaudi::Hive::currentContext()); }

◆ setupEvent()

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

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

Reimplemented in ISF::FastCaloSimV2Tool, ISF::ActsFatrasSimTool, iGeant4::G4TransportTool, iGeant4::G4LegacyTransportTool, ISF::ParticleKillerSimTool, and ISF::FatrasSimTool.

Definition at line 63 of file BaseSimulatorTool.h.

64  { return StatusCode::FAILURE; }

◆ setupEventST()

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

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

Reimplemented in ISF::FastCaloSimV2Tool.

Definition at line 67 of file BaseSimulatorTool.h.

68  { return setupEvent(Gaudi::Hive::currentContext()); }

◆ simulate()

virtual StatusCode ISF::BaseSimulatorTool::simulate ( const EventContext &  ,
ISFParticle ,
ISFParticleContainer ,
McEventCollection  
)
inlineoverridevirtual

◆ simulateVector()

virtual StatusCode ISF::BaseSimulatorTool::simulateVector ( const EventContext &  ctx,
const ISFParticleVector particles,
ISFParticleContainer secondaries,
McEventCollection mcEventCollection,
McEventCollection  
)
inlineoverridevirtual

Simulation call for vectors of particles.

Reimplemented in ISF::ActsFatrasSimTool, ISF::ParticleKillerSimTool, iGeant4::G4TransportTool, and iGeant4::G4LegacyTransportTool.

Definition at line 75 of file BaseSimulatorTool.h.

76  {
77  // this implementation is a wrapper in case the simulator does
78  // implement particle-vector input
79 
80  // simulate each particle individually
81  for (auto* cisp : particles) {
82  ATH_MSG_VERBOSE( "Starting simulation of particle: " << (*cisp) );
83  ATH_CHECK(this->simulate(ctx, *cisp, secondaries, mcEventCollection));
84  }
85  return StatusCode::SUCCESS;
86 
87  }

◆ sysInitialize()

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

Gaudi sysInitialize() methods.

Definition at line 49 of file BaseSimulatorTool.h.

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

Member Data Documentation

◆ m_chrono

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

The timing service for general usage.

Definition at line 115 of file BaseSimulatorTool.h.


The documentation for this class was generated from the following file:
ISF::BaseSimulatorTool::releaseEvent
virtual StatusCode releaseEvent(const EventContext &) override
Release Event chain - in case of an end-of event action is needed.
Definition: BaseSimulatorTool.h:90
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ISF::BaseSimulatorTool::m_chrono
ServiceHandle< IChronoStatSvc > m_chrono
The timing service for general usage.
Definition: BaseSimulatorTool.h:115
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize
virtual StatusCode sysInitialize() override
Perform system initialization for an algorithm.
ISF::BaseSimulatorTool::setupEvent
virtual StatusCode setupEvent(const EventContext &) override
Setup Event chain - in case of a begin-of event action is needed.
Definition: BaseSimulatorTool.h:63
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
ISF::BaseSimulatorTool::simulate
virtual StatusCode simulate(const EventContext &, ISFParticle &, ISFParticleContainer &, McEventCollection *) override
Definition: BaseSimulatorTool.h:71
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24