[ROOT] Named collections

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Fri Nov 24 2000 - 18:12:13 MET


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