Skip to content
Snippets Groups Projects
Commit 738f5dcc authored by Philippe Canal's avatar Philippe Canal Committed by Axel Naumann
Browse files

Remove early return (partial revert a27a2677).

The earlier return was a pessimisation in all case but when calling Next after reaching the last entry,
and was technically wrong as it did not take in consideration which entry was being asked for (so if

anybody but TTreeReader::Next called SetEntryBase it could have return the wrong result
parent 4c60b22c
No related branches found
No related tags found
No related merge requests found
......@@ -354,16 +354,6 @@ TTreeReader::EEntryStatus TTreeReader::SetEntryBase(Long64_t entry, Bool_t local
}
}
if (fProxiesSet && fDirector && fDirector->GetReadEntry() == -1
&& fMostRecentTreeNumber != -1) {
// Passed the end of the chain, Restart() was not called:
// don't try to load entries anymore. Can happen in these cases:
// while (tr.Next()) {something()};
// while (tr.Next()) {somethingelse()}; // should not be calling somethingelse().
fEntryStatus = kEntryNotFound;
return fEntryStatus;
}
Int_t treeNumberBeforeLoadTree = fTree->GetTreeNumber();
TTree* treeToCallLoadOn = local ? fTree->GetTree() : fTree;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment