12 #ifndef ROOT_TTreeReaderValue 13 #define ROOT_TTreeReaderValue 29 #include <type_traits> 120 friend class ::TTreeReader;
127 template <
typename T>
143 Error(
"TTreeReaderValue::Get()",
"Value reader not properly initialized, did you remember to call TTreeReader.Set(Next)Entry()?");
161 return sElementTypeName.data();
168 #endif // ROOT_TTreeReaderValue
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual const char * GetDerivedTypeName() const
Get the template argument as a string.
To read this branch, we need a dictionary.
TTreeReader is a simple, robust and fast interface to read values from a TTree, TChain or TNtuple...
Namespace for new ROOT classes and functions.
The branch class type is not a collection.
int fHaveStaticClassOffsets
virtual ~TTreeReaderValueBase()
Unregister from tree reader, cleanup.
EReadStatus ProxyRead()
Try to read the value from the TBranchProxy, returns the status of the read.
TTreeReaderValue(TTreeReader &tr, const char *branchname)
std::vector< Long64_t > fStaticClassOffsets
This branch has been set up, branch data type and reader template type match, reading should succeed...
The array cannot find its counter branch: Array[CounterBranch].
Mismatch of branch type and reader template type.
T * Get()
Return a pointer to the value of the current entry.
Detail::TBranchProxy * GetProxy() const
const char * GetBranchName() const
virtual EReadStatus GetReadStatus() const
ESetupStatus fSetupStatus
void MarkTreeReaderUnavailable()
TTreeReaderValueBase & operator=(const TTreeReaderValueBase &)
Copy-assign.
Extracts data from a TTree.
The specified branch cannot be found.
typename std::remove_const< Int_t >::type NonConstT_t
This branch has been set up, branch data type and reader template type match, reading should succeed...
void RegisterWithTreeReader()
Register with tree reader.
TTreeReader * fTreeReader
TTreeReaderValueBase(TTreeReader *reader, const char *branchname, TDictionary *dict)
Construct a tree value reader and register it with the reader object.
T & operator*()
Return a reference to the value of the current entry.
This class defines an abstract interface that must be implemented by all classes that contain diction...
virtual void CreateProxy()
Create the proxy object for our branch.
Some other error - hopefully the error message helps.
void * GetAddress()
Returns the memory address of the object being read.
No initialization has happened yet.
A Branch for the case of an object.
static std::string GetElementTypeName(const std::type_info &ti)
Stringify the template argument.
TBranch * SearchBranchWithCompositeName(TLeaf *&myleaf, TDictionary *&branchActualType, std::string &err)
Search a branch the name of which contains a ".".
TLeaf * GetLeaf()
If we are reading a leaf, return the corresponding TLeaf.
The TTreeReader has been destructed / not set.
Detail::TBranchProxy * fProxy
virtual const char * GetDerivedTypeName() const =0
void NotifyNewTree(TTree *newTree)
The TTreeReader has switched to a new TTree. Update the leaf.
A TTree object has a header with a name and a title.
Base class for all the proxy object.
Bool_t IsaPointer() const
A TTree is a list of TBranches.
ESetupStatus GetSetupStatus() const
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...
void Error(ErrorHandler_t func, int code, const char *va_(fmt),...)
Write error message and call a handler, if required.
T * operator->()
Return a pointer to the value of the current entry.