LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ArtG4EventAction.cc
Go to the documentation of this file.
1 // ArtG4EventAction.cc provides implementation of Art G4's built-in event action.
2 
3 // Authors: Tasha Arvanitis, Adam Lyon
4 
5 // Date: July 2012
6 
10 
11 #include "Geant4/G4Event.hh"
12 
14  DetectorHolderService* detectorHolder)
15  : actionHolder_{actionHolder}, detectorHolder_{detectorHolder}
16 {}
17 
18 // Called at the beginning of each event. Pass the call on to action objects
19 void
21 {
22  actionHolder_->beginOfEventAction(currentEvent);
23 }
24 
25 // Called at the end of each event. Call detectors to convert hits for the
26 // event and pass the call on to the action objects.
27 void
28 artg4tk::ArtG4EventAction::EndOfEventAction(const G4Event* currentEvent)
29 {
30  detectorHolder_->fillEventWithArtHits(currentEvent->GetHCofThisEvent());
31  actionHolder_->endOfEventAction(currentEvent);
32 }
void EndOfEventAction(const G4Event *currentEvent) override
void endOfEventAction(const G4Event *)
ActionHolderService * actionHolder_
ArtG4EventAction(ActionHolderService *actionHolder, DetectorHolderService *detectorHolder)
DetectorHolderService * detectorHolder_
void beginOfEventAction(const G4Event *)
void fillEventWithArtHits(G4HCofThisEvent *hc)
void BeginOfEventAction(const G4Event *currentEvent) override