Is this a bug ? (part 1)

Hi, if you do the following

TF1 *fit = new TF1(“fitit”,“gaus”,-8,8);

graph->Fit(“fitit”,“N”); ( <— “N” Option for virtual Int_t Fit )

TF1 *fitted = gf5->GetFunction(“fitit”);

Double_t meanfit = fitted->GetParameter(1);

ROOT crashes !

If you do the same with “R” as the option, it works.

So, how to get around this ?

of course it must crash!!!
When you specify the option “N” the function is not stored in the list of functions of the histogram. If you test the value of fitted after

TF1 *fitted = gf5->GetFunction("fitit"); you will see that fiited=0

Rene