00001 // $Header: /cvs/lcd/slic/include/EventAction.hh,v 1.10 2007/04/27 01:54:32 jeremy Exp $ 00002 00003 #ifndef SLIC_EVENTACTION_HH 00004 #define SLIC_EVENTACTION_HH 1 00005 00006 // slic 00007 #include "Module.hh" 00008 00009 // LCDD 00010 #include "G4CalorimeterHit.hh" 00011 #include "G4TrackerHit.hh" 00012 00013 // G4 00014 #include "G4UserEventAction.hh" 00015 #include "G4Timer.hh" 00016 00017 class G4UImessenger; 00018 00019 namespace slic 00020 { 00021 00027 class EventAction : public G4UserEventAction, public Module 00028 { 00029 public: 00030 EventAction(); 00031 ~EventAction(); 00032 00033 public: 00034 00035 // virtuals from G4 00036 virtual void BeginOfEventAction (const G4Event *anEvent); 00037 virtual void EndOfEventAction (const G4Event *anEvent); 00038 00039 static EventAction* getEventAction(); 00040 00041 // event timing 00042 void enableEventTimer(bool et = true); 00043 void startEventTimer(); 00044 void stopEventTimer(); 00045 00046 private: 00047 00048 void printEndEventMessage(const G4Event *anEvent); 00049 00050 private: 00051 00052 bool m_enableEventTimer; 00053 mutable G4Timer m_eventTimer; 00054 00055 G4UImessenger* m_messenger; 00056 }; 00057 } 00058 00059 #endif
1.5.4