Hello rooters!
I'm trying to fill histograms named "si" (where i is an integer) with
the following piece of code but I get this message:
"Warning in <TH1::GetBinContent>: this method must be overridden!"(times
the number of histograms)
"Warning in <TH1::GetBinContent>: this method must be overridden!"
(times the number of histograms)
and it seems to enter an endless loop since it shows regularly the
warning message (even after a ctrl C).Moreover the histogram seems not
to be filled.
here is the piece of code:
{
float xbins[21];
float xint=(50.-.1)/20.;
h1= (char *) calloc(10,sizeof(char));
h2= (char *) calloc(10,sizeof(char));
for(int ij=0;ij<21;ij++){
xbins[ij]=.1*pow((50./.1),(float)ij / 20.);
}
for(int i=1;i<7;i++){
int id1=i;
sprintf(h1,"s%d",id1);
TH1::TH1(h1,h1,20,xbins);
}
for(int i=1;i<7;i++){
int id1=i;
sprintf(h2,"s%d",id1);
TH1 *h3=(TH1*)gROOT->FindObject(h2);
h3->Fill(xbins[i]);
}
}
--
BARET Bruny
Groupe AMS
Laboratoire de Physique Subatomique et Cosmologie (LPSC)
53, Avenue des Martyrs F-38026 GRENOBLE CEDEX
tel: 33 (0)4 76 28 41 26
e-mail: baret@lpsc.in2p3.fr
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET