Re:

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Thu, 12 Jun 2008 15:24:58 +0200


Hi Marc,

you were unlucky enough to pick a doc format that is completely incompatible with ROOT's I/O. A data member commented with //! means "do not stream". And putting a "+" behind the class name in the LinkDef is sufficient:

   rootcint –f dict.x –c RootLaterDescription.h Linkdef.h should do.

Cheers, Axel.

On 2008-06-12 13:26, Marc de Kamps wrote:
>
>
> Hi,
>
>
>
> I have the following problem. I have an object of type
> RootLayerDescription. Within CINT I am able to use it. I can set values
> of its members and write it into a file.
>
> If I read it back from the file in a later CINT session, however, all
> member variables have the default values given by the constructor and
> not the values I wanted to save.
>
>
>
> Probably I forgot something trivial, but it would be a great help to
> know what it is.
>
>
>
> If I generate the dictionary file with:
>
> rootcint –f dict.x –c RootLaterDescription.h, I note that no code is
> generated to serialize the member variables (see code below)
>
>
>
>
>
> One final question. If I want to use the new I/O version, my
> understanding is that if I have a LinkDef.h file as the one attached,
> everything is correct. Or do I have to use
>
> rootcint –f dict.x –c RootLaterDescription.h+
>
> to generate the dictionary?
>
>
>
> Thanks,
>
> Marc
>
>
>
> void RootLayerDescription::Streamer(TBuffer &R__b)
>
> {
>
> // Stream an object of class RootLayerDescription.
>
>
>
> UInt_t R__s, R__c;
>
> if (R__b.IsReading()) {
>
> Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
>
> TNamed::Streamer(R__b);
>
> R__b.CheckByteCount(R__s, R__c, RootLayerDescription::IsA());
>
> } else {
>
> R__c = R__b.WriteVersion(RootLayerDescription::IsA(), kTRUE);
>
> TNamed::Streamer(R__b);
>
> R__b.SetByteCount(R__c, kTRUE);
>
> }
>
> }
>
>
>
>
>
>
>
> -
>
> Dr. Marc de Kamps
>
> Biosystems Group
>
> School of Computing
>
> University of Leeds
>
> LS29JT, Leeds , UK
>
>
>
> dekamps_at_comp.leeds.ac.uk <mailto:dekamps_at_comp.leeds.ac.uk>
>
> http:/www.comp.leeds.ac.uk/dekamps
>
>
>
Received on Thu Jun 12 2008 - 15:25:03 CEST

This archive was generated by hypermail 2.2.0 : Thu Jun 12 2008 - 17:50:02 CEST