00001 // $Id: TGo4EventSource.h 567 2010-02-05 13:47:40Z 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 TGO4EVENTSOURCE_H 00015 #define TGO4EVENTSOURCE_H 00016 00017 #include "TNamed.h" 00018 00027 class TGo4EventElement; 00028 00029 class TGo4EventSource : public TNamed { 00030 public: 00031 00032 TGo4EventSource(const char* name); 00033 00034 virtual ~TGo4EventSource(); 00035 00036 TGo4EventSource(); 00037 00038 /* We overwrite the default TNamed::Clear that would 00039 * erase our name and title! 00040 * Implement this method in your parameter class 00041 * if you would like to reset any values with the 00042 * eraser button in the gui remote browser*/ 00043 virtual void Clear(Option_t* opt=""); 00044 00046 Int_t GetCreateStatus() const { return fiCreateStatus; } 00047 00049 Int_t GetEventStatus() const { return fiEventStatus; } 00050 00052 const char* GetErrMess() const { return fxErrMess.Data(); } 00053 00056 virtual const char* GetActiveName(); 00057 00059 virtual Bool_t CheckEventClass(TClass* cl); 00060 00062 virtual Bool_t BuildEvent(TGo4EventElement* dest) { return kTRUE; } 00063 00065 static const Int_t fgiTIMEOUTDEFAULT; 00066 00067 00068 protected: 00073 void SetErrMess(const char* txt) { fxErrMess = txt; } 00074 00076 void SetEventStatus(Int_t status) { fiEventStatus=status; } 00077 00079 void SetCreateStatus(Int_t status) { fiCreateStatus=status; } 00080 00082 void ThrowError(Int_t creastat, Int_t errstat, const char* message,...); 00083 00085 void ThrowEOF(Int_t creastat, Int_t errstat, const char* message,...); 00086 00088 enum { fguTXTLEN = 256 }; 00089 00090 private: 00091 00093 Int_t fiCreateStatus; 00094 00096 Int_t fiEventStatus; 00097 00099 TString fxErrMess; 00100 00101 ClassDef(TGo4EventSource,1) 00102 }; 00103 00104 #endif //TGO4EVENTSOURCE_H