From TCanvas to TH1

How do you save/convert a histogram found in a TCanvas object to a normal TH1 object?

.ls
(TFile *) 0x7fcfcffb9870
root [1] .ls
TFile**		File.root	
 TFile*		File.root	
  KEY: TCanvas	c1;1	c1

https://root.cern.ch/root/roottalk/roottalk04/2633.html

Thanks a lot!