ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TBranchRef.h
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Rene Brun 19/08/2004
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TBranchRef
13 #define ROOT_TBranchRef
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TBranchRef //
19 // //
20 // A Branch to support referenced objects on other branches //
21 //////////////////////////////////////////////////////////////////////////
22 
23 
24 #ifndef ROOT_TBranch
25 #include "TBranch.h"
26 #endif
27 #ifndef ROOT_TRefTable
28 #include "TRefTable.h"
29 #endif
30 
31 class TTree;
32 
33 class TBranchRef : public TBranch {
34 private:
35  Long64_t fRequestedEntry; //! Cursor indicating which entry is being requested.
36 
37 protected:
38  TRefTable *fRefTable; // pointer to the TRefTable
39 
40  void ReadLeavesImpl(TBuffer &b);
41  void FillLeavesImpl(TBuffer &b);
42 
43 public:
44  TBranchRef();
46  virtual ~TBranchRef();
47  virtual void Clear(Option_t *option="");
48  virtual Int_t Fill();
49  TRefTable *GetRefTable() const {return fRefTable;}
50  virtual Bool_t Notify();
51  virtual void Print(Option_t *option="") const;
52  virtual void Reset(Option_t *option="");
53  virtual void ResetAfterMerge(TFileMergeInfo *);
54  virtual Int_t SetParent(const TObject* obj, Int_t branchID);
56 
57  ClassDef(TBranchRef,1); //to support referenced objects on other branches
58 };
59 
60 #endif
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch after a Merge operation (drop data but keep customizations) TRefTable is cleared...
Definition: TBranchRef.cxx:196
long long Long64_t
Definition: RtypesCore.h:69
const char Option_t
Definition: RtypesCore.h:62
void ReadLeavesImpl(TBuffer &b)
This function called by TBranch::GetEntry overloads TBranch::ReadLeaves.
Definition: TBranchRef.cxx:165
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
TRefTable * GetRefTable() const
Definition: TBranchRef.h:49
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t Notify()
This function is called by TRefTable::Notify, itself called by TRef::GetObject.
Definition: TBranchRef.cxx:113
virtual ~TBranchRef()
Typical destructor.
Definition: TBranchRef.cxx:85
virtual void Reset(Option_t *option="")
Definition: TBranchRef.cxx:185
A branch containing and managing a TRefTable for TRef autoloading.
Definition: TBranchRef.h:33
void FillLeavesImpl(TBuffer &b)
This function called by TBranch::Fill overloads TBranch::FillLeaves.
Definition: TBranchRef.cxx:174
Long64_t fRequestedEntry
Definition: TBranchRef.h:35
Long64_t entry
virtual void SetRequestedEntry(Long64_t entry)
Definition: TBranchRef.h:55
virtual Int_t Fill()
Fill the branch basket with the referenced objects parent numbers.
Definition: TBranchRef.cxx:101
tuple tree
Definition: tree.py:24
TRefTable * fRefTable
Cursor indicating which entry is being requested.
Definition: TBranchRef.h:38
virtual void Clear(Option_t *option="")
Clear entries in the TRefTable.
Definition: TBranchRef.cxx:93
A TRefTable maintains the association between a referenced object and the parent object supporting th...
Definition: TRefTable.h:37
virtual Int_t SetParent(const TObject *obj, Int_t branchID)
Set the current parent branch.
Definition: TBranchRef.cxx:210
Mother of all ROOT objects.
Definition: TObject.h:58
ClassDef(TBranchRef, 1)
A TTree object has a header with a name and a title.
Definition: TTree.h:98
A TTree is a list of TBranches.
Definition: TBranch.h:58
TObject * obj
virtual void Print(Option_t *option="") const
Print the TRefTable branch.
Definition: TBranchRef.cxx:157