LDMX Software
EventAction.cxx
1
3
4/*~~~~~~~~~~~~~~~~*/
5/* C++ StdLib */
6/*~~~~~~~~~~~~~~~~*/
7#include <iostream>
8
9/*~~~~~~~~~~~~~*/
10/* SimCore */
11/*~~~~~~~~~~~~~*/
13#include "SimCore/RunManager.h"
14#include "SimCore/TrackMap.h"
15
16/*~~~~~~~~~~~~*/
17/* Geant4 */
18/*~~~~~~~~~~~~*/
19#include "G4Event.hh"
20#include "G4RunManager.hh"
21
22namespace simcore {
23namespace g4user {
24
25void EventAction::BeginOfEventAction(const G4Event* event) {
26 // Clear the global track map.
28
29 // Call user event actions
30 for (auto& eventAction : eventActions_) {
31 eventAction->BeginOfEventAction(event);
32 }
33}
34
35void EventAction::EndOfEventAction(const G4Event* event) {
36 // Call user event actions
37 for (auto& eventAction : eventActions_) {
38 eventAction->EndOfEventAction(event);
39 }
40}
41
42} // namespace g4user
43} // namespace simcore
Class which implements the Geant4 user event action.
Class providing a Geant4 run manager implementation.
Class which implements the user tracking action.
void clear()
Clear the internal maps.
Definition TrackMap.cxx:126
void BeginOfEventAction(const G4Event *event)
Implementation of begin of event hook.
void EndOfEventAction(const G4Event *event)
Implementation of end of event hook.
TrackMap & getTrackMap()
Get a handle to the current TrackMap for the event.
static TrackingAction * get()
Get a pointer to the current UserTrackingAction from the G4RunManager.
This namespace is meant to contain all the standard user actions that allow a Geant4 user to interfac...