GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4EventElement.h
Go to the documentation of this file.
1 // $Id: TGo4EventElement.h 1488 2015-06-08 11:32:46Z 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 für 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 TGO4EVENTELEMENT_H
15 #define TGO4EVENTELEMENT_H
16 
17 #include "TNamed.h"
18 
19 class TGo4EventSource;
20 class TBranch;
21 class TTree;
22 
36 class TGo4EventElement : public TNamed {
37  public:
38 
40 
41  TGo4EventElement(const char* name);
42  TGo4EventElement(const char* aName, const char* aTitle, Short_t aBaseCat=0);
43 
44  virtual ~TGo4EventElement(void);
45 
47  void SetValid(Bool_t on) { fbIsValid = on; }
48 
50  Bool_t IsValid() const { return fbIsValid; }
51 
54 
56  void SetParent(TGo4EventElement * par) { fxParent = par; }
57 
58  void SetKeepContents(Bool_t on=kTRUE) { fbKeepContents = on; }
59 
60  inline TGo4EventElement* GetParent() const { return fxParent; }
61 
62  virtual TGo4EventElement* GetChild(const char* name);
63 
64  inline TGo4EventSource * GetEventSource() const { return fxEventSource; }
65 
70  Bool_t CheckEventSource(const char* classname);
71 
80  virtual Int_t Fill();
81 
85  virtual Int_t Init();
86 
88  virtual void PrintEvent();
89 
90  virtual void makeBranch(TBranch *parent) {}
91  virtual void deactivate();
92  virtual void activate();
93 
94  virtual void Clear(Option_t *t="");
95  virtual void clearAll(Int_t) {}
96  virtual Bool_t isComposed() { return kFALSE; }
97  virtual Short_t getId() { return fIdentifier; }
98  virtual void setDebug (Bool_t debug) { fDebug=debug; }
99  virtual TGo4EventElement& operator[](Int_t) { return *this; }
100 
101  virtual void Print(Option_t* option = "") const;
102 
104  virtual void synchronizeWithTree(TTree *tree, TGo4EventElement** var_ptr = 0);
105 
106  virtual Int_t activateBranch(TBranch *branch, Int_t index=0, TGo4EventElement** var_ptr = 0);
107 
108  virtual TTree* CreateSampleTree(TGo4EventElement** sample = 0);
109 
110  void ShowSampleTree();
111 
112  private:
113 
117  Bool_t fbIsValid;
118 
122 
130 
131  protected:
132  Short_t fIdentifier; // Identifier
133  Bool_t fDebug;
134 
136  Bool_t fbKeepContents;
137 
138  ClassDef(TGo4EventElement,3)
139 };
140 
141 #endif //TGO4EVENTELEMENT_H
virtual void makeBranch(TBranch *parent)
virtual TGo4EventElement * GetChild(const char *name)
void SetValid(Bool_t on)
TGo4EventSource * GetEventSource() const
virtual Bool_t isComposed()
virtual ~TGo4EventElement(void)
Bool_t IsValid() const
virtual void deactivate()
virtual void PrintEvent()
virtual Short_t getId()
Bool_t CheckEventSource(const char *classname)
virtual Int_t Fill()
virtual void Clear(Option_t *t="")
TGo4EventElement * fxParent
virtual TTree * CreateSampleTree(TGo4EventElement **sample=0)
virtual void setDebug(Bool_t debug)
TGo4EventElement * GetParent() const
void SetParent(TGo4EventElement *par)
virtual void synchronizeWithTree(TTree *tree, TGo4EventElement **var_ptr=0)
virtual TGo4EventElement & operator[](Int_t)
virtual Int_t Init()
virtual void clearAll(Int_t)
void SetEventSource(TGo4EventSource *src)
virtual void activate()
virtual void Print(Option_t *option="") const
Bool_t fbKeepContents
Debug level.
TGo4EventSource * fxEventSource
virtual Int_t activateBranch(TBranch *branch, Int_t index=0, TGo4EventElement **var_ptr=0)
void SetKeepContents(Bool_t on=kTRUE)