208      ::Error(
"TTreeReader::TTreeReader", 
"TTree is NULL!");
 
 
  234      std::string 
msg = 
"No TTree called ";
 
  236      msg += 
" was found in the selected TDirectory.";
 
  237      Error(
"TTreeReader", 
"%s", 
msg.c_str());
 
 
  247   for (std::deque<ROOT::Internal::TTreeReaderValueBase*>::const_iterator
 
  249      (*i)->MarkTreeReaderUnavailable();
 
 
  282      Error(
"Initialize", 
"We are not processing a TChain but the TEntryList contains sublists. Please " 
  283                          "provide a simple TEntryList with no sublists instead.");
 
 
  317                  "The current tree in the TChain %s has changed (e.g. by TTree::Process) " 
  318                  "even though TTreeReader::SetEntry() was called, which switched the tree " 
  319                  "again. Did you mean to call TTreeReader::SetLocalEntry()?",
 
  329              "The TTree / TChain has an associated TEntryList. " 
  330              "TTreeReader ignores TEntryLists unless you construct the TTreeReader passing a TEntryList.");
 
  335      Error(
"SetEntryBase()", 
"There was an error while notifying the proxies.");
 
 
  355   for (
size_t i = 0; i < 
fValues.size(); ++i) {
 
 
  420      Error(
"SetEntriesRange()", 
"Start entry (%lld) must be lower than the available entries (%lld).", 
beginEntry,
 
  441         Error(
"SetEntriesRange()", 
"Error setting first entry %lld: %s",
 
 
  456         tc->DropBranch(
"*", 
true);
 
 
  566               "There was an issue opening the last file associated to the TChain " 
  603              "Unexpected error '%lld' in %s::LoadTree", 
loadResult,
 
 
  662   TTree* tree = 
nullptr;
 
 
  675      Error(
"RegisterValueReader",
 
  676            "Error registering reader for %s: TTreeReaderValue/Array objects must be created before the call to Next() / SetEntry() / SetLocalEntry(), or after TTreeReader::Restart()!",
 
 
  689   std::deque<ROOT::Internal::TTreeReaderValueBase*>::iterator 
iReader 
  692      Error(
"DeregisterValueReader", 
"Cannot find reader of type %s for branch %s", 
reader->GetDerivedTypeName(), 
reader->fBranchName.Data());
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
 
void SetReadEntry(Long64_t entry)
Move to a new entry to read entry is the 'local' entry number; i.e.
 
TTree * SetTree(TTree *newtree)
Set the BranchProxy to be looking at a new tree.
 
Base class of TTreeReaderValue.
 
A chain is a collection of files containing TTree objects.
 
Describe directory structure in memory.
 
A List of entry numbers in a TTree or TChain.
 
virtual TList * GetLists() const
 
virtual Long64_t GetEntryAndTree(Long64_t index, Int_t &treenum)
Return the index of "index"-th non-zero entry in the TTree or TChain and the # of the corresponding t...
 
virtual Long64_t GetEntry(Long64_t index)
Return the number of the entry #index of this TEntryList in the TTree or TChain See also Next().
 
virtual Long64_t GetN() const
 
const char * GetName() const override
Returns name of object.
 
void PrependLink(Chain &chain)
Set this link as the head of the chain's list of notify subscribers.
 
void RemoveLink(Chain &chain)
Remove this link from a chain's list of notify subscribers.
 
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
 
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
 
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
 
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
 
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
 
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
 
TTreeReader()
Default constructor. Call SetTree to connect to a TTree.
 
ELoadTreeStatus fLoadTreeStatus
Indicator on how LoadTree was called 'last' time.
 
Long64_t GetEntries() const
Returns the number of entries of the TEntryList if one is provided, else of the TTree / TChain,...
 
EEntryStatus fEntryStatus
status of most recent read request
 
void SetTree(TTree *tree, TEntryList *entryList=nullptr)
Set (or update) the which tree to read from.
 
~TTreeReader() override
Tell all value readers that the tree reader does not exist anymore.
 
TNotifyLink< TTreeReader > fNotify
TTree and TChain will notify this object upon LoadTree, leading to a call to TTreeReader::Notify().
 
bool fProxiesSet
True if the proxies have been set, false otherwise.
 
@ kEntryNotFound
the tree entry number does not exist
 
@ kEntryUnknownError
LoadTree return less than -4, likely a 'newer' error code.
 
@ kEntryDictionaryError
problem reading dictionary info from tree
 
@ kEntryBeyondEnd
last entry loop has reached its end
 
@ kEntryChainFileError
problem in opening a chain's file
 
@ kEntryNoTree
the tree does not exist
 
@ kEntryValid
data read okay
 
bool fSetEntryBaseCallingLoadTree
True if during the LoadTree execution triggered by SetEntryBase.
 
std::deque< ROOT::Internal::TTreeReaderValueBase * > fValues
readers that use our director
 
bool RegisterValueReader(ROOT::Internal::TTreeReaderValueBase *reader)
Add a value reader for this tree.
 
TTree * fTree
tree that's read
 
ROOT::Internal::TBranchProxyDirector * fDirector
proxying director, owned
 
EEntryStatus SetEntriesRange(Long64_t beginEntry, Long64_t endEntry)
Set the range of entries to be loaded by Next(); end will not be loaded.
 
std::deque< ROOT::Internal::TFriendProxy * > fFriendProxies
proxying for friend TTrees, owned
 
EEntryStatus SetEntryBase(Long64_t entry, bool local)
Load an entry into the tree, return the status of the read.
 
@ kInternalLoadTree
Notify/LoadTree was last called from SetEntryBase.
 
@ kNoTree
default state, no TTree is connected (formerly 'Zombie' state)
 
@ kExternalLoadTree
User code called LoadTree directly.
 
@ kLoadTreeNone
Notify has not been called yet.
 
void Initialize()
Initialization of the director.
 
void Restart()
Restart a Next() loop from entry 0 (of TEntryList index 0 of fEntryList is set).
 
TEntryList * fEntryList
entry list to be used
 
Long64_t fEntry
Current (non-local) entry of fTree or of fEntryList if set.
 
bool Notify() override
Notify director and values of a change in tree.
 
Long64_t fBeginEntry
This allows us to propagate the range to the TTreeCache.
 
void DeregisterValueReader(ROOT::Internal::TTreeReaderValueBase *reader)
Remove a value reader for this tree.
 
@ kBitHaveWarnedAboutEntryListAttachedToTTree
the tree had a TEntryList and we have warned about that
 
@ kBitIsChain
our tree is a chain
 
bool SetProxies()
Tell readers we now have a tree.
 
NamedProxies_t fProxies
attached ROOT::TNamedBranchProxies; owned
 
Long64_t fEndEntry
The end of the entry loop.
 
EEntryStatus SetEntry(Long64_t entry)
Set the next entry (or index of the TEntryList if that is set).
 
static constexpr const char *const fgEntryStatusText[kEntryUnknownError+1]
 
Long64_t GetCurrentEntry() const
Returns the index of the current entry being read.
 
A TTree represents a columnar dataset.
 
virtual Int_t StopCacheLearningPhase()
Stop the cache learning phase.
 
virtual Int_t AddBranchToCache(const char *bname, bool subbranches=false)
Add branch with name bname to the Tree cache.
 
TFile * GetCurrentFile() const
Return pointer to the current file.
 
virtual TEntryList * GetEntryList()
Returns the entry list assigned to this tree.
 
virtual Long64_t GetEntries() const
 
virtual TTree * GetTree() const
 
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
 
virtual Long64_t GetEntriesFast() const
 
virtual Int_t SetCacheEntryRange(Long64_t first, Long64_t last)
interface to TTreeCache to set the cache entry range
 
static constexpr Long64_t kMaxEntries