17ws = ROOT.RooWorkspace(
"workspace")
20tool = ROOT.RooJSONFactoryWSTool(ws)
23tool.importJSON(ROOT.gROOT.GetTutorialDir().Data() +
"/roofit/rf515_hfJSON.json")
28model = ws[
"ModelConfig"]
33result = pdf.cloneTree().fitTo(ws[
"observed"], Save=
True, GlobalObservables=model.GetGlobalObservables(), PrintLevel=-1)
38tool.exportJSON(
"myWorkspace.json")
41ws2 = ROOT.RooWorkspace(
"workspace")
42tool2 = ROOT.RooJSONFactoryWSTool(ws2)
43tool2.importJSON(
"myWorkspace.json")
44model2 = ws2[
"main_modelConfig"]
45result = model.GetPdf().fitTo(ws2[
"observed"], Save=
True, GlobalObservables=model.GetGlobalObservables(), PrintLevel=-1)