EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eASTUserActionDispatcher.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file eASTUserActionDispatcher.cc
1 // ********************************************************************
2 //
3 // eASTUserActionDispatcher.cc
4 // store component-specific user actions
5 // Please note that this class does not handle the following actions
6 // - G4UserPrimaryGeneratorAction
7 // - G4UserSteppingAction
8 //
9 // History
10 // May 8th, 2021 : first implementation
11 //
12 // ********************************************************************
13 
15 #include "G4UserRunAction.hh"
16 #include "G4UserEventAction.hh"
17 #include "G4UserStackingAction.hh"
18 #include "G4UserTrackingAction.hh"
19 
22 {
23  if(instance==nullptr)
25  return instance;
26 }
27 
29 {
30  for(auto ua : *fpRunActions)
31  { delete ua.second; }
32  fpRunActions->clear();
33  delete fpRunActions;
34  for(auto ua : *fpEventActions)
35  { delete ua.second; }
36  fpEventActions->clear();
37  delete fpEventActions;
38  for(auto ua : *fpStackingActions)
39  { delete ua.second; }
40  fpStackingActions->clear();
41  delete fpStackingActions;
42  for(auto ua : *fpTrackingActions)
43  { delete ua.second; }
44  fpTrackingActions->clear();
45  delete fpTrackingActions;
46  instance = nullptr;
47 }
48 
49 
50