/* TestObj.h */ #ifndef __TESTOBJ_H #define __TESTOBJ_H #include #include class Particle { public: int t[2]; //index of tracks int nt; Particle() { Clear(); } void Clear() { nt = 2; t[1] = t[0] = 1; } }; // Particle class Reconstruction: public TObject { public: Particle p[2]; //particles of reconstrction int np; Reconstruction() { Clear(); } virtual void Clear(const Option_t* = "") { np = 2; for (int i = 0; i < np; ++i) p[i].Clear(); } private: // static const bool gInitted; // static bool StaticInit() { Class()->IgnoreTObjectStreamer(); } ClassDef(Reconstruction,1); }; // Reconstruction class AllReconstructions { public: // Reconstruction r[90]; TClonesArray r; //reconstructions AllReconstructions(): r("Reconstruction",6) {} void Init() { for (int i = 0; i < 6; ++i) new(r[i]) Reconstruction; } void Clear() { for (int i = 0; i < 6; ++i) r[i]->Clear(); } }; // AllReconostructions #endif // __TESTOBJ_H