Auto adding entries to TH1 when fitting - bug?

If I generate a histogram and fill it, than fit for example a “gaus”, everything works fine. If I do the same, but histogram is created with autoscaling TH1F(“h”, “h”, 25, 1, 1), fitting “gaus” doubles the number of entries. Is it how it is supposed to be?

I attach my script and file with data (for FillRandom does not seem to work with autoscaling).

btw. Would it be possible for ROOTTalk to accept files without extension as an attachment?
entries_bug.C (307 Bytes)
signal_precursor_k2a.txt (1.06 KB)


Thanks for posting this. It has nothing to do with fitting, it is a problem when the histogram is created without axis limits.
I added a bug report in Savannah, see


This problem is now fixed in the ROOT trunk and it will be fixed also in the 5.28 patches version
Thanks for reporting it,