1#ifndef SIMG4COMPONENTS_G4SAVECALHITS_H
2#define SIMG4COMPONENTS_G4SAVECALHITS_H
9#include "GaudiKernel/AlgTool.h"
12#include "k4FWCore/DataHandle.h"
13#include "k4Interface/IGeoSvc.h"
17#include "edm4hep/Constants.h"
18#include "edm4hep/SimCalorimeterHitCollection.h"
46 explicit SimG4SaveCalHits(
const std::string& aType,
const std::string& aName,
const IInterface* aParent);
61 virtual StatusCode
saveOutput(
const G4Event& aEvent)
final;
67 mutable k4FWCore::DataHandle<edm4hep::SimCalorimeterHitCollection>
m_caloHits{
"CaloHits", Gaudi::DataHandle::Writer,
71 this,
"readoutNames", {},
"[Deprecated] Names of the readouts (hits collections) to save"};
73 Gaudi::Property<std::string>
m_readoutName{
this,
"readoutName", {},
"Name of the readout (hits collection) to save"};
SimG4SaveCalHits(const std::string &aType, const std::string &aName, const IInterface *aParent)
Definition SimG4SaveCalHits.cpp:25
Gaudi::Property< std::vector< std::string > > m_readoutNames
Name of the readouts (hits collections) to save, deprecated.
Definition SimG4SaveCalHits.h:70
virtual ~SimG4SaveCalHits()
Definition SimG4SaveCalHits.cpp:32
virtual StatusCode finalize()
Finalize.
Definition SimG4SaveCalHits.cpp:95
virtual StatusCode initialize()
Initialize.
Definition SimG4SaveCalHits.cpp:34
virtual StatusCode saveOutput(const G4Event &aEvent) final
Save the data output.
Definition SimG4SaveCalHits.cpp:97
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition SimG4SaveCalHits.h:65
Gaudi::Property< std::string > m_readoutName
Name of the readout (hits collection) to save.
Definition SimG4SaveCalHits.h:73
k4FWCore::DataHandle< edm4hep::SimCalorimeterHitCollection > m_caloHits
Output handle for calo hits.
Definition SimG4SaveCalHits.h:67