From 663f8d1a96b2b3b55b6eb7969036a5720b88fa91 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Mon, 17 Nov 2025 11:56:10 +0100 Subject: [PATCH] [RF] Avoid resetting the workspace of ModelConfig in HistFactory Re-setting the workspace can be dangerous for IO reasons, and this is why the new ROOT now emits a warning when this happens. There is one place in HistFactory that triggered this warning, where the Workspace was redundantly set in the constructor and with the `ModelConfig::SetWorkspace()` function, with the same workspace. --- roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx b/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx index 1a2fd3a311711..f5d9a473ffcf5 100644 --- a/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx +++ b/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx @@ -797,7 +797,6 @@ RooArgList HistoToWorkspaceFactoryFast::createObservables(const TH1 *hist, RooWo auto protoOwner = std::make_unique(channel_name.c_str(), (channel_name+" workspace").c_str()); RooWorkspace &proto = *protoOwner; auto proto_config = make_unique("ModelConfig", &proto); - proto_config->SetWorkspace(proto); // preprocess functions for(auto const& func : fPreprocessFunctions){