Just a quick question. I was asked to do a set of things with ROOT to create a macro:
1) Create histogram using this command TH1F *h = new TH1F("h", "h", 60,0,60);
2) Open a root file
3) Then from flasher in this root file use Draw function to draw om number in this histogram under the condition that we have string number 62 and om number 2
4) Use command GetEntries() to get number of events
Now I created the histogram with that TH1F command, then I opened the ROOT file with TFile...after that though I don't know how to use the Draw function. I can seperately do mytree->Draw(...) but how do I get that plot into my *h histogram I created? That way when I input h.Draw() I will see the plot of my unique histogram that has the required conditions. Step 4 is simple but step 3 is confusing.
I can draw the histogram and have it printed out, but how do i have it saved into my TH1F historgram? is it just a simple command? like something that needs to be put into the parentheses?
Thanks in advance