I have a root file, which contains a 2D histogram named “h2”.
I can read h2 histogram in interactive mode as following:
TFile f(“Yb.root”);
TH2F h = (TH2F)f.Get(“h2”);
h->Draw()
However, when I copy this to macro, there is no error, but I got nothing. The graph is all white.
Here is link to my root file: 1drv.ms/u/s!AtQQQjEImW1Wg9s3Fef9qT7mkMz2ug
I used ROOT 5.34/32 (v5-34-32@v5-34-32, Jun 23 2015, 17:58:02 on win32)
Thank you very much,
read.C (142 Bytes)