From 86f6238a76b3cbcc7e5fe81b8fa7e795c3924900 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Wed, 8 Nov 2023 15:14:55 +0100 Subject: [PATCH] [RF] Replace RooFit legacy iterators --- root/roofit/roofit/RooFitBinnedBenchmarks.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/root/roofit/roofit/RooFitBinnedBenchmarks.cxx b/root/roofit/roofit/RooFitBinnedBenchmarks.cxx index b37d29dd..8babe773 100644 --- a/root/roofit/roofit/RooFitBinnedBenchmarks.cxx +++ b/root/roofit/roofit/RooFitBinnedBenchmarks.cxx @@ -121,9 +121,7 @@ void buildBinnedTest(int n_channels = 1, int nbins = 10, int nnps = 1, const cha } else { ws = hist2workspace.MakeCombinedModel(meas); } - RooFIter iter = ws->components().fwdIterator(); - RooAbsArg *arg; - while ((arg = iter.next())) { + for (RooAbsArg * arg : ws->components()) { if (arg->IsA() == RooRealSumPdf::Class()) { arg->setAttribute("BinnedLikelihood"); if(verbose) std::cout << "component " << arg->GetName() << " is a binned likelihood" << std::endl;