00001 /* Generated by Together */ 00002 00003 #ifndef TCBMBEAMTIMEPROC_H 00004 #define TCBMBEAMTIMEPROC_H 00005 00006 00007 #include "TCBMBeamtimeEvent.h" 00008 #include "TObjArray.h" 00009 #include "TIterator.h" 00010 00011 #include "TGo4UserException.h" 00012 #include "TGo4MbsEvent.h" 00013 #include "TGo4Version.h" 00014 00015 #include "TGo4EventProcessor.h" 00016 #include <TGo4EventProcessor.h> 00017 00018 class TGo4EventElement; 00019 class TGo4MbsSubEvent; 00020 class TCBMBeamtimeEvent; 00021 00022 00023 class TCBMBeamtimeProc : public TGo4EventProcessor { 00024 public: 00025 00026 TCBMBeamtimeProc(); 00027 00028 TCBMBeamtimeProc(const char* name); 00029 00030 virtual ~TCBMBeamtimeProc(); 00031 00032 /* Can be overwritten by subclass, but is not recommended! use ProcessEvent or ProcessSubevent instead*/ 00033 virtual Bool_t BuildEvent(TGo4EventElement*); 00034 00035 /* implemented by subclass to assign correct event structures*/ 00036 virtual void InitEvent(TGo4EventElement*) {} 00037 00038 /* implemented by subclass to do actual processing. For second step processors!*/ 00039 virtual void FinalizeEvent() {} 00040 00041 /* implemented by subclass to process incoming subevent. For first step processors only! */ 00042 virtual void ProcessSubevent(TGo4MbsSubEvent* subevt); 00043 00045 Short_t GetTriggerNumber() const { return fMbsTriggerNumber; } 00046 00048 Int_t GetEventNumber() const { return fMbsEventNumber; } 00049 00050 00052 #if __GO4BUILDVERSION__ < 40504 00053 Long_t ExecuteScript(const char* script_name); 00054 #endif 00055 00056 protected: 00057 00058 void AddSubProcessor(TCBMBeamtimeProc * ); 00059 00060 TCBMBeamtimeEvent *fBeamtimeEvent; 00061 TGo4MbsEvent *fMbsInput; 00062 Short_t fMbsTriggerNumber; 00063 Int_t fMbsEventNumber; 00064 00065 private: 00066 TObjArray* fSubProcessors; 00067 TIterator* fProcIterator; 00068 00069 ClassDef(TCBMBeamtimeProc,1) 00070 }; 00071 00072 #endif 00073