Re: Expo fit

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Mon, 21 Nov 2005 11:32:24 +0100


Hi Luca,

do
hprof->Fit("expo","","",10.,40.);
TF1* expo=hprof->GetFunction("expo");
Float_t stat[4];
stat[0]=expo->GetParameter(0);

There's a difference between what objects are known to ROOT (as "expo") and what's known to Cint (as expo).
Axel.

Luca Grandi wrote:
> Hi all, I am trying to compile an executable to run outside from ROOT. This
> program is obtained from a ROOT script executing an exponential fit onto a
> TProfile. In the script to get the values of the fit I use a command like
>
> hprof->Fit("expo","","",10.,40.);
> Float_t stat[4];
> stat[0]=expo->GetParameter(0);
>
> This works. But as soon as I try to compile it gives me the error
>
> error: 'expo' was not declared in this scope
>
> It refers to the expo of the last line.
> What can I do? Do I have to include something more than
>
> #include "TFile.h"
> #include "TCanvas.h"
> #include "TH1.h"
> #include "TH2.h"
> #include "TProfile.h"
> #include "TNtuple.h"
> #include "TF1.h"
> #include "TROOT.h"
> #include "TRootApplication.h"
> #include "TSelector.h"
> #include "TFitter.h"
> #include "TMinuit.h"
>
> Thanx
>
> Luca
>
>
Received on Mon Nov 21 2005 - 11:32:20 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:13 MET