It could be that I misunderstand your question, but why not simply do: TFile *f = new TFile("myfile.root","recreate"); ... h1->Draw(); h1->Write(); h2->Draw("SAME"); h2->Write(); h3->Draw("SAME"); h3->Write(); ... doing f->Write(); will write all histograms created with f being the current dir to the file. See Users Guide for more details. Rene Brun Sebastien Greder wrote: > > Hello Rooters, > > I just have a short question ; I'm running some code to fill histos and > want them to be then stored in a root file. > To store one histo is obvious but I'd like to superpose several histos and > store the final superposed histo in the root file (it would be more > practical than superposing after having stored all the histos in > the root file). > To sum up, I would like to do the same operation like : > > h1->Draw(); > h2->Draw("SAME"); > h3->Draw("SAME"); > ... > > but while writing the histo in a root file. > I can't find out how. > Could someone give me some advices about this ?? > > Thanks in advance, > > seb.
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:51 MET