Put an histogram in a canvas WITHOUT displaying it


Is there by any chance the possibility to just indicate to ROOT that I want to put a histogram in a given canvas, so that eventually I write this canvas in a postscript file but that at no point I display the canvas ?

Also, another question, is there a way to directly write into a postscript file histograms ?

Thanks a lot for your help.

run with

root -b or call

gROOT->SetBatch(kTRUE) or kFALSE TCanvas *c1 = new TCanvas; myhist->Print(); c1->Print("c1.ps");