ROOT Version (e.g. 6.12/02):
Platform, compiler (e.g. CentOS 7.3, gcc6.2):
I’m sorry to ask this question, but I really hard to find information about the question though lost my way for 4 hours.
Actually, I have been found some informations looks like related to the problem but I could not apply to my system…
My plan is make a same histogram from the tree and obtain sum of bins through Integration(), but I cannot copy the histogram. I tried to make same histrogram by using Fill() and setbranch~ but it has problem. There are bins to make accruate same quantities of the one of histogram from the tree… because I always used constant bins like TH1F *h1 = new TH1F(“a”, “b”, 100, 0, 10). Well… there are ‘getbincontent’ and ‘setbincontent’ but it require same histogram that I have to make… So it is nonsense.
I am not sur I fully understood your question but let me try to give some answer. Imagine you have a tree named “T” and inside this tree a variable (column) called “V” you want to use to fill the histogram “h1” you describes in your post. You can just do:
TH1F *h1 = new TH1F("h1", "h1", 100, 0, 10);
T->Draw("V>>h1");
Wow thx. I actually follow this answer in next week because my home computer is window 7 So I can use root at my school…
If I apply that statements, h1 possess all of property of V or just draw following initial condition bins = 100, [0, 10] ? And if the former is right, h1->Integral() means sum of bins?
My English skill is so poor… Maybe that’s reason why hard to understand my writings