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#include "TRefTable.h"
26
27class TTree;
28
29class TBranchRef : public TBranch {
30private:
31 Long64_t fRequestedEntry; ///<! Cursor indicating which entry is being requested.
32
33protected:
34 TRefTable *fRefTable; ///< pointer to the TRefTable
35
38
39public:
40 TBranchRef();
42 virtual ~TBranchRef();
43 virtual void Clear(Option_t *option="");
44 TRefTable *GetRefTable() const {return fRefTable;}
45 virtual Bool_t Notify();
46 virtual void Print(Option_t *option="") const;
47 virtual void Reset(Option_t *option="");
48 virtual void ResetAfterMerge(TFileMergeInfo *);
49 virtual Int_t SetParent(const TObject* obj, Int_t branchID);
50 virtual void SetRequestedEntry(Long64_t entry) {fRequestedEntry = entry;}
51
52private:
54
55 ClassDef(TBranchRef,1); //to support referenced objects on other branches
56};
57
58#endif
#define b(i)
Definition: RSha256.hxx:100
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
long long Long64_t
Definition: RtypesCore.h:69
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
A branch containing and managing a TRefTable for TRef autoloading.
Definition: TBranchRef.h:29
TRefTable * GetRefTable() const
Definition: TBranchRef.h:44
virtual ~TBranchRef()
Typical destructor.
Definition: TBranchRef.cxx:87
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch after a Merge operation (drop data but keep customizations) TRefTable is cleared.
Definition: TBranchRef.cxx:198
TBranchRef()
Default constructor.
Definition: TBranchRef.cxx:46
void FillLeavesImpl(TBuffer &b)
This function called by TBranch::Fill overloads TBranch::FillLeaves.
Definition: TBranchRef.cxx:176
virtual void SetRequestedEntry(Long64_t entry)
Definition: TBranchRef.h:50
virtual void Reset(Option_t *option="")
Definition: TBranchRef.cxx:187
virtual void Clear(Option_t *option="")
Clear entries in the TRefTable.
Definition: TBranchRef.cxx:95
TRefTable * fRefTable
pointer to the TRefTable
Definition: TBranchRef.h:34
Long64_t fRequestedEntry
! Cursor indicating which entry is being requested.
Definition: TBranchRef.h:31
virtual void Print(Option_t *option="") const
Print the TRefTable branch.
Definition: TBranchRef.cxx:159
virtual Bool_t Notify()
This function is called by TRefTable::Notify, itself called by TRef::GetObject.
Definition: TBranchRef.cxx:115
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Fill the branch basket with the referenced objects parent numbers.
Definition: TBranchRef.cxx:103
void ReadLeavesImpl(TBuffer &b)
This function called by TBranch::GetEntry overloads TBranch::ReadLeaves.
Definition: TBranchRef.cxx:167
virtual Int_t SetParent(const TObject *obj, Int_t branchID)
Set the current parent branch.
Definition: TBranchRef.cxx:212
A TTree is a list of TBranches.
Definition: TBranch.h:91
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
Mother of all ROOT objects.
Definition: TObject.h:37
A TRefTable maintains the association between a referenced object and the parent object supporting th...
Definition: TRefTable.h:35
A TTree represents a columnar dataset.
Definition: TTree.h:72
Definition: tree.py:1