Hello,
I have a set of values per bin (I have 10 bins in the histo) and I need to fill up a new histogram with the set of values I have. Is there any documentation in ROOT which would help me do it ?
Thanks.
Cheers,
Shreya
Hello,
I have a set of values per bin (I have 10 bins in the histo) and I need to fill up a new histogram with the set of values I have. Is there any documentation in ROOT which would help me do it ?
Thanks.
Cheers,
Shreya
You can use Fill with a weight (one fill per bin).
https://root.cern/doc/master/classTH1.html#a498de8e0804e75fc75e62dc14a3bb62d
Or SetbBinContent (may be easier)
https://root.cern/doc/master/classTH1.html#a9599e2dae40c574fd9d8970aaf638ee6
Thank you, I have used SetBinContent, it works well.
Best,
Shreya
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.