FairRoot/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 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 
53  void SetEventSource(TGo4EventSource * src) { fxEventSource=src; }
54 
57 
58  inline TGo4EventElement* GetParent() const { return fxParent; }
59 
60  inline TGo4EventSource * GetEventSource() const { return fxEventSource; }
61 
66  Bool_t CheckEventSource(const char* classname);
67 
76  virtual Int_t Fill();
77 
81  virtual Int_t Init();
82 
84  virtual void PrintEvent();
85 
86  virtual void makeBranch(TBranch *parent);
87  virtual void deactivate();
88  virtual void activate();
89 
90  virtual void Clear(Option_t *t="");
91  virtual void clearAll(Int_t) {}
92  virtual Bool_t isComposed() { return kFALSE; }
93  virtual Short_t getId() { return fIdentifier;}
94  virtual void setDebug (Bool_t debug) { fDebug=debug;}
95  virtual TGo4EventElement& operator[](Int_t){ return *this; }
96 
97  virtual void Print(Option_t* option = "") const;
98 
100  virtual void synchronizeWithTree(TTree *tree, TGo4EventElement** var_ptr = 0);
101 
102  virtual Int_t activateBranch(TBranch *branch, Int_t index=0, TGo4EventElement** var_ptr = 0);
103 
104  private:
105 
109 
113 
120  TGo4EventSource * fxEventSource;
121 
122  protected:
123  Short_t fIdentifier; // Identifier
125 
126  ClassDef(TGo4EventElement,3)
127 };
128 
129 #endif //TGO4EVENTELEMENT_H
void SetValid(Bool_t on)
virtual void makeBranch(TBranch *parent)
TTree * tree
Definition: plot_dirc.C:12
TGo4EventSource * GetEventSource() const
virtual Bool_t isComposed()
virtual ~TGo4EventElement(void)
Double_t par[3]
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
TString name
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)
TTree * t
Definition: bump_analys.C:13
virtual void activate()
virtual void Print(Option_t *option="") const
TGo4EventSource * fxEventSource
virtual Int_t activateBranch(TBranch *branch, Int_t index=0, TGo4EventElement **var_ptr=0)