ATLAS Offline Software
Loading...
Searching...
No Matches
SDWrapper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_FASTCALOSIMSD_SDWRAPPER_H
6#define ISF_FASTCALOSIMSD_SDWRAPPER_H
7
8// System includes
9#include <memory>
10#include <string>
11#include <vector>
12
13// External includes
14#include "G4VSensitiveDetector.hh"
15
16// Framework includes
18
19// Forward declarations
20class FCS_StepInfoSD;
23}
24namespace FCS_Param {
25
26namespace detail {
27
46template <class SDType, class HitContainerType>
47class SDWrapper : public G4VSensitiveDetector {
48
49 public:
51 using SDList_t = std::vector<SDType*>;
52
54 SDWrapper(const std::string& name, const std::string& hitCollectionName);
55
57 void addSD(SDType* sd);
58
60 virtual void Initialize(G4HCofThisEvent*) override final;
61
63 virtual bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
64
67
68 private:
70 std::string m_hitCollName;
71
74
77
78}; // class SDWrapper
79
80} // namespace detail
81
86
87} // namespace FCS_Param
88
89#endif
Handle class for recording to StoreGate.
A template class which wraps multiple sensitive detectors.
Definition SDWrapper.h:47
virtual bool ProcessHits(G4Step *, G4TouchableHistory *) override final
This method should not be called. It will throw.
Definition SDWrapper.cxx:58
virtual void Initialize(G4HCofThisEvent *) override final
Beginning of G4 event; initialize the hit collection.
Definition SDWrapper.cxx:44
SDWrapper(const std::string &name, const std::string &hitCollectionName)
Construct the wrapper from the output collection name.
Definition SDWrapper.cxx:26
void EndOfAthenaEvent()
Gather the hits into the WriteHandle from all the SDs.
Definition SDWrapper.cxx:70
void addSD(SDType *sd)
Add an SD to this wrapper.
Definition SDWrapper.cxx:36
SG::WriteHandle< ISF_FCS_Parametrization::FCS_StepInfoCollection > m_hitColl
Definition SDWrapper.h:73
Common sensitive detector class for LAr systems.
Class for collection of StepInfo class (G4 hits) copied and modified version to ISF.
detail::SDWrapper< FCS_StepInfoSD, ISF_FCS_Parametrization::FCS_StepInfoCollection > FCS_StepInfoSDWrapper
Template instantiation for LArG4SimpleSD.
Definition SDWrapper.h:83