How to extract a histogram and draw out the histogram from a root file and then divide two histograms?

So I have a root file with the path Users/andrewbarajas/output_IdId_Mc16a.root and with in this root file I have a TH1D histogram and I need to be able ti draw out a histogram from that root file. The histogram is TH1D wElEta

I tried this but got an error

TFile *f = new TFile("/Users/andrewbarajas/output_IdId_Mc16a.root");
root [1] TH1D *h = (TH1D*)f->Get("wElEta");
root [2] h->Draw();

Error in : Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
ROOT_prompt_2:1:1: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
h->Draw();

Try to run: rootls -l /Users/andrewbarajas/output_IdId_Mc16a.root