Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:10

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4MAIN_PHG4PHENIXEVENTACTION_H
0004 #define G4MAIN_PHG4PHENIXEVENTACTION_H
0005 
0006 #include <phool/PHTimeServer.h>
0007 
0008 #include <Geant4/G4UserEventAction.hh>
0009 
0010 #include <list>
0011 
0012 class G4Event;
0013 class PHG4EventAction;
0014 
0015 class PHG4PhenixEventAction : public G4UserEventAction
0016 {
0017  public:
0018   PHG4PhenixEventAction(void);
0019 
0020   ~PHG4PhenixEventAction() override;
0021 
0022   //! register an action. This is called in PHG4Reco::Init based on which actions are found on the tree
0023   void AddAction(PHG4EventAction* action)
0024   {
0025     actions_.push_back(action);
0026   }
0027 
0028   void BeginOfEventAction(const G4Event*) override;
0029 
0030   void EndOfEventAction(const G4Event*) override;
0031 
0032  private:
0033   //! list of subsystem specific Event actions
0034   typedef std::list<PHG4EventAction*> ActionList;
0035   ActionList actions_;
0036 
0037   //! module timer.
0038   PHTimeServer::timer _timer;
0039 };
0040 
0041 #endif