Re: Accessing ROOT fit result

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 15 Dec 2009 12:34:12 +0100


This interface is only available in version 5.26 see http://root.cern.ch/root/v526/Version526.news.html

Rene Brun

Alexander Mann wrote:
>
> Hi,
>
> I have a TH1F called h and would like to fit a Gaussian to it.
> Additionally I would like to access the TFitResult. According to
> ROOT's documentation (http://root.cern.ch/root/html/TH1.html#TH1:Fit)
> this ought to work like this:
>
> TFitResultPtr fitres = h->Fit("gaus", "S", "", -0.1, 0.5);
> Double_t chi2 = fitres->Chi2();
>
> Only it doesn't: The second line yields
>
> Error: Symbol fitres is not defined in current scope (tmpfile):1:
> Error: Failed to evaluate fitres->Chi2()
> *** Interpreter error recovered ***
>
> What's wrong here?
>
> Best regards,
> Alexander
>
Received on Tue Dec 15 2009 - 12:32:57 CET

This archive was generated by hypermail 2.2.0 : Wed Dec 16 2009 - 05:50:05 CET