Logo ROOT  
Reference Guide
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 #include "TBranch.h"
25 
26 #ifdef R__LESS_INCLUDES
27 class TRefTable;
28 #else
29 #include "TRefTable.h"
30 #endif
31 
32 class TTree;
33 
34 class TBranchRef : public TBranch {
35 private:
36  Long64_t fRequestedEntry; ///<! Cursor indicating which entry is being requested.
37 
38 protected:
39  TRefTable *fRefTable; ///< pointer to the TRefTable
40 
41  void ReadLeavesImpl(TBuffer &b);
42  void FillLeavesImpl(TBuffer &b);
43 
44 public:
45  TBranchRef();
47  virtual ~TBranchRef();
48  virtual void Clear(Option_t *option="");
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);
55  virtual void SetRequestedEntry(Long64_t entry) {fRequestedEntry = entry;}
56 
57 private:
59 
60  ClassDef(TBranchRef,1); //to support referenced objects on other branches
61 };
62 
63 #endif
TFileMergeInfo
Definition: TFileMergeInfo.h:42
TBranchRef::FillLeavesImpl
void FillLeavesImpl(TBuffer &b)
This function called by TBranch::Fill overloads TBranch::FillLeaves.
Definition: TBranchRef.cxx:176
TBranchRef::fRequestedEntry
Long64_t fRequestedEntry
! Cursor indicating which entry is being requested.
Definition: TBranchRef.h:36
tree
Definition: tree.py:1
TBranch.h
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TTree
Definition: TTree.h:79
TBranchRef::SetRequestedEntry
virtual void SetRequestedEntry(Long64_t entry)
Definition: TBranchRef.h:55
TBranchRef::SetParent
virtual Int_t SetParent(const TObject *obj, Int_t branchID)
Set the current parent branch.
Definition: TBranchRef.cxx:212
Int_t
int Int_t
Definition: RtypesCore.h:45
TBranchRef::fRefTable
TRefTable * fRefTable
pointer to the TRefTable
Definition: TBranchRef.h:39
TBranchRef::Clear
virtual void Clear(Option_t *option="")
Clear entries in the TRefTable.
Definition: TBranchRef.cxx:95
TBuffer
Definition: TBuffer.h:43
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
b
#define b(i)
Definition: RSha256.hxx:118
TBranch
Definition: TBranch.h:89
TRefTable.h
TBranchRef::GetRefTable
TRefTable * GetRefTable() const
Definition: TBranchRef.h:49
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TBranchRef::ResetAfterMerge
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch after a Merge operation (drop data but keep customizations) TRefTable is cleared.
Definition: TBranchRef.cxx:198
TBranchRef::ReadLeavesImpl
void ReadLeavesImpl(TBuffer &b)
This function called by TBranch::GetEntry overloads TBranch::ReadLeaves.
Definition: TBranchRef.cxx:167
TBranchRef::FillImpl
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Fill the branch basket with the referenced objects parent numbers.
Definition: TBranchRef.cxx:103
TBranchRef::Reset
virtual void Reset(Option_t *option="")
Definition: TBranchRef.cxx:187
TRefTable
Definition: TRefTable.h:35
TBranchRef::Print
virtual void Print(Option_t *option="") const
Print the TRefTable branch.
Definition: TBranchRef.cxx:159
TBranchRef::Notify
virtual Bool_t Notify()
This function is called by TRefTable::Notify, itself called by TRef::GetObject.
Definition: TBranchRef.cxx:115
TBranchRef::TBranchRef
TBranchRef()
Default constructor.
Definition: TBranchRef.cxx:46
ROOT::Internal::TBranchIMTHelper
Definition: TBranchIMTHelper.h:38
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TBranchRef::~TBranchRef
virtual ~TBranchRef()
Typical destructor.
Definition: TBranchRef.cxx:87
TBranchRef
Definition: TBranchRef.h:34