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