Re: Question about TIter

From: Thomas Lauf <thl_at_hll.mpg.de>
Date: Thu, 15 Oct 2009 18:09:07 +0200


Hello Melinda,

I guess TIter::Reset() will do the thing you are looking for. To do several passes over one array:

TIter Next( MyArray )

while( Next() ) {

   ... do stuff ...
}

Next.Reset()

while( Next() ) {

   ... do other stuff ...
}

Greetings

Thomas

Melinda Siciliano wrote:
> Dear all,
>
> I want to do some tests on a TObjArray that contains different histograms
> (TH2 and TH1 in the same array). I would like to do different test on TH1
> and TH2, and in order to acces on them, I use a TIter object. The problem is
> that after doing a series of tests on the array, I would like to start again
> from the beginning of the array and do a new series of new tests.
>
> How can I "rewind" the access to the array objects in order to access again
> from the first object?
>
> Thanks,
>
> Melinda
>
Received on Thu Oct 15 2009 - 18:10:06 CEST

This archive was generated by hypermail 2.2.0 : Thu Oct 15 2009 - 23:50:04 CEST