Skip to content

Commit 221763b

Browse files
committed
[HS3] Fix export of self_normalized flag
1 parent 0c30dfd commit 221763b

2 files changed

Lines changed: 6 additions & 2332 deletions

File tree

roofit/hs3/src/JSONFactories_RooFitCore.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,11 @@ bool importWrapperPdf(RooJSONFactoryWSTool *tool, const JSONNode &node)
11461146

11471147
bool selfNormalized = false;
11481148

1149-
if (auto sn = node.find("selfNormalized"))
1149+
auto sn = node.find("self_normalized");
1150+
// ROOT previously exported this key without an underscore.
1151+
if (!sn)
1152+
sn = node.find("selfnormalized");
1153+
if (sn)
11501154
selfNormalized = sn->val_bool();
11511155

11521156
tool->wsEmplace<RooWrapperPdf>(name, *func, selfNormalized);
@@ -1169,7 +1173,7 @@ bool exportWrapperPdf(RooJSONFactoryWSTool *, const RooAbsArg *arg, JSONNode &no
11691173

11701174
node["function"] << funcProxy->absArg()->GetName();
11711175
if (pdf->selfNormalized())
1172-
node["selfnormalized"] << true;
1176+
node["self_normalized"] << true;
11731177

11741178
return true;
11751179
}

0 commit comments

Comments
 (0)