Re: Problem with automatic range for histos

From: Lorenzo Moneta <Lorenzo.Moneta_at_cern.ch>
Date: Wed, 8 Feb 2012 21:07:08 +0000


Hi,

In case of automatic binning you need now to call

hped->BufferEmpty()

before fitting. I have fixed this in the trunk, so it is done automatically for the new version,

Thanks for reporting this problem,

Cheers

Lorenzo
On Feb 7, 2012, at 7:15 PM, Vito Di Benedetto wrote:

> Dear ROOT experts,
>
> I'm trying to fit an histogram that I define with automatic range
>
> TH1D *hped = new TH1D("hped","hped",500,0.,0.);
>
> if I fill it with only 500 entries, when I try to fit it, it seems to be
> empty. I get the error message:
>
> Warning in <ROOT::Fit::FillData>: fit range is outside histogram range,
> no fit data for xaxis
> Warning in <Fit>: Fit data is empty
>
>
> If I fill an identical histogram with 5000 entries the fit works fine.
>
> How can I avoid the problem in the case I have only 500 or less entries
> in my histogram?
>
> In attach there is a macro reproducing this issue.
> I'm using ROOT v5.32.00 on 32 bit GNU/Linux
>
> Cheers,
> Vito
>
> <HistoTest.C>
Received on Wed Feb 08 2012 - 22:07:15 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 09 2012 - 11:50:01 CET