Saving canvas written in a root file

I have a TCanvas canvas written in a root file file.root
In the following situation

TFile * f = TFile::Open(“file.root”)
TCanvas * c;
f -> GetObject(“canvas”, c)

I need to call

c -> Draw()

if if want to call SaveAs on c.

TCanvas::Draw() seems redundant here. Comments and suggestions?

 auto f = new TFile("c1.root");
 TCanvas *c ;
 f->GetObject("c1", c);

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.