Hi Christian, You can already give a name to all the collections. All collections have a SetName/GetName function. Rene Brun Christian Holm Christensen wrote: > > Hi ROOT'ers, > > Would it be possible to have name collections in ROOT? For example, > one could have a class TNamedClonesArray like > > class TNamedClonesArray : public TClonesArray { > private: > Char_t fName[32]; // Must be fixed size in TTree (?) > Char_t fTitle[64]; // Must be fixed size in TTree (?) > // And so on ... > }; > > And one could do > > TTree* t = new TTree("T", "A Tree"); > TNamedClonesArray* a = new TNamedClonesArray("A", "An Array", "FooObject"); > > t->Branch(a->GetName(),&a); > > (or one could have simply TTree::Branch(TNamedClonesArray*, Int_t > buffsize, Int_t split), but also > > TFolder *folder = new TFolder(); > folder->SetName("data"); > folder->Add(a); > > In similar vain one could have TNamedObjArray, TNamedList, and so on. > > Anyway, just a suggestion. > > Yours, > > Christian ----------------------------------------------------------- > Holm Christensen Phone: (+45) 35 35 96 91 > Sankt Hansgade 23, 1. th. Office: (+45) 353 25 305 > DK-2200 Copenhagen N Web: www.nbi.dk/~cholm > Denmark Email: cholm@nbi.dk
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:37 MET