Root streamers

Hello,
I have a class TTestClass. Which has a struct as a member –

class TTestClass : public TObject {
public:
Int_t flen;
struct __data {
Int_t len;
Double_t *xdata; //[len]
}*fData; //[flen]

ClassDef(TTestClass,1);

};

So, how do I write the xdata entry to a .root file using the default streamer generated by ROOT for TTestClass??

Thanks, nebu

HI,

For clarify (and to avoid confusing CINT), I prefer to write your class as:

[code]class TTestClass : public TObject {
public:
struct __data {
Int_t len;
Double_t *xdata; //[len]
};’

Int_t flen;
__data *fData; //[flen]

ClassDef(TTestClass,1);
};[/code]which should be handle just fine by the default streamer. Alternatively you could use: class TTestClass : public TObject { public: std::vector<std::vector<Double_t> > fData; ClassDef(TTestClass,1); }; which would be much easier to use ; if you use this, you will need to explicitly generate the dictonary for TTestClass and for std::vector<std::vector<Double_t> >.

Cheers,
Philippe.

Hi,
Thanks a lot that worked perfectly!

Cheers nebu.