Accessing histograms saved in a root file

I was working with ROOTCore and at the end of the process, it created Histograms and saved them in a .root file. So, I have a ROOT file with histograms saved within it. I can see the histograms through TBrowser but I am not being able to access them by other methods. Could anyone suggest me of methods acess those histograms.


From code you can do

TH1* hist = nullptr;
file->GetObject("histname", hist);

On the ROOT prompt, a simple histname->Draw() will do.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.