Skip to content

Commit e08cce0

Browse files
committed
[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.
1 parent def074c commit e08cce0

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,6 @@ RooArgList HistoToWorkspaceFactoryFast::createObservables(const TH1 *hist, RooWo
797797
auto protoOwner = std::make_unique<RooWorkspace>(channel_name.c_str(), (channel_name+" workspace").c_str());
798798
RooWorkspace &proto = *protoOwner;
799799
auto proto_config = make_unique<ModelConfig>("ModelConfig", &proto);
800-
proto_config->SetWorkspace(proto);
801800

802801
// preprocess functions
803802
for(auto const& func : fPreprocessFunctions){

0 commit comments

Comments
 (0)