12 #ifndef ROOT_TTreeReaderArray 13 #define ROOT_TTreeReaderArray 67 public std::iterator<std::input_iterator_tag, T, long> {
70 fIndex(0), fArray(0) {}
74 fIndex(idx), fArray(array) {}
91 return !(*
this == lhs);
105 if (fIndex >= fArray->
GetSize()) {
115 R__ASSERT(fArray &&
"invalid iterator!");
116 return fArray->
At(fIndex);
119 operator const T*()
const {
return &fArray->
At(fIndex); }
136 return IsEmpty() ? Iterator_t() : Iterator_t(0,
this);
138 Iterator_t
end()
const {
return Iterator_t(); }
141 #define R__TTreeReaderArray_TypeString(T) #T 143 #undef R__TTreeReaderArray_TypeString 148 #endif // ROOT_TTreeReaderArray A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
TTreeReaderArray(TTreeReader &tr, const char *branchname)
const char * GetBranchContentDataType(TBranch *branch, TString &contentTypeName, TDictionary *&dict)
Access a branch's collection content (not the collection itself) through a proxy. ...
TTreeReader is a simple, robust and fast interface to read values from a TTree, TChain or TNtuple...
Namespace for new ROOT classes and functions.
bool operator!=(const Iterator_t &lhs) const
virtual void CreateProxy()
Create the proxy object for our branch.
Iterator_t & operator++()
Detail::TBranchProxy * GetProxy() const
TTreeReaderArrayBase(TTreeReader *reader, const char *branchname, TDictionary *dict)
bool operator==(const Iterator_t &lhs) const
Iterator_t(size_t idx, TTreeReaderArray *array)
virtual const char * GetDerivedTypeName() const
TTreeReaderValueBase::EReadStatus fReadStatus
bool GetBranchAndLeaf(TBranch *&branch, TLeaf *&myLeaf, TDictionary *&branchActualType)
Determine the branch / leaf and its type; reset fProxy / fSetupStatus on error.
This class defines an abstract interface that must be implemented by all classes that contain diction...
virtual EReadStatus GetReadStatus() const
Extracts array data from a TTree.
TTreeReaderArray * fArray
void * UntypedAt(size_t idx) const
T & operator[](size_t idx)
#define R__TTreeReaderArray_TypeString(T)
TVirtualCollectionReader * fImpl
virtual void * At(Detail::TBranchProxy *, size_t)=0
A TTree is a list of TBranches.
Iterator_t operator++(int)
void SetImpl(TBranch *branch, TLeaf *myLeaf)
Create the TVirtualCollectionReader object for our branch.
virtual size_t GetSize(Detail::TBranchProxy *)=0