[ROOT] TIterator and Redundant list of keys

From: Mignon Alexis (mignon@ganil.fr)
Date: Tue Apr 16 2002 - 11:21:47 MEST


Hi,

I would like if there is a standard way of getting the content of a 
file into a TObjArray avoiding problems with the several cycles of the 
same TObject.
I explain :

I use the way given in the Root Manual :
 
  fArr=new TObjArray(fFile->GetNkeys());
  fNext=new TIter(fFile->GetListOfKeys());
  while ( fKey=(TKey*)(*fNext)() ) fArr->Add(fKey->ReadObj() );

with this, I get several times the same object where there are more 
than one cycle.


Is there a trivial solution I have not seen yet ?

Thanks in advance.

-- 
Alexis Mignon
GANIL
Bd Henri Becqurel
14076 CAEN Cedex 5
France
tel: +(33) (0)231454680
e-mail : mignon@ganil.fr



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:50 MET