void Convertcanv(){ { TFile myfile("gate1124Proj396.root","read"); TH1F *htwo; TCanvas *c1 = (TCanvas*)myfile.Get("c1"); htwo = (TH1F*)c1->GetPrimitive("ggdt_cube_zx_py"); TCanvas c2; htwo->Draw(); } }