did you mean:model.fitTo(data, ROOT.RooFit.Minos(s))If so, there is a known problem in several places with RooFit, where const-ness is cast away from temporaries, and then pointers to them taken that are stored. This accidentally works in C++, b/c folks write these on a single line, leaving the temporaries alive till the end of execution. In python, the ref-counting will destroy them too early.
did you mean:model.fitTo(data, ROOT.RooFit.Minos(s))If so, there is a known problem in several places with RooFit, where const-ness is cast away from temporaries, and then pointers to them taken that are stored. This accidentally works in C++, b/c folks write these on a single line, leaving the temporaries alive till the end of execution. In python, the ref-counting will destroy them too early.
Cheers,
Wim[/quote]
Yes, exactly. I hope this can be fixed. By the way here I see two bugs: if the temporaries are destroied, why RooFit is not complaining?
again, as I explained above, the rules for C++ and Python are different. In a line like this:model.fitTo(data, ROOT.RooFit.Minos(ROOT.RooArgSet(p)))in C++, the temporary has a life time of the whole of the statement. In Python, it ends the moment that the call is made, as no reference is taken to the temporary.
I have no idea how to fix this on the python side, w/o going over all RooFit methods, and customizing them individually.