00001 // ===================================================================== 00024 // ===================================================================== 00025 #ifndef CLDAQ__TEVENTACTION_HH 00026 #define CLDAQ__TEVENTACTION_HH 00027 00028 #include "Tglobals.h" 00029 00030 class TEvent; 00031 class TReadoutList; 00032 class TRunManager; 00033 class TEventManager; 00034 class TReadoutBook; 00035 class TCrate; 00036 00037 00057 class TEventAction 00058 { 00059 00060 protected: 00061 TRunManager* theRunManager; 00062 TEventManager* theEventManager; 00063 TReadoutBook* theReadoutBook; 00064 TCrate* theCrate; 00065 00066 public: 00067 TEventAction(); 00068 virtual ~TEventAction(); 00069 00070 public: 00071 virtual TReadoutList* WaitEvent() = 0; 00072 00073 public: 00074 virtual Tvoid BeginOfEventAction( TEvent& anEvent ); 00075 virtual Tvoid EndOfEventAction( TEvent& anEvent ); 00076 00077 public: 00078 TRunManager* GetRunManager() const; 00079 TEventManager* GetEventManager() const; 00080 TReadoutBook* GetReadoutBook() const; 00081 TCrate* GetCrate() const; 00082 Tvoid SetRunManager( TRunManager* manager ); 00083 Tvoid SetEventManager( TEventManager* manager ); 00084 Tvoid SetReadoutBook( TReadoutBook* book ); 00085 Tvoid SetCrate( TCrate* crate ); 00086 00087 }; 00088 00089 inline TRunManager* TEventAction::GetRunManager() const 00090 { 00091 return theRunManager; 00092 } 00093 00094 inline TEventManager* TEventAction::GetEventManager() const 00095 { 00096 return theEventManager; 00097 } 00098 00099 inline TReadoutBook* TEventAction::GetReadoutBook() const 00100 { 00101 return theReadoutBook; 00102 } 00103 00104 inline TCrate* TEventAction::GetCrate() const 00105 { 00106 return theCrate; 00107 } 00108 00109 inline Tvoid TEventAction::SetRunManager( TRunManager* manager ) 00110 { 00111 theRunManager = manager; 00112 return; 00113 } 00114 00115 inline Tvoid TEventAction::SetEventManager( TEventManager* manager ) 00116 { 00117 theEventManager = manager; 00118 return; 00119 } 00120 00121 inline Tvoid TEventAction::SetReadoutBook( TReadoutBook* book ) 00122 { 00123 theReadoutBook = book; 00124 return; 00125 } 00126 00127 inline Tvoid TEventAction::SetCrate( TCrate* crate ) 00128 { 00129 theCrate = crate; 00130 return; 00131 } 00132 00133 #endif