14 #ifndef DD4HEP_DDG4_GEANT4OUTPUTACTION_H
15 #define DD4HEP_DDG4_GEANT4OUTPUTACTION_H
30 namespace Simulation {
33 class Geant4ParticleMap;
51 template <
typename U> U*
data()
const {
71 virtual void begin(
const G4Event* event);
73 virtual void end(
const G4Event* event);
75 virtual void beginRun(
const G4Run* run);
77 virtual void endRun(
const G4Run* run);
80 virtual void saveRun(
const G4Run* run);
91 #endif // DD4HEP_DDG4_GEANT4OUTPUTACTION_H
OutputContext(const T *c)
virtual void saveRun(const G4Run *run)
Callback to store the Geant4 event.
virtual void configureFiber(Geant4Context *ctxt)
Set or update client for the use in a new thread fiber.
virtual void end(const G4Event *event)
End-of-event callback.
virtual void saveEvent(OutputContext< G4Event > &ctxt)
Callback to store the Geant4 event.
virtual void begin(const G4Event *event)
begin-of-event callback
virtual void commit(OutputContext< G4Event > &ctxt)
Commit data at end of filling procedure.
Geant4OutputAction(Geant4Context *c, const std::string &nam)
Standard constructor.
Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference.
Concrete basic implementation of the Geant4 event action.
virtual ~Geant4OutputAction()
Default destructor.
Geant4ParticleMap * m_truth
Reference to MC truth object.
Data structure to map particles produced during the generation and the simulation.
virtual void beginRun(const G4Run *run)
Callback to initialize storing the Geant4 information.
virtual void saveCollection(OutputContext< G4Event > &ctxt, G4VHitsCollection *collection)
Callback to store each Geant4 hit collection.
virtual void endRun(const G4Run *run)
Callback to store the Geant4 run information.
Generic context to extend user, run and event information.
Helper class for thread savety.
bool m_errorFatal
Property: "HandleErrorsAsFatal" Handle errors as fatal and rethrow eventual exceptions.
Base class to output Geant4 event data to persistent media.
std::string m_output
Property: "Output" output destination.