Skip to content

Commit 05dc574

Browse files
committed
Add Warning to ParamHistFunc Compatibility
1 parent 6af113b commit 05dc574

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

roofit/hs3/src/JSONFactories_RooFitCore.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,14 @@ class ParamHistFuncFactory : public RooFit::JSONIO::Importer {
540540
{
541541
std::string name(RooJSONFactoryWSTool::name(p));
542542
RooArgList varList = tool->requestArgList<RooRealVar>(p, "variables");
543+
if (!p.has_child("axes")) {
544+
std::stringstream ss;
545+
ss << "No axes given in '" << name << "'"
546+
<< ". Using default binning (uniform; nbins=100). If needed, export the Workspace with a newer Root version that supports histogram binnings(>6.37.01)." << std::endl;
547+
RooJSONFactoryWSTool::warning(ss.str());
548+
tool->wsEmplace<ParamHistFunc>(name, varList, tool->requestArgList<RooAbsReal>(p, "parameters"));
549+
return true;
550+
}
543551
tool->wsEmplace<ParamHistFunc>(name, readBinning(p, varList), tool->requestArgList<RooAbsReal>(p, "parameters"));
544552
return true;
545553
}

0 commit comments

Comments
 (0)