Please ignore my last posting......
T1F.h was needed.
> Hi,
>
> I am having trouble getting the parameters of a "pol1"
> fit to a profile when compiling.
>
> Version 3.03/02, under solaris 5.9, solarisCC5
>
> void FitAsym() {
> :
> //read in data
> TFile *f1 = new TFile("ScanB/PsaSum.root");
> sprintf(name, "%d/Asym_Thi_S%d_%d",egamma[gamma],i,rad);
> TH2S *hasym = (TH2S*) f1->Get(name);
>
> //check data, make some constraints....fill new histo
> TH2S *asym = new TH2S(name,name,nbinsx,minx,maxx,nbinsy,miny,maxy);
> :
> :
> TProfile *profx = new TProfile("profx","profx",nbinsx,minx,maxx);
>
> //Determine x-profile and fit <thi> = a + b.x for modified data
> profx = (TProfile *) asym->ProfileX();
>
> //Fit linear poly to profile
> profx->Fit("pol1","IM","",min,max);
>
> //get the fit......PROBLEMS here....
> TF1 *myfit = (TF1*) profx->GetFunction("pol1");
> Double_t p0 = myfit->GetParameter(0); <=== compiler complains
> Double_t p1 = myfit->GetParameter(1); <=== compiler complains
>
> //use these parameters to start real fit.....
> :
> :
> }
>
>
> The errors are :
> "FitAsym.cxx", line 202: Error: The type "TF1" is incomplete.
> "FitAsym.cxx", line 203: Error: The type "TF1" is incomplete.
>
>
> Cheers,
>
> Karl
>
==========================================================================
CEA Saclay, DAPNIA/SPhN Phone : (33) 01 69 08 7553
Bat 703 - l'Orme des Merisiers Fax : (33) 01 69 08 7584
F-91191 Gif-sur-Yvette E-mail : khauschild@cea.fr
France karl_hauschild@yahoo.co.uk
WWW: http://www-dapnia.cea.fr/Sphn
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:47 MET