Hello, I am trying to create a histogram using Root from Python. I created the histogram in python by writing:
“h1 = ROOT.TH1F(“h1”,” Some Title",500,0,5)
I then created a TFile objects so that ROOT can access the file in which I created my histogram files.
“ThetaFile = ROOT.TFile(“Math.root”,“NEW”)”
Then in the ROOT prompt, I wrote
root  TFile *hfile = new TFile(“Math.root”);
root TH1F histog = (TH1F) hfile->Get(“h1”);
And I don’t get a histogram. Instead I get this warning:
Error in : Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
ROOT_prompt_3:1:1: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
When I read about creating histograms, it writes that a histogram plot window should appear, but I am not seeing that. What am I doing wrong? Do I need to install something to see the histogram?