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}
Thank you.
Christian
Rene Brun wrote:
> Christian,
>
> I do not understand your question and what you try to achieve.
> More details please.
>
> Rene Brun
>
> On Fri, 1 Jul 2005, cstrato wrote:
>
>> Dear Rooters >> >> Root has a very elegant solution to init variable arrays in a class: >> class MyClass: public TObject { >> >> protected: >> TString fType; //Type of tree >> Int_t fNPars; //number of parameters >> Double_t *fPars; //[fNPars] array of fNPars parameters >> } >> >> However, I want to store a class MyClass permanently in TFile >> w/o storing an array fTree of fNTrees trees. >> Is it possible to write "//! [fNTrees]", i.e.: >> class MyClass: public TObject { >> >> protected: >> TString fType; //Type of tree >> Int_t fNTrees; //! number of trees >> TTree *fTree; //! [fNTrees] array of fNTrees trees >> } >> >> Thank you in advance. >> >> Best regards >> Christian >> _._._._._._._._._._._._._._._._ >> C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a >> V.i.e.n.n.a A.u.s.t.r.i.a >> _._._._._._._._._._._._._._._._ >>
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:10 MET