17ws = ROOT.RooWorkspace(
"workspace")
20tool = ROOT.RooJSONFactoryWSTool(ws)
23tool.importJSON(ROOT.gROOT.GetTutorialDir().Data() +
"/roofit/rf515_hfJSON.json")
28model = ws[
"ModelConfig"]
31params = model.GetPdf().getParameters(ws[
"observed"])
32params_initial = params.snapshot()
35result = model.fitTo(ws[
"observed"], ROOT.RooFit.Save(), ROOT.RooFit.PrintLevel(-1))
39params.assign(params_initial)
43tool.exportJSON(
"myWorkspace.json")
46ws_2 = ROOT.RooWorkspace(
"workspace")
47tool_2 = ROOT.RooJSONFactoryWSTool(ws_2)
48tool_2.importJSON(
"myWorkspace.json")
50model_2 = ws_2[
"ModelConfig"]
51result = model_2.fitTo(ws_2[
"observed"], ROOT.RooFit.Save(), ROOT.RooFit.PrintLevel(-1))