Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
27class TRefTable;
28#else
29#include "TRefTable.h"
30#endif
31
32class TTree;
33
34class TBranchRef : public TBranch {
35private:
36 Long64_t fRequestedEntry; ///<! Cursor indicating which entry is being requested.
37
38protected:
39 TRefTable *fRefTable; ///< pointer to the TRefTable
40
43
44public:
45 TBranchRef();
47 virtual ~TBranchRef();
48 void Clear(Option_t *option="") override;
49 TRefTable *GetRefTable() const {return fRefTable;}
50 Bool_t Notify() override;
51 void Print(Option_t *option="") const override;
52 void Reset(Option_t *option="") override;
53 void ResetAfterMerge(TFileMergeInfo *) override;
54 virtual Int_t SetParent(const TObject* obj, Int_t branchID);
55 virtual void SetRequestedEntry(Long64_t entry) {fRequestedEntry = entry;}
56
57private:
59
60 ClassDefOverride(TBranchRef,1); //to support referenced objects on other branches
61};
62
63#endif
#define b(i)
Definition RSha256.hxx:100
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
long long Long64_t
Definition RtypesCore.h:80
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
A helper class for managing IMT work during TTree:Fill operations.
A branch containing and managing a TRefTable for TRef autoloading.
Definition TBranchRef.h:34
TRefTable * GetRefTable() const
Definition TBranchRef.h:49
void Reset(Option_t *option="") override
virtual ~TBranchRef()
Typical destructor.
TBranchRef()
Default constructor.
Bool_t Notify() override
This function is called by TRefTable::Notify, itself called by TRef::GetObject.
void FillLeavesImpl(TBuffer &b)
This function called by TBranch::Fill overloads TBranch::FillLeaves.
virtual void SetRequestedEntry(Long64_t entry)
Definition TBranchRef.h:55
Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *) override
Fill the branch basket with the referenced objects parent numbers.
void Print(Option_t *option="") const override
Print the TRefTable branch.
void Clear(Option_t *option="") override
Clear entries in the TRefTable.
TRefTable * fRefTable
pointer to the TRefTable
Definition TBranchRef.h:39
Long64_t fRequestedEntry
! Cursor indicating which entry is being requested.
Definition TBranchRef.h:36
void ReadLeavesImpl(TBuffer &b)
This function called by TBranch::GetEntry overloads TBranch::ReadLeaves.
void ResetAfterMerge(TFileMergeInfo *) override
Reset a Branch after a Merge operation (drop data but keep customizations) TRefTable is cleared.
virtual Int_t SetParent(const TObject *obj, Int_t branchID)
Set the current parent branch.
A TTree is a list of TBranches.
Definition TBranch.h:89
Buffer base class used for serializing objects.
Definition TBuffer.h:43
Mother of all ROOT objects.
Definition TObject.h:41
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:79
Definition tree.py:1