I would like to save RooFitResult Object returned by chi2FitTo method which is implemented in rf609__xychi2fit_8C
There is this line in the code which does chi2 fit to unbinned dataset.
f.chi2FitTo(dxy, YVar(y), Integrate(kTRUE));
What I would like to do is save returned object from this method. Which I do as below:
RooFitResult *res= f.chi2FitTo(dxy, YVar(y), Integrate(kTRUE)); res->Print();
It gives error as
rf609_xychi2fit.C:75:5: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
I was expecting that this object res should contain input and output parameters of the fit. But it is saving null pointer. Why is that?