In addition to my previous posting: In Root version 4.00/06, it is possible to write objects non deriving from TObject via TDirectory::WriteObject. See: http://root.cern.ch/root/htmldoc/TDirectory.html http://root.cern.ch/root/htmldoc/TDirectory.html#TDirectory:WriteTObject Rene Brun Victor Perevoztchikov wrote: > > Hi Wolfgang, > > > kOverwrite flag was the right thing. But that destroyed the information > > > written in previous steps. Can I TFile::Write("",kOverWrite) more than > In STAR we use this mode. We use TObject::Write method. But to avoid > destroying the previous record we each time change the name of key. > In our case it is some_name.run_number.event_number like > "datatype.00123.123456" > Victor > > Victor M. Perevoztchikov perev@bnl.gov > Brookhaven National Laboratory MS 510A PO Box 5000 Upton NY 11973-5000 > tel office : 631-344-7894; fax 631-344-4206; > > ----- Original Message ----- > From: "Rene Brun" <Rene.Brun@cern.ch> > To: "Wolfgang Waltenberger" <walten@qhepu3.oeaw.ac.at> > Cc: "root talk list" <roottalk@pcroot.cern.ch> > Sent: Friday, June 04, 2004 9:50 AM > Subject: Re: [ROOT] cycles > > > Hi Wolgang, > > > > Instead of TFile::Write, use myobject.Write(); > > ie, write your objects one by one. > > > > Rene Brun > > > > Wolfgang Waltenberger wrote: > > > > > > Dear root mailing list, > > > > > > I am writing to a TFile, and I have to write in more than one "go", > > > i.e. I have multiple TFile::Write() calls. > > > Now I would like to suppress the different "cycles", so I thought the > > > kOverwrite flag was the right thing. But that destroyed the information > > > written in previous steps. Can I TFile::Write("",kOverWrite) more than > > > once, and keep all the data at the same time? > > > > > > Cheers > > > > > > Wolfgang > >
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET