Logo ROOT   6.12/07
Reference Guide
List of all members | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
ROOT::Internal::TTreeReaderValueBase Class Referenceabstract

Definition at line 39 of file TTreeReaderValue.h.

Public Types

enum  EReadStatus { kReadSuccess = 0, kReadNothingYet, kReadError }
 
enum  ESetupStatus {
  kSetupNotSetup = -7, kSetupTreeDestructed = -8, kSetupMakeClassModeMismatch = -7, kSetupMissingCounterBranch = -6,
  kSetupMissingBranch = -5, kSetupInternalError = -4, kSetupMissingDictionary = -3, kSetupMismatch = -2,
  kSetupNotACollection = -1, kSetupMatch = 0, kSetupMatchBranch = 0, kSetupNoCheck = 5,
  kSetupMatchLeaf = 6
}
 

Public Member Functions

virtual ~TTreeReaderValueBase ()
 Unregister from tree reader, cleanup. More...
 
voidGetAddress ()
 Returns the memory address of the object being read. More...
 
const char * GetBranchName () const
 
TLeafGetLeaf ()
 If we are reading a leaf, return the corresponding TLeaf. More...
 
virtual EReadStatus GetReadStatus () const
 
ESetupStatus GetSetupStatus () const
 
Bool_t IsValid () const
 
EReadStatus ProxyRead ()
 Try to read the value from the TBranchProxy, returns the status of the read. More...
 

Protected Member Functions

 TTreeReaderValueBase (TTreeReader *reader, const char *branchname, TDictionary *dict)
 Construct a tree value reader and register it with the reader object. More...
 
 TTreeReaderValueBase (const TTreeReaderValueBase &)
 Copy-construct. More...
 
virtual void CreateProxy ()
 Create the proxy object for our branch. More...
 
const char * GetBranchDataType (TBranch *branch, TDictionary *&dict) const
 Retrieve the type of data stored by branch; put its dictionary into dict, return its type name. More...
 
virtual const char * GetDerivedTypeName () const =0
 
Detail::TBranchProxyGetProxy () const
 
void MarkTreeReaderUnavailable ()
 
void NotifyNewTree (TTree *newTree)
 The TTreeReader has switched to a new TTree. Update the leaf. More...
 
TTreeReaderValueBaseoperator= (const TTreeReaderValueBase &)
 Copy-assign. More...
 
void RegisterWithTreeReader ()
 Register with tree reader. More...
 

Static Protected Member Functions

static std::string GetElementTypeName (const std::type_info &ti)
 Stringify the template argument. More...
 

Protected Attributes

TString fBranchName
 
TDictionaryfDict
 
int fHaveLeaf: 1
 
int fHaveStaticClassOffsets: 1
 
TLeaffLeaf = nullptr
 
TString fLeafName
 
Detail::TBranchProxyfProxy = nullptr
 
EReadStatus fReadStatus: 2
 
ESetupStatus fSetupStatus = kSetupNotSetup
 
std::vector< Long64_tfStaticClassOffsets
 
TTreeReaderfTreeReader
 

Friends

class ::TTreeReader
 

#include <TTreeReaderValue.h>

Inheritance diagram for ROOT::Internal::TTreeReaderValueBase:
[legend]

Member Enumeration Documentation

◆ EReadStatus

Enumerator
kReadSuccess 
kReadNothingYet 
kReadError 

Definition at line 62 of file TTreeReaderValue.h.

◆ ESetupStatus

Enumerator
kSetupNotSetup 
kSetupTreeDestructed 

No initialization has happened yet.

kSetupMakeClassModeMismatch 

The TTreeReader has been destructed / not set.

kSetupMissingCounterBranch 
kSetupMissingBranch 

The array cannot find its counter branch: Array[CounterBranch].

kSetupInternalError 

The specified branch cannot be found.

kSetupMissingDictionary 

Some other error - hopefully the error message helps.

kSetupMismatch 

To read this branch, we need a dictionary.

kSetupNotACollection 

Mismatch of branch type and reader template type.

kSetupMatch 

The branch class type is not a collection.

kSetupMatchBranch 

This branch has been set up, branch data type and reader template type match, reading should succeed.

kSetupNoCheck 

This branch has been set up, branch data type and reader template type match, reading should succeed.

kSetupMatchLeaf 

Definition at line 43 of file TTreeReaderValue.h.

Constructor & Destructor Documentation

◆ ~TTreeReaderValueBase()

ROOT::Internal::TTreeReaderValueBase::~TTreeReaderValueBase ( )
virtual

Unregister from tree reader, cleanup.

Definition at line 101 of file TTreeReaderValue.cxx.

◆ TTreeReaderValueBase() [1/2]

ROOT::Internal::TTreeReaderValueBase::TTreeReaderValueBase ( TTreeReader reader,
const char *  branchname,
TDictionary dict 
)
protected

Construct a tree value reader and register it with the reader object.

Definition at line 40 of file TTreeReaderValue.cxx.

◆ TTreeReaderValueBase() [2/2]

ROOT::Internal::TTreeReaderValueBase::TTreeReaderValueBase ( const TTreeReaderValueBase rhs)
protected

Copy-construct.

Definition at line 56 of file TTreeReaderValue.cxx.

Member Function Documentation

◆ CreateProxy()

void ROOT::Internal::TTreeReaderValueBase::CreateProxy ( )
protectedvirtual

Create the proxy object for our branch.

Reimplemented in ROOT::Internal::TTreeReaderArrayBase.

Definition at line 198 of file TTreeReaderValue.cxx.

◆ GetAddress()

void * ROOT::Internal::TTreeReaderValueBase::GetAddress ( )

Returns the memory address of the object being read.

