LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ArtG4EventAction.hh
Go to the documentation of this file.
1 // ArtG4EventAction.hh provides declarations for the built-in event action for
2 // the Art G4 simulation. In both BeginOfEventAction and EndOfEventAction, it
3 // gets the collection of action objects registered for the current job and
4 // calls their Begin/EndOfEventAction methods. In EndOfEventAction, it also
5 // gets the collection of registered detector components and calls their
6 // hit conversion methods.
7 
8 #ifndef artg4tk_geantInit_ArtG4EventAction_hh
9 #define artg4tk_geantInit_ArtG4EventAction_hh
10 
11 #include "Geant4/G4UserEventAction.hh"
12 
13 namespace artg4tk {
14 
15  class ActionHolderService;
16  class DetectorHolderService;
17 
18  class ArtG4EventAction : public G4UserEventAction {
19  public:
20  ArtG4EventAction(ActionHolderService* actionHolder, DetectorHolderService* detectorHolder);
21 
22  private:
23  // Called at the beginning of each event (note that this is after the
24  // primaries have been generated and sent to the event manager)
25  void BeginOfEventAction(const G4Event* currentEvent) override;
26 
27  // Called at the end of each event, right before GEANT's state switches
28  // out of event processing and into closed geometry (last chance to access
29  // the current event).
30  void EndOfEventAction(const G4Event* currentEvent) override;
31 
34  };
35 
36 }
37 
38 #endif /* artg4tk_geantInit_ArtG4EventAction_hh */
void EndOfEventAction(const G4Event *currentEvent) override
ActionHolderService * actionHolder_
ArtG4EventAction(ActionHolderService *actionHolder, DetectorHolderService *detectorHolder)
DetectorHolderService * detectorHolder_
void BeginOfEventAction(const G4Event *currentEvent) override