Filling TCanvas with TFile

Hi,

I have a histogram in a TFile object, and am curious how I can display the histogram in a TCanvas object?

Thanks

ROOT Primer -> File I/O and Parallel Analysis -> Storing ROOT Objects
PyROOT

Let say you histogram is “h” and your toot file “file.root”. The very simple way is:

$ root file.root
root [0] h->Draw()

you can also start root and then open the file:

$ root
root [0] TFile f("file.root");
root [1] h->Draw();