From 738f5dcc322e5935642b065303405b27cf8a38d5 Mon Sep 17 00:00:00 2001 From: Philippe Canal <pcanal@fnal.gov> Date: Fri, 4 Jan 2019 14:02:50 -0600 Subject: [PATCH] Remove early return (partial revert a27a26776f). 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 --- tree/treeplayer/src/TTreeReader.cxx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tree/treeplayer/src/TTreeReader.cxx b/tree/treeplayer/src/TTreeReader.cxx index 0fc31436d9b..7a49066079b 100644 --- a/tree/treeplayer/src/TTreeReader.cxx +++ b/tree/treeplayer/src/TTreeReader.cxx @@ -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; -- GitLab