What is the meaning of SetBinContent(0) ?
Is it a bug to use this?
for example:
void bug2()
{
TH1D *h=new TH1D(“aaa”,“bbb”,10,1,11);
h->SetBinContent(1,2);
cout<<"bin 1 => "<GetBinContent(1)<<endl;
h->SetBinContent(0,4);
cout<<"bin 0 => "<GetBinContent(0)<<endl;
h->SetBinContent(-18,8);
cout<<"bin -18 => "<GetBinContent(-18)<<endl;
cout<<"bin 0 => "<GetBinContent(0)<<endl;
cout<<"bin 1 => "<GetBinContent(1)<<endl;
}
the output is:
bin 1 => 2
bin 0 => 4
bin -18 => 4
bin 0 => 4
bin 1 => 2
so SetBinContent(0) works properly!
Is this means that histogram has 11 bins, not 10 ?!
I’m asking becouse I have used many times before SetBinContetn(0), everythings seems to work properly, so I wonder if I must change everywhere SetBinContent(i) to SetbinContent(i+1);
regards
jimmij