ATLAS Offline Software
|
A template class which wraps multiple sensitive detectors. More...
#include <SDWrapper.h>
Public Types | |
using | SDList_t = std::vector< std::unique_ptr< SDType > > |
Alias to the SD list type. More... | |
Public Member Functions | |
SDWrapper (const std::string &name, const std::string &hitCollectionName) | |
Construct the wrapper from the output collection name. More... | |
void | addSD (std::unique_ptr< SDType > sd) |
Add an SD to this wrapper. More... | |
virtual void | Initialize (G4HCofThisEvent *) override final |
Beginning of G4 event; initialize the hit collection. More... | |
virtual bool | ProcessHits (G4Step *, G4TouchableHistory *) override final |
This method should not be called. It will throw. More... | |
void | EndOfAthenaEvent () |
Gather the hits into the WriteHandle from all the SDs. More... | |
Private Attributes | |
std::string | m_hitCollName |
The hit container name. More... | |
SG::WriteHandle< HitContainerType > | m_hitColl |
The hit container handle. More... | |
SDList_t | m_sdList |
The list of sensitive detectors that I own and manage. More... | |
A template class which wraps multiple sensitive detectors.
Allows for SD tools to manage several SDs which collaborate to fill one hit container in a multi-threading-friendly way. The wrapper owns the WriteHandle for the hit container and gathers hits from each SD at the end of an event.
The inheritance from G4VSensitiveDetector is merely a trick so the SD tool can save this object in the SensitiveDetectorBase thread-local container. It also allows to create the hit container at the right time via the SD Initialize method invoked by Geant4.
Clients shouldn't use this generic template directly, but should use the explicitly allowed specializations given below.
Definition at line 50 of file Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimSD/src/SDWrapper.h.
using FCS_Param::detail::SDWrapper< SDType, HitContainerType >::SDList_t = std::vector< std::unique_ptr<SDType> > |
Alias to the SD list type.
Definition at line 56 of file Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimSD/src/SDWrapper.h.
FCS_Param::detail::SDWrapper< SDType, HitContainerType >::SDWrapper | ( | const std::string & | name, |
const std::string & | hitCollectionName | ||
) |
void FCS_Param::detail::SDWrapper< SDType, HitContainerType >::addSD | ( | std::unique_ptr< SDType > | sd | ) |
Add an SD to this wrapper.
Definition at line 39 of file SDWrapper.cxx.
void FCS_Param::detail::SDWrapper< SDType, HitContainerType >::EndOfAthenaEvent |
|
finaloverridevirtual |
|
finaloverridevirtual |
|
private |
The hit container handle.
Definition at line 79 of file Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimSD/src/SDWrapper.h.
|
private |
The hit container name.
Definition at line 76 of file Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimSD/src/SDWrapper.h.
|
private |
The list of sensitive detectors that I own and manage.
Definition at line 82 of file Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimSD/src/SDWrapper.h.