I have a root file which has canvas saved inside it. I want to convert canvas into histograms. I have attached my root file with this.
My root code is:
TCanvas c1 = (TCanvas)file.Get(“Canvas_1”);
TGraphAsymmErrors ae = (TGraphAsymmErrors)c1->GetPrimitive(“JetsHT_mu_inc1jet”);
TH1F h = (TH1F)ae->GetHistogram();
// h1 = (TGraphAsymmErrors*)c1->GetPrimitive(“JetsHT_mu_inc1jet”);
jetht_mad.root (13.7 KB)