From d07250dc58cdc1cc46b62dd4f65908409582a6a7 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Wed, 10 Dec 2025 14:59:53 +0100 Subject: [PATCH 1/2] [RF] Removed unused TStopwatch --- roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx | 4 ---- roofit/roofitcore/src/RooAbsTestStatistic.h | 1 - roofit/roofitcore/src/RooRealMPFE.h | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx b/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx index a1b72e95f6c90..96dcab7eee3f7 100644 --- a/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx +++ b/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx @@ -53,7 +53,6 @@ #include "HFMsgService.h" #include "TH1.h" -#include "TStopwatch.h" // specific to this package #include @@ -754,9 +753,6 @@ RooArgList HistoToWorkspaceFactoryFast::createObservables(const TH1 *hist, RooWo vector systToFix = measurement.GetConstantParams(); bool doRatio=false; - // to time the macro - TStopwatch t; - t.Start(); //ES// string channel_name=summary[0].channel; string channel_name = channel.GetName(); diff --git a/roofit/roofitcore/src/RooAbsTestStatistic.h b/roofit/roofitcore/src/RooAbsTestStatistic.h index cd8d8ef161bb6..3dbf2d7811ee5 100644 --- a/roofit/roofitcore/src/RooAbsTestStatistic.h +++ b/roofit/roofitcore/src/RooAbsTestStatistic.h @@ -16,7 +16,6 @@ #include "RooAbsReal.h" #include "RooSetProxy.h" #include "RooRealProxy.h" -#include "TStopwatch.h" #include "Math/Util.h" #include diff --git a/roofit/roofitcore/src/RooRealMPFE.h b/roofit/roofitcore/src/RooRealMPFE.h index 96c84980ad099..4174cacda3723 100644 --- a/roofit/roofitcore/src/RooRealMPFE.h +++ b/roofit/roofitcore/src/RooRealMPFE.h @@ -22,7 +22,7 @@ #include "RooRealProxy.h" #include "RooListProxy.h" #include "RooArgList.h" -#include "TStopwatch.h" + #include class RooArgSet ; From 7a48645fbc49bde82413e9fc988347158a0e6236 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Thu, 11 Dec 2025 16:14:57 +0100 Subject: [PATCH 2/2] [RF] Remove dead code in `RooWorkspace::import()` The `RooWorkspace::import()` method has a block of dead code, iterating over a RooArgSet that is always empty. The code is dead at lest since ROOT 5: https://github.com/root-project/root/blob/v5-34-00-patches/roofit/roofitcore/src/RooWorkspace.cxx#L627 --- roofit/roofitcore/src/RooWorkspace.cxx | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/roofit/roofitcore/src/RooWorkspace.cxx b/roofit/roofitcore/src/RooWorkspace.cxx index 128e70e92b57d..0d530961d9fc1 100644 --- a/roofit/roofitcore/src/RooWorkspace.cxx +++ b/roofit/roofitcore/src/RooWorkspace.cxx @@ -623,22 +623,6 @@ bool RooWorkspace::import(const RooAbsArg& inArg, RooArgSet(*cloneTop).snapshot(cloneSet2, !noRecursion); RooAbsArg* cloneTop2 = cloneSet2.find(topName2.c_str()) ; - // Make final check list of conflicting nodes - RooArgSet conflictNodes2 ; - RooArgSet branchSet2 ; - for (const auto branch2 : branchSet2) { - if (_allOwnedNodes.find(branch2->GetName())) { - conflictNodes2.add(*branch2) ; - } - } - - // Terminate here if there are conflicts and no resolution protocol - if (!conflictNodes2.empty()) { - coutE(ObjectHandling) << "RooWorkSpace::import(" << GetName() << ") ERROR object named " << inArg.GetName() << ": component(s) " - << conflictNodes2 << " cause naming conflict after conflict resolution protocol was executed" << std::endl ; - return true ; - } - // Perform any auxiliary imports at this point for (const auto node : cloneSet2) { if (node->importWorkspaceHook(*this)) {