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