GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4EventSource.h
Go to the documentation of this file.
1 // $Id: TGo4EventSource.h 2627 2019-10-01 08:02:45Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4EVENTSOURCE_H
15 #define TGO4EVENTSOURCE_H
16 
17 #include "TNamed.h"
18 
27 class TGo4EventElement;
28 
29 class TGo4EventSource : public TNamed {
30  public:
31 
32  TGo4EventSource(const char* name);
33 
34  virtual ~TGo4EventSource();
35 
37 
38  /* We overwrite the default TNamed::Clear that would
39  * erase our name and title!
40  * Implement this method in your parameter class
41  * if you would like to reset any values with the
42  * eraser button in the gui remote browser*/
43  virtual void Clear(Option_t* opt="");
44 
46  Int_t GetCreateStatus() const { return fiCreateStatus; }
47 
49  Int_t GetEventStatus() const { return fiEventStatus; }
50 
52  const char* GetErrMess() const { return fxErrMess.Data(); }
53 
56  virtual const char* GetActiveName();
57 
59  virtual Bool_t CheckEventClass(TClass* cl);
60 
62  virtual Bool_t BuildEvent(TGo4EventElement* dest) { return kTRUE; }
63 
65  static const Int_t fgiTIMEOUTDEFAULT;
66 
67 
68  protected:
73  void SetErrMess(const char* txt) { fxErrMess = txt; }
74 
76  void SetEventStatus(Int_t status) { fiEventStatus=status; }
77 
79  void SetCreateStatus(Int_t status) { fiCreateStatus=status; }
80 
82  void ThrowError(Int_t creastat, Int_t errstat, const char* message,...);
83 
85  void ThrowEOF(Int_t creastat, Int_t errstat, const char* message,...);
86 
88  enum { fguTXTLEN = 256 };
89 
90  private:
91 
94 
97 
99  TString fxErrMess;
100 
101  ClassDef(TGo4EventSource,1)
102 };
103 
104 #endif //TGO4EVENTSOURCE_H
void ThrowEOF(Int_t creastat, Int_t errstat, const char *message,...)
virtual ~TGo4EventSource()
virtual Bool_t CheckEventClass(TClass *cl)
void SetCreateStatus(Int_t status)
const char * GetErrMess() const
void ThrowError(Int_t creastat, Int_t errstat, const char *message,...)
void SetErrMess(const char *txt)
Int_t GetCreateStatus() const
virtual Bool_t BuildEvent(TGo4EventElement *dest)
virtual const char * GetActiveName()
static const Int_t fgiTIMEOUTDEFAULT
Int_t GetEventStatus() const
void SetEventStatus(Int_t status)
virtual void Clear(Option_t *opt="")