12 #ifndef ROOT_TTreeReader 13 #define ROOT_TTreeReader 38 class TBranchProxyDirector;
55 public std::iterator<std::input_iterator_tag, const Long64_t, Long64_t> {
61 bool IsValid()
const {
return fEntry >= 0; }
70 fEntry(entry), fReader(&reader) {}
75 if (!IsValid() && !lhs.
IsValid())
return true;
81 return !(*
this == lhs);
108 if (fReader->
SetEntry(fEntry) != kEntryValid) {
145 SetTree(keyname,
nullptr, entryList);
161 return SetEntry(GetCurrentEntry() + 1) == kEntryValid;
187 void SetLastEntry(
Long64_t endEntry)
R__DEPRECATED(6, 12,
"Misnomer and duplication; please use SetEntriesRange()!")
188 { fEndEntry = endEntry; }
232 kBitHaveWarnedAboutEntryListAttachedToTTree =
BIT(15)
240 std::deque<ROOT::Internal::TTreeReaderValueBase*>
fValues;
257 #endif // defined TTreeReader
const Long64_t & operator*() const
Iterate through the entries of a TTree.
#define R__DEPRECATED(MAJOR, MINOR, REASON)
TCollection * GetProxies()
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 IsValid() const
Whether the iterator points to a valid entry.
Iterator_t end() const
Return an iterator beyond the last TTree entry.
TTreeReader(const char *keyname, TEntryList *entryList=nullptr)
std::deque< ROOT::Internal::TTreeReaderValueBase * > fValues
readers that use our director
ROOT::Internal::TNamedBranchProxy * FindProxy(const char *branchname) const
void SetTree(const char *keyname, TEntryList *entryList=nullptr)
bool operator==(const Iterator_t &lhs) const
Compare two iterators for equality.
Long64_t fEntry
Entry number of the tree referenced by this iterator; -1 is invalid.
THashTable fProxies
attached ROOT::TNamedBranchProxies; owned
TEntryList * GetEntryList() const
THashTable implements a hash table to store TObject's.
#define ClassDef(name, id)
the tree entry number does not exist
Long64_t GetCurrentEntry() const
Returns the index of the current entry being read.
Iterator_t begin()
Return an iterator to the 0th TTree entry.
const Long64_t & operator*()
Set the entry number in the reader and return it.
Iterator_t()
Default-initialize the iterator as "past the end".
void Initialize(Bool_t useTMVAStyle=kTRUE)
This class defines an abstract interface that must be implemented by all classes that contain diction...
TTime operator*(const TTime &t1, const TTime &t2)
Collection abstract base class.
EEntryStatus SetEntry(Long64_t entry)
Set the next entry (or index of the TEntryList if that is set).
no entry has been loaded yet
problem in opening a chain's file
problem in accessing a chain element, e.g. file without the tree
Iterator_t operator++(int)
Increment the iterator (postfix i++).
EEntryStatus SetLocalEntry(Long64_t entry)
Set the next local tree entry.
Describe directory structure in memory.
EEntryStatus GetEntryStatus() const
problem reading dictionary info from tree
Iterator_t & operator++()
Increment the iterator (prefix ++i).
Mother of all ROOT objects.
bool operator!=(const Iterator_t &lhs) const
Compare two iterators for inequality.
Bool_t Next()
Move to the next entry (or index of the TEntryList if that is set).
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
A TTree object has a header with a name and a title.
TTreeReader * fReader
The reader we select the entries on.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
A List of entry numbers in a TTree or TChain.
Iterator_t(TTreeReader &reader, Long64_t entry)
Initialize the iterator with the reader it steers and a tree entry number; -1 is invalid.