Hi Rooters,
I'm afraid I do some basic error, because the following example is so
trivial, but doesn't work:
TFile file("histo.root")
TH1D *histo = (TH1D *)file.Get("histogram")
int maxbin=histo.GetNbinsX()
for(int i=1;i<=maxbin;i++) {
histo.SetBinContent(i,200);
}
Now, if I draw the histogram, nothing has been changed. But if I modify
the histogram without a for loop:
histo.SetBinContent(3,200)
then I can see the changes when I draw the histogram. Could you help me,
why?
Thanks
Daniel
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:22 MET