Re: Variable tree array in class

From: cstrato <cstrato_at_aon.at>
Date: Tue, 05 Jul 2005 20:20:25 +0200


Dear Philippe

Thank you for this information. It is good to know that this is indeed possible.

Best regards
Christian

Philippe Canal wrote:

> Hi Christian,
>
>

>>Is it possible to write:

>
>
> Yes. Note that since the data member is set 'transient' the information
> [fNPars] is not used (since it would be used only when storing and
> restoring).
>
> Cheers,
> Philippe.
>
> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
> On Behalf Of cstrato
> Sent: Saturday, July 02, 2005 9:31 AM
> To: Rene Brun
> Cc: roottalk_at_pcroot.cern.ch
> Subject: Re: [ROOT] Variable tree array in class
>
> Dear Rene
>
> Meanwhile I realized that variable length arrays are only allowed
> for simple types, so I have to store the trees in a TList fTrees.
>
> However, my question regarding transient data members remains:
> Is it possible to write:
> class MyClass: public TObject {
>
> protected:
> TString fType; //Type of tree
> Int_t fNPars; //! number of parameters
> Double_t *fPars; //! [fNPars] array of fNPars parameters
> }
> in order to prevent that fNPars and fPars are written to file
> when I write MyClass to file?
>
> Thank you.
> Christian
>
Received on Tue Jul 05 2005 - 20:20:32 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:10 MET