12 #ifndef ROOT_TTreeReader
13 #define ROOT_TTreeReader
25 #ifndef ROOT_THashTable
31 #ifndef ROOT_TTreeReaderUtils
44 class TBranchProxyDirector;
61 public std::iterator<std::input_iterator_tag, const Long64_t, Long64_t> {
87 return !(*
this == lhs);
202 std::deque<ROOT::Internal::TTreeReaderValueBase*>
fValues;
217 #endif // defined TTreeReader
const Long64_t & operator*() const
Iterate through the entries of a TTree.
TCollection * GetProxies()
TTreeReader is a simple, robust and fast interface to read values from a TTree, TChain or TNtuple...
bool IsValid() const
Whether the iterator points to a valid entry.
std::deque< ROOT::Internal::TTreeReaderValueBase * > fValues
readers that use our director
ROOT::Internal::TNamedBranchProxy * FindProxy(const char *branchname) const
void SetTree(const char *, TDirectory *)
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
Bool_t RegisterValueReader(ROOT::Internal::TTreeReaderValueBase *reader)
Add a value reader for this tree.
EEntryStatus SetEntryBase(Long64_t entry, Bool_t local)
Load an entry into the tree, return the status of the read.
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.
TDirectory * fDirectory
directory (or current file for chains)
Long64_t GetEntries(Bool_t force) const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
EEntryStatus fEntryStatus
status of most recent read request
const Long64_t & operator*()
Set the entry number in the reader and return it.
Iterator_t()
Default-initialize the iterator as "past the end".
Long64_t fLastEntry
The last entry to be processed.
ROOT::Internal::TBranchProxyDirector * fDirector
proxying director, owned
This class defines an abstract interface that must be implemented by all classes that contain diction...
Bool_t fProxiesSet
True if the proxies have been set, false otherwise.
Collection abstract base class.
Bool_t TestBit(UInt_t f) const
~TTreeReader()
Tell all value readers that the tree reader does not exist anymore.
EEntryStatus SetEntry(Long64_t entry)
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
void Restart()
Restart a Next() loop from the first entry.
void SetChain(const char *, TFileCollection *)
Iterator_t operator++(int)
Increment the iterator (postfix i++).
EEntryStatus SetLocalEntry(Long64_t entry)
Describe directory structure in memory.
TTree * fTree
tree that's read
virtual Long64_t GetEntriesFast() const
void Initialize()
Initialization of the director.
void DeregisterValueReader(ROOT::Internal::TTreeReaderValueBase *reader)
Remove a value reader for this tree.
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.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
TObject * FindObject(const char *name) const
Find object using its name.
virtual Long64_t GetEntries() const
A TTree object has a header with a name and a title.
void SetTree(TTree *tree)
Set (or update) the which tree to reader from.
TTreeReader * fReader
The reader we select the entries on.
Int_t fMostRecentTreeNumber
TTree::GetTreeNumber() of the most recent tree.
void SetLastEntry(Long64_t entry)
EEntryStatus SetEntriesRange(Long64_t first, Long64_t last)
Set the range of entries to be processed.
Iterator_t(TTreeReader &reader, Long64_t entry)
Initialize the iterator with the reader it steers and a tree entry number; -1 is invalid.