From 9109c63e77a50793982d3592b9d0a338cb286057 Mon Sep 17 00:00:00 2001 From: Akrit Kumar Behera <84931167+akritkbehera@users.noreply.github.com> Date: Wed, 8 Oct 2025 14:11:02 +0200 Subject: [PATCH 1/2] Updated FWCore_ref_t.cppunit.cpp Added a call to eventChain.LoadTree(0) before setting branch addresses. --- FWCore/FWLite/test/ref_t.cppunit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FWCore/FWLite/test/ref_t.cppunit.cpp b/FWCore/FWLite/test/ref_t.cppunit.cpp index 865be3ca8e929..533c96a793419 100644 --- a/FWCore/FWLite/test/ref_t.cppunit.cpp +++ b/FWCore/FWLite/test/ref_t.cppunit.cpp @@ -216,6 +216,7 @@ void testRefInROOT::testGoodChain() { TChain eventChain(edm::poolNames::eventTreeName().c_str()); eventChain.Add("good.root"); eventChain.Add("good_delta5.root"); + eventChain.LoadTree(0); edm::Wrapper* pOthers = nullptr; TBranch* othersBranch = nullptr; @@ -226,6 +227,9 @@ void testRefInROOT::testGoodChain() { eventChain.SetBranchAddress("edmtestThings_Thing__TEST.", &pThings, &thingsBranch); int nev = eventChain.GetEntries(); + if (nev == TTree::kMaxEntries) { + return; + } for (int ev = 0; ev < nev; ++ev) { std::cout << "event #" << ev << std::endl; othersBranch->SetAddress(&pOthers); From b9e737e06b2ca6ce4589d78f0e3797c44a481f46 Mon Sep 17 00:00:00 2001 From: Akrit Kumar Behera <84931167+akritkbehera@users.noreply.github.com> Date: Wed, 8 Oct 2025 21:13:58 +0200 Subject: [PATCH 2/2] Update ref_t.cppunit.cpp --- FWCore/FWLite/test/ref_t.cppunit.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/FWCore/FWLite/test/ref_t.cppunit.cpp b/FWCore/FWLite/test/ref_t.cppunit.cpp index 533c96a793419..4b5aaff90165a 100644 --- a/FWCore/FWLite/test/ref_t.cppunit.cpp +++ b/FWCore/FWLite/test/ref_t.cppunit.cpp @@ -227,9 +227,6 @@ void testRefInROOT::testGoodChain() { eventChain.SetBranchAddress("edmtestThings_Thing__TEST.", &pThings, &thingsBranch); int nev = eventChain.GetEntries(); - if (nev == TTree::kMaxEntries) { - return; - } for (int ev = 0; ev < nev; ++ev) { std::cout << "event #" << ev << std::endl; othersBranch->SetAddress(&pOthers);