TH1F::Fit crash with TF1 on wrong interval

From: Jiri Kvita <Jiri.Kvita_at_cern.ch>
Date: Thu, 4 Mar 2010 10:17:46 +0100


Dear ROOT talk,

When iterative-fitting a histogram with a gauss withing +/- n-sigma around mean in a range using the "RQ" option, it sometimes happened that the [lower, upper] fit function interval was outside the histogram range, upon which the TH1F::Fit crashed with

Error: Symbol G__exception is not defined in current scope :0: Error: type G__exception not defined FILE: LINE:0

I understand it is user's responsibility to guard and protect a reasonable fit range, but I would not expect a crash with an unobvious message.

Version I used:
Linux 2.6.18-164.11.1.el5 #1 SMP x86_64 x86_64 x86_64 GNU/Linux /afs/cern.ch/sw/lcg/app/releases/ROOT/5.22.00/slc4_amd64_gcc34/root/bin/root

I ACLIC-compiled my code, but one short problem reproduction can be reached e.g. via the following commands just in CINT:

TH1F a("haha", "haha", 10, -5, 5);
a.FillRandom("gaus", 100);
TF1 fit("myfun", "gaus(0)", 6., 20.);
fit.SetParameters(40., 0., 1.);
a.Fit(&fit, "R");

With thanks and regards,

Jiri Kvita Received on Thu Mar 04 2010 - 10:18:57 CET

This archive was generated by hypermail 2.2.0 : Thu Mar 04 2010 - 11:50:01 CET