Definition at line 170 of file TTreeReaderValue.cxx.

◆ GetBranchDataType()

const char * ROOT::Internal::TTreeReaderValueBase::GetBranchDataType ( TBranch branch,
TDictionary *&  dict 
) const
protected

Retrieve the type of data stored by branch; put its dictionary into dict, return its type name.

If no dictionary is available, at least its type name should be returned.

Definition at line 458 of file TTreeReaderValue.cxx.

◆ GetBranchName()

const char* ROOT::Internal::TTreeReaderValueBase::GetBranchName ( ) const
inline

Definition at line 79 of file TTreeReaderValue.h.

◆ GetDerivedTypeName()

virtual const char* ROOT::Internal::TTreeReaderValueBase::GetDerivedTypeName ( ) const
protectedpure virtual

◆ GetElementTypeName()

std::string ROOT::Internal::TTreeReaderValueBase::GetElementTypeName ( const std::type_info &  ti)
staticprotected

Stringify the template argument.

Definition at line 138 of file TTreeReaderValue.cxx.

◆ GetLeaf()

TLeaf* ROOT::Internal::TTreeReaderValueBase::GetLeaf ( )
inline

If we are reading a leaf, return the corresponding TLeaf.

Definition at line 75 of file TTreeReaderValue.h.

◆ GetProxy()

Detail::TBranchProxy* ROOT::Internal::TTreeReaderValueBase::GetProxy ( ) const
inlineprotected

Definition at line 97 of file TTreeReaderValue.h.

◆ GetReadStatus()

virtual EReadStatus ROOT::Internal::TTreeReaderValueBase::GetReadStatus ( ) const
inlinevirtual

Reimplemented in ROOT::Internal::TTreeReaderArrayBase.

Definition at line 72 of file TTreeReaderValue.h.

◆ GetSetupStatus()

ESetupStatus ROOT::Internal::TTreeReaderValueBase::GetSetupStatus ( ) const
inline

Definition at line 71 of file TTreeReaderValue.h.

◆ IsValid()

Bool_t ROOT::Internal::TTreeReaderValueBase::IsValid ( ) const
inline

Definition at line 70 of file TTreeReaderValue.h.

◆ MarkTreeReaderUnavailable()

void ROOT::Internal::TTreeReaderValueBase::MarkTreeReaderUnavailable ( )
inlineprotected

Definition at line 99 of file TTreeReaderValue.h.

◆ NotifyNewTree()

void ROOT::Internal::TTreeReaderValueBase::NotifyNewTree ( TTree newTree)
protected

The TTreeReader has switched to a new TTree. Update the leaf.

Definition at line 149 of file TTreeReaderValue.cxx.

◆ operator=()

ROOT::Internal::TTreeReaderValueBase & ROOT::Internal::TTreeReaderValueBase::operator= ( const TTreeReaderValueBase rhs)
protected

Copy-assign.

Definition at line 76 of file TTreeReaderValue.cxx.

◆ ProxyRead()

ROOT::Internal::TTreeReaderValueBase::EReadStatus ROOT::Internal::TTreeReaderValueBase::ProxyRead ( )

Try to read the value from the TBranchProxy, returns the status of the read.

Definition at line 126 of file TTreeReaderValue.cxx.

◆ RegisterWithTreeReader()

void ROOT::Internal::TTreeReaderValueBase::RegisterWithTreeReader ( )
protected

Register with tree reader.

Definition at line 113 of file TTreeReaderValue.cxx.

Friends And Related Function Documentation

◆ ::TTreeReader

friend class ::TTreeReader
friend

Definition at line 119 of file TTreeReaderValue.h.

Member Data Documentation

◆ fBranchName

TString ROOT::Internal::TTreeReaderValueBase::fBranchName
protected

Definition at line 108 of file TTreeReaderValue.h.

◆ fDict

TDictionary* ROOT::Internal::TTreeReaderValueBase::fDict
protected

Definition at line 111 of file TTreeReaderValue.h.

◆ fHaveLeaf

int ROOT::Internal::TTreeReaderValueBase::fHaveLeaf
protected

Definition at line 104 of file TTreeReaderValue.h.

◆ fHaveStaticClassOffsets

int ROOT::Internal::TTreeReaderValueBase::fHaveStaticClassOffsets
protected

Definition at line 105 of file TTreeReaderValue.h.

◆ fLeaf

TLeaf* ROOT::Internal::TTreeReaderValueBase::fLeaf = nullptr
protected

Definition at line 113 of file TTreeReaderValue.h.

◆ fLeafName

TString ROOT::Internal::TTreeReaderValueBase::fLeafName
protected

Definition at line 109 of file TTreeReaderValue.h.

◆ fProxy

Detail::TBranchProxy* ROOT::Internal::TTreeReaderValueBase::fProxy = nullptr
protected

Definition at line 112 of file TTreeReaderValue.h.

◆ fReadStatus

EReadStatus ROOT::Internal::TTreeReaderValueBase::fReadStatus
protected

Definition at line 106 of file TTreeReaderValue.h.

◆ fSetupStatus

ESetupStatus ROOT::Internal::TTreeReaderValueBase::fSetupStatus = kSetupNotSetup
protected

Definition at line 107 of file TTreeReaderValue.h.

◆ fStaticClassOffsets

std::vector<Long64_t> ROOT::Internal::TTreeReaderValueBase::fStaticClassOffsets
protected

Definition at line 114 of file TTreeReaderValue.h.

◆ fTreeReader

TTreeReader* ROOT::Internal::TTreeReaderValueBase::fTreeReader
protected

Definition at line 110 of file TTreeReaderValue.h.

Libraries for ROOT::Internal::TTreeReaderValueBase:
[legend]

The documentation for this class was generated from the following files: