Skip to content

Commit 1a2736d

Browse files
pcanalvepadulano
authored andcommitted
TTreeIndex::GetEntryNumberFriend don't call GetEntriesFast.
Calling GetEntriesFast is enough to know if you reach past the end (if we are in the last file then it will return the precise number or something too large if we are far). Calling GetEntries can move the cursor of the chain and thus change the state of the parent.
1 parent 60b71f4 commit 1a2736d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tree/treeplayer/src/TTreeIndex.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Long64_t TTreeIndex::GetEntryNumberFriend(const TTree *parent)
345345
if (!parent) return -3;
346346
// We reached the end of the parent tree
347347
Long64_t pentry = parent->GetReadEntry();
348-
if (pentry >= parent->GetEntries())
348+
if (pentry >= parent->GetEntriesFast())
349349
return -2;
350350
GetMajorFormulaParent(parent);
351351
GetMinorFormulaParent(parent);

0 commit comments

Comments
 (0)