174 fEntryList(entryList)
177 Error(
"TTreeReader",
"TTree is NULL!");
201 for (std::deque<ROOT::Internal::TTreeReaderValueBase*>::const_iterator
203 (*i)->MarkTreeReaderUnavailable();
254 if (endEntry > beginEntry)
258 if (beginEntry - 1 < 0)
286 return fTree->GetEntries();
287 return fTree->GetEntriesFast();
308 "The TTree / TChain has an associated TEntryList. " 309 "TTreeReader ignores TEntryLists unless you construct the TTreeReader passing a TEntryList.");
342 Int_t treeNumberBeforeLoadTree =
fTree->GetTreeNumber();
344 TTree* treeToCallLoadOn = local ?
fTree->GetTree() :
fTree;
345 Long64_t loadResult = treeToCallLoadOn->LoadTree(entryAfterList);
347 if (loadResult == -2) {
358 if (
fTree->GetTreeNumber() != treeNumberBeforeLoadTree) {
361 R__ASSERT(!local &&
"Logic error - !local but tree number changed?");
363 "The current tree in the TChain %s has changed (e.g. by TTree::Process) " 364 "even though TTreeReader::SetEntry() was called, which switched the tree " 365 "again. Did you mean to call TTreeReader::SetLocalEntry()?",
375 value->NotifyNewTree(
fTree->GetTree());
384 for (std::deque<ROOT::Internal::TTreeReaderValueBase*>::const_iterator
388 if (!(*i)->GetProxy()){
444 TTree*
tree =
nullptr;
457 Error(
"RegisterValueReader",
458 "Error registering reader for %s: TTreeReaderValue/Array objects must be created before the call to Next() / SetEntry() / SetLocalEntry(), or after TTreeReader::Restart()!",
471 std::deque<ROOT::Internal::TTreeReaderValueBase*>::iterator iReader
473 if (iReader ==
fValues.end()) {
TTree * SetTree(TTree *newtree)
virtual Long64_t GetN() const
TTreeReader is a simple, robust and fast interface to read values from a TTree, TChain or TNtuple...
void GetObject(const char *namecycle, T *&ptr)
Bool_t TestBit(UInt_t f) const
std::deque< ROOT::Internal::TTreeReaderValueBase * > fValues
readers that use our director
Long64_t fEndEntry
The end of the entry loop.
void SetReadEntry(Long64_t entry)
EEntryStatus SetEntryBase(Long64_t entry, Bool_t local)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Bool_t RegisterValueReader(ROOT::Internal::TTreeReaderValueBase *reader)
the tree entry number does not exist
const char * GetBranchName() const
EEntryStatus fEntryStatus
status of most recent read request
the tree had a TEntryList and we have warned about that
TEntryList * fEntryList
entry list to be used
ROOT::Internal::TBranchProxyDirector * fDirector
proxying director, owned
Bool_t fProxiesSet
True if the proxies have been set, false otherwise.
Long64_t GetEntries(Bool_t force) const
~TTreeReader()
Tell all value readers that the tree reader does not exist anymore.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Long64_t GetEntry(Int_t index)
Return the number of the entry #index of this TEntryList in the TTree or TChain See also Next()...
EEntryStatus SetEntry(Long64_t entry)
Set the next entry (or index of the TEntryList if that is set).
void Restart()
Restart a Next() loop from entry 0 (of TEntryList index 0 of fEntryList is set).
Long64_t GetReadEntry() const
please use SetEntriesRange()!")
Describe directory structure in memory.
TTree * fTree
tree that's read
void Initialize()
Initialization of the director.
void DeregisterValueReader(ROOT::Internal::TTreeReaderValueBase *reader)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
problem reading dictionary info from tree
Long64_t fEntry
Current (non-local) entry of fTree or of fEntryList if set.
virtual const char * GetDerivedTypeName() const =0
void SetTree(TTree *tree, TEntryList *entryList=nullptr)
Int_t fMostRecentTreeNumber
TTree::GetTreeNumber() of the most recent tree.
A List of entry numbers in a TTree or TChain.
static constexpr Long64_t kMaxEntries
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
last entry loop has reached its end