I’m having some issues with my PyROOT based RooFit code in 6.18, and was not seeing this in 6.16 so I’m wondering if it could be a bug related to some of the changes.
The problem comes up in fitTo and plotOn commands where I’m passing multiple optional arguments in. The strange thing is that this bug seems to be operating inconsistently (some plotOn and fitTo commands work fine, while others do not), which is puzzling me, but my code was working before I updated. One of the problematic lines is:
res=model.fitTo(sourceDataSet,ROOT.RooFit.Extended(1),ROOT.RooFit.Range("fitRange"),ROOT.RooFit.SumCoefRange("fitRange"),ROOT.RooFit.NumCPU(numCPUForFits),ROOT.RooFit.Verbose(0),ROOT.RooFit.PrintLevel(-1),ROOT.RooFit.Save(True))
The python code I’m running segfaults, and at the bottom the following message is shown:
Traceback (most recent call last):
File "fitSim_floatAmplitude_fixedBinning.py", line 464, in <module>
ROOT.RooFit.Save(True)
TypeError: none of the 2 overloaded methods succeeded. Full details:
RooFitResult* RooAbsPdf::fitTo(RooAbsData& data, const RooCmdArg& arg1 = RooCmdArg::none(), const RooCmdArg& arg2 = RooCmdArg::none(), const RooCmdArg& arg3 = RooCmdArg::none(), const RooCmdArg& arg4 = RooCmdArg::none(), const RooCmdArg& arg5 = RooCmdArg::none(), const RooCmdArg& arg6 = RooCmdArg::none(), const RooCmdArg& arg7 = RooCmdArg::none(), const RooCmdArg& arg8 = RooCmdArg::none()) =>
problem in C++; program state has been reset
RooFitResult* RooAbsPdf::fitTo(RooAbsData& data, const RooLinkedList& cmdList) =>
takes at most 2 arguments (8 given)
Deleting the last argument (ROOT.RooFit.Save(True)) does not fix the problem, with the error then occurring on the previous argument.
I know there were some changes with how RooArgSet and RooArgList worked behind the scenes, no longer relying on RooLinkedList. I’m not sure if that could somehow be related to the issues I’m seeing or whether it’s something else. But the same code works fine in 6.16. Any suggestions? Thank you!