00001 // $Id: TGo4CompositeProcessor.h 835 2012-02-06 14:56:19Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef TGO4COMPOSITEPROCESSOR_H 00015 #define TGO4COMPOSITEPROCESSOR_H 00016 00017 #include "TGo4EventProcessor.h" 00018 00019 #include "TObjArray.h" 00020 00021 class TGo4MbsEvent; 00022 class TGo4MbsSubEvent; 00023 class TGo4CompositeEvent; 00024 class TIterator; 00025 00026 class TGo4CompositeProcessor : public TGo4EventProcessor { 00027 public: 00028 00029 TGo4CompositeProcessor(); 00030 00031 TGo4CompositeProcessor(const char* name); 00032 00033 virtual ~TGo4CompositeProcessor(); 00034 00035 /* Can be overwritten by subclass, but is not recommended! use ProcessEvent or ProcessSubevent instead*/ 00036 virtual Bool_t BuildEvent(TGo4EventElement*); 00037 00038 /* implemented by subclass to assign correct event structures*/ 00039 virtual void InitEvent(TGo4EventElement*) {} 00040 00041 /* implemented by subclass to do actual processing. For second step processors!*/ 00042 virtual void FinalizeEvent() {} 00043 00044 /* implemented by subclass to process incoming subevent. For first step processors only! */ 00045 virtual void ProcessSubevent(TGo4MbsSubEvent* subevt); 00046 00048 Short_t GetTriggerNumber() const { return fMbsTriggerNumber; } 00049 00051 Int_t GetEventNumber() const { return fMbsEventNumber; } 00052 00053 protected: 00054 00055 void AddSubProcessor(TGo4EventProcessor* ); 00056 00057 // TGo4CompositeEvent *fBeamtimeEvent; //! 00058 TGo4MbsEvent *fMbsInput; 00059 Short_t fMbsTriggerNumber; 00060 Int_t fMbsEventNumber; 00061 00062 private: 00063 TObjArray fSubProcessors; 00064 00065 ClassDef(TGo4CompositeProcessor,1) 00066 }; 00067 00068 #endif 00069