#include #include void gethisto() { //Open TFile and get histograms //TFile fhist("beam_Profile.root"); TFile *fhist = new TFile("beam_Profile.root"); // TH1D *lab_profile = (TH1D*)fhist.Get("Blab_smear"); TH1D *lab_profile = (TH1D*)fhist->Get("Blab_smear"); lab_profile->Draw("ep"); //fhist.Close(); fhist->Close(); }