Base class of TTreeReaderValue.
Definition at line 45 of file TTreeReaderValue.h.
Public Types | |
typedef bool(ROOT::Detail::TBranchProxy::* | BranchProxyRead_t) () |
enum | EReadStatus { kReadSuccess = 0 , kReadNothingYet , kReadError } |
enum | ESetupStatus { kSetupMatchButEntryBeyondEnd , kSetupMakeClassModeMismatch = -9 , kSetupTreeDestructed = -8 , kSetupNotSetup = -7 , kSetupMissingCounterBranch = -6 , kSetupMissingBranch = -5 , kSetupInternalError = -4 , kSetupMissingDictionary = -3 , kSetupMismatch = -2 , kSetupNotACollection = -1 , kSetupMatch , kSetupNoCheck = 5 , kSetupMatchLeaf = 6 , kSetupMatchBranch } |
Status flags, 0 is good. More... | |
Public Member Functions | |
virtual | ~TTreeReaderValueBase () |
Unregister from tree reader, cleanup. | |
void * | GetAddress () |
Returns the memory address of the object being read. | |
const char * | GetBranchName () const |
TLeaf * | GetLeaf () |
If we are reading a leaf, return the corresponding TLeaf. | |
virtual EReadStatus | GetReadStatus () const |
ESetupStatus | GetSetupStatus () const |
Return this TTreeReaderValue's setup status. | |
bool | IsValid () const |
Return true if the branch was setup and read correctly. | |
EReadStatus | ProxyRead () |
EReadStatus | ProxyReadDefaultImpl () |
template<BranchProxyRead_t Func> | |
ROOT::Internal::TTreeReaderValueBase::EReadStatus | ProxyReadTemplate () |
Try to read the value from the TBranchProxy, returns the status of the read. | |
Protected Types | |
typedef EReadStatus(TTreeReaderValueBase::* | Read_t) () |
Protected Member Functions | |
TTreeReaderValueBase (const TTreeReaderValueBase &) | |
Copy-construct. | |
TTreeReaderValueBase (TTreeReader *reader, const char *branchname, TDictionary *dict, bool opaqueRead=false) | |
Construct a tree value reader and register it with the reader object. | |
virtual void | CreateProxy () |
Create the proxy object for our branch. | |
void | ErrorAboutMissingProxyIfNeeded () |
virtual const char * | GetDerivedTypeName () const =0 |
Detail::TBranchProxy * | GetProxy () const |
void | MarkTreeReaderUnavailable () |
void | NotifyNewTree (TTree *newTree) |
The TTreeReader has switched to a new TTree. Update the leaf. | |
TTreeReaderValueBase & | operator= (const TTreeReaderValueBase &) |
Copy-assign. | |
void | RegisterWithTreeReader () |
Register with tree reader. | |
TBranch * | SearchBranchWithCompositeName (TLeaf *&myleaf, TDictionary *&branchActualType, std::string &err) |
Search a branch the name of which contains a ".". | |
Static Protected Member Functions | |
static const char * | GetBranchDataType (TBranch *branch, TDictionary *&dict, TDictionary const *curDict) |
Retrieve the type of data stored by branch; put its dictionary into dict, return its type name. | |
static std::string | GetElementTypeName (const std::type_info &ti) |
Stringify the template argument. | |
Protected Attributes | |
TString | fBranchName |
Name of the branch to read data from. | |
TDictionary * | fDict |
Type that the branch should contain. | |
bool | fHaveLeaf: 1 |
Whether the data is in a leaf. | |
bool | fHaveStaticClassOffsets: 1 |
Whether !fStaticClassOffsets.empty() | |
TLeaf * | fLeaf = nullptr |
TString | fLeafName |
bool | fOpaqueRead {false} |
If true, the reader will not do any type-checking against the actual type held by the branch. | |
Detail::TBranchProxy * | fProxy = nullptr |
Proxy for this branch, owned by TTreeReader. | |
Read_t | fProxyReadFunc = &TTreeReaderValueBase::ProxyReadDefaultImpl |
! Pointer to the Read implementation to use. | |
EReadStatus | fReadStatus: 2 |
Read status of this data access. | |
ESetupStatus | fSetupStatus = kSetupNotSetup |
Setup status of this data access. | |
std::vector< Long64_t > | fStaticClassOffsets |
TTreeReader * | fTreeReader |
Tree reader we belong to. | |
Friends | |
class | ::TTreeReader |
#include <TTreeReaderValue.h>
typedef bool(ROOT::Detail::TBranchProxy::* ROOT::Internal::TTreeReaderValueBase::BranchProxyRead_t) () |
Definition at line 84 of file TTreeReaderValue.h.
|
protected |
Definition at line 143 of file TTreeReaderValue.h.
Enumerator | |
---|---|
kReadSuccess | Data read okay. |
kReadNothingYet | Data now yet accessed. |
kReadError | Problem reading data. |
Definition at line 74 of file TTreeReaderValue.h.
Status flags, 0 is good.
Enumerator | |
---|---|
kSetupMatchButEntryBeyondEnd | This branch has been setup, branch data type and reader template type match, but nothing can be read because we have already reached the end of the tree. |
kSetupMakeClassModeMismatch | readers disagree on whether TTree::SetMakeBranch() should be on |
kSetupTreeDestructed | The TTreeReader has been destructed / not set. |
kSetupNotSetup | No initialization has happened yet. |
kSetupMissingCounterBranch | The array cannot find its counter branch: Array[CounterBranch]. |
kSetupMissingBranch | The specified branch cannot be found. |
kSetupInternalError | Some other error - hopefully the error message helps. |
kSetupMissingDictionary | To read this branch, we need a dictionary. |
kSetupMismatch | Mismatch of branch type and reader template type. |
kSetupNotACollection | The branch class type is not a collection. |
kSetupMatch | This branch has been set up, branch data type and reader template type match, reading should succeed. |
kSetupNoCheck | |
kSetupMatchLeaf | This branch (or TLeaf, really) has been set up, reading should succeed. |
kSetupMatchBranch | This branch has been set up, branch data type and reader template type match, reading should succeed. |
Definition at line 48 of file TTreeReaderValue.h.
|
virtual |
Unregister from tree reader, cleanup.
Definition at line 118 of file TTreeReaderValue.cxx.
|
protected |
Construct a tree value reader and register it with the reader object.
Definition at line 57 of file TTreeReaderValue.cxx.
|
protected |
Copy-construct.
Definition at line 73 of file TTreeReaderValue.cxx.
|
protectedvirtual |
Create the proxy object for our branch.
Reimplemented in ROOT::Internal::TTreeReaderArrayBase.
Definition at line 457 of file TTreeReaderValue.cxx.
|
protected |
Definition at line 837 of file TTreeReaderValue.cxx.
void * ROOT::Internal::TTreeReaderValueBase::GetAddress | ( | ) |
Returns the memory address of the object being read.
Definition at line 261 of file TTreeReaderValue.cxx.
|
staticprotected |
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 708 of file TTreeReaderValue.cxx.
|
inline |
Definition at line 101 of file TTreeReaderValue.h.
|
staticprotected |
Stringify the template argument.
Definition at line 221 of file TTreeReaderValue.cxx.
|
inline |
If we are reading a leaf, return the corresponding TLeaf.
Definition at line 97 of file TTreeReaderValue.h.
|
inlineprotected |
Definition at line 119 of file TTreeReaderValue.h.
|
inlinevirtual |
Reimplemented in ROOT::Internal::TTreeReaderArrayBase.
Definition at line 94 of file TTreeReaderValue.h.
|
inline |
Return this TTreeReaderValue's setup status.
Use this method to check e.g. whether the TTreeReaderValue is correctly setup and ready for reading.
Definition at line 93 of file TTreeReaderValue.h.
|
inline |
Return true if the branch was setup and read correctly.
Use GetSetupStatus() to only check the setup status.
Definition at line 90 of file TTreeReaderValue.h.
|
inlineprotected |
Definition at line 121 of file TTreeReaderValue.h.
|
protected |
The TTreeReader has switched to a new TTree. Update the leaf.
Definition at line 233 of file TTreeReaderValue.cxx.
|
protected |
Copy-assign.
Definition at line 92 of file TTreeReaderValue.cxx.
|
inline |
Definition at line 80 of file TTreeReaderValue.h.
ROOT::Internal::TTreeReaderValueBase::EReadStatus ROOT::Internal::TTreeReaderValueBase::ProxyReadDefaultImpl | ( | ) |
Definition at line 153 of file TTreeReaderValue.cxx.
ROOT::Internal::TTreeReaderValueBase::EReadStatus ROOT::Internal::TTreeReaderValueBase::ProxyReadTemplate | ( | ) |
Try to read the value from the TBranchProxy, returns the status of the read.
Definition at line 143 of file TTreeReaderValue.cxx.
|
protected |
Register with tree reader.
Definition at line 129 of file TTreeReaderValue.cxx.
|
protected |
Search a branch the name of which contains a ".".
[out] | myLeaf | The leaf identified by the name if found (can be untouched). |
[out] | branchActualType | Dictionary associated to the type of the leaf (can be untouched). |
[out] | errMsg | The error message (can be untouched). |
Definition at line 310 of file TTreeReaderValue.cxx.
|
friend |
Definition at line 156 of file TTreeReaderValue.h.
|
protected |
Name of the branch to read data from.
Definition at line 136 of file TTreeReaderValue.h.
|
protected |
Type that the branch should contain.
Definition at line 139 of file TTreeReaderValue.h.
|
protected |
Whether the data is in a leaf.
Definition at line 132 of file TTreeReaderValue.h.
|
protected |
Whether !fStaticClassOffsets.empty()
Definition at line 133 of file TTreeReaderValue.h.
|
protected |
Definition at line 141 of file TTreeReaderValue.h.
|
protected |
Definition at line 137 of file TTreeReaderValue.h.
If true, the reader will not do any type-checking against the actual type held by the branch.
Useful to just check if the current entry can be read or not without caring about its value.
Definition at line 151 of file TTreeReaderValue.h.
|
protected |
Proxy for this branch, owned by TTreeReader.
Definition at line 140 of file TTreeReaderValue.h.
|
protected |
! Pointer to the Read implementation to use.
Definition at line 144 of file TTreeReaderValue.h.
|
protected |
Read status of this data access.
Definition at line 134 of file TTreeReaderValue.h.
|
protected |
Setup status of this data access.
Definition at line 135 of file TTreeReaderValue.h.
|
protected |
Definition at line 142 of file TTreeReaderValue.h.
|
protected |
Tree reader we belong to.
Definition at line 138 of file TTreeReaderValue.h.