Re: reading TObjString from file

Fons Rademakers (Fons.Rademakers@cern.ch)
Wed, 21 Apr 1999 13:37:56 +0000


Use

str->Write("bla")

and later get it with name "bla" from the file.

Cheers, Fons.

Ulrich Jost wrote:
>
> Hello,
>
> I would like to store a TString in a file. To be able to use Write(), I
> use instead TObjString. However, it seems that you cannot give a general
> name and read the TObjString with eg file->Get("string"), this name is the
> string itself.
> How can I store a string under a general name and read it with this name?
>
> TIA, Ulrich

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910