PandaRoot
TGo4EventElement.h
Go to the documentation of this file.
1 // $Id: TGo4EventElement.h 760 2011-06-22 12:03:48Z 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 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:
39 
40  TGo4EventElement(const char *name);
41  TGo4EventElement(const char *aName, const char *aTitle, Short_t aBaseCat = 0);
42 
43  virtual ~TGo4EventElement(void);
44 
46  void SetValid(Bool_t on) { fbIsValid = on; }
47 
49  Bool_t IsValid() const { return fbIsValid; }
50 
52  void SetEventSource(TGo4EventSource *src) { fxEventSource = src; }
53 
55  void SetParent(TGo4EventElement *par) { fxParent = par; }
56 
57  inline TGo4EventElement *GetParent() const { return fxParent; }
58 
59  inline TGo4EventSource *GetEventSource() const { return fxEventSource; }
60 
65  Bool_t CheckEventSource(const char *classname);
66 
75  virtual Int_t Fill();
76 
80  virtual Int_t Init();
81 
83  virtual void PrintEvent();
84 
85  virtual void makeBranch(TBranch *parent);
86  virtual void deactivate();
87  virtual void activate();
88 
89  virtual void Clear(Option_t *t = "");
90  virtual void clearAll(Int_t) {}
91  virtual Bool_t isComposed() { return kFALSE; }
92  virtual Short_t getId() { return fIdentifier; }
93  virtual void setDebug(Bool_t debug) { fDebug = debug; }
94  virtual TGo4EventElement &operator[](Int_t) { return *this; }
95 
96  virtual void Print(Option_t *option = "") const;
97 
99  virtual void synchronizeWithTree(TTree *tree, TGo4EventElement **var_ptr = nullptr);
100 
101  virtual Int_t activateBranch(TBranch *branch, Int_t index = 0, TGo4EventElement **var_ptr = 0);
102 
103  private:
106  Bool_t fbIsValid;
107 
110  TGo4EventElement *fxParent;
111 
118  TGo4EventSource *fxEventSource;
119 
120  protected:
121  Short_t fIdentifier; // Identifier
122  Bool_t fDebug;
123 
125 };
126 
127 #endif // TGO4EVENTELEMENT_H
virtual void makeBranch(TBranch *parent)
TGo4EventSource * GetEventSource() const
virtual Int_t activateBranch(TBranch *branch, Int_t index=0, TGo4EventElement **var_ptr=0)
virtual void Print(Option_t *option="") const
virtual void activate()
virtual void deactivate()
void SetValid(Bool_t on)
virtual Bool_t isComposed()
ClassDef(TGo4EventElement, 3)
Debug level.
virtual ~TGo4EventElement(void)
virtual Int_t Fill()
Bool_t IsValid() const
virtual Short_t getId()
Bool_t CheckEventSource(const char *classname)
virtual void PrintEvent()
virtual void Clear(Option_t *t="")
TGo4EventElement * GetParent() const
virtual void setDebug(Bool_t debug)
void SetParent(TGo4EventElement *par)
virtual TGo4EventElement & operator[](Int_t)
virtual void clearAll(Int_t)
void SetEventSource(TGo4EventSource *src)
virtual void synchronizeWithTree(TTree *tree, TGo4EventElement **var_ptr=nullptr)
virtual Int_t Init()