How to draw a TPad, that is saved in a root file

Dear co-rooters!

I have a root file (canvas.root) that contains a TPad called Canvas_3.
What I want to do is to draw the TPad!
What I do is the following

$ root -l canvas.root
root [0] 
Attaching file /home/astamato/Downloads/scpDownloads/canvas.root as _file0...
root [1] .ls
TFile**		/home/astamato/Downloads/scpDownloads/canvas.root	
TFile*		/home/astamato/Downloads/scpDownloads/canvas.root	
KEY: TPad	Canvas_3;1	Canvas_3
root [2] Canvas_3->Draw()

Surprisingly, there is no TCanvas poping out!
I tried to create my own TCanvas first, but I still get nothing to be drawn!

root [1] TCanvas c1("c1", "First canvas", 400, 300);
root [2] Canvas_3->Draw()

Any idea on how to draw this?
Thanks in advance!

Please find a link to the root file here

Try Canvas_3->DrawClone():

root [0]
Attaching file canvas.root as _file0...
root [1] .ls
TFile**         canvas.root
 TFile*         canvas.root
  KEY: TPad     Canvas_3;1      Canvas_3
root [2] new TCanvas
(class TCanvas*)0x338f970
root [3] Canvas_3->DrawClone()
(const class TObject*)0x6fbf768
root [4]

Thank you very much for your help!!!

1 Like

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