EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eASTEventAction.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file eASTEventAction.cc
1 // ********************************************************************
2 //
3 // eASTEventAction.cc
4 // Header file of eAST Event Action class
5 //
6 // History
7 // May 8th, 2021 : first implementation
8 //
9 // ********************************************************************
10 
11 #include "eASTEventAction.hh"
13 #include "globals.hh"
14 #include "G4Event.hh"
15 
17 {;}
18 
20 {;}
21 
22 void eASTEventAction::BeginOfEventAction(const G4Event* evt)
23 {
24  auto eventActions = eASTUserActionDispatcher::Instance()->GetEventActions();
25  if((eventActions!=nullptr) && !(eventActions->empty()))
26  {
27  for(auto ua : *eventActions)
28  { ua.second->BeginOfEventAction(evt); }
29  }
30 }
31 
32 void eASTEventAction::EndOfEventAction(const G4Event* evt)
33 {
34  auto eventActions = eASTUserActionDispatcher::Instance()->GetEventActions();
35  if((eventActions!=nullptr) && !(eventActions->empty()))
36  {
37  for(auto ua : *eventActions)
38  { ua.second->EndOfEventAction(evt); }
39  }
40 }
41