Problem in Chi2Test ig TH1

When I run the following program, then the first call of Chi2Test runs fine. When setting a new Entry in one bin (e.g. 20) via Fill or SetBinContent, I get the message:
"Info in TH1F::Chi2TestX: There is bin in Hist1 with less than 1 number of events."
As far as I understood there is no 0 in all if the bin and hence I wanted to ask what I can do to correct this error-message.

Kind regards,


[code]void Fit()
TH1F h1(“Hist1”, “Hist1”, 40, 0.0, 40.0);
TH1F h2(“Hist2”, “Hist2”, 40, 0.0, 40.0);
for (unsigned int i=0; i<=41; i++)
h1.SetBinContent(i, (float)(1.));
h2.SetBinContent(i, (float)(1.));

std::cout<<"Chi 1:"<<h1.Chi2Test(&h2,"UUCHI2")<<std::endl;

std::cout<<"Chi 2:"<<h1.Chi2Test(&h2,"UUCHI2")<<std::endl;

h2.SetBinContent(20, 50);
std::cout<<"Chi 3:"<<h1.Chi2Test(&h2,"UUCHI2")<<std::endl;


You are using an old version. Move at least to version 5.20 or newer.