Re: [ROOT] Print() collections

From: Anton Fokin (anton.fokin@smartquant.com)
Date: Fri Mar 16 2001 - 14:47:13 MET


Ok,

now I see you've introduced

TObject::Print(..) const

so actually I do not overload Print with my old non-const prints... which I
have in all my (about hundred of) classes... I also foress that some of
other overloads are not overloads any longer.

What a mess...

/Anton

http://www.smartquant.com


----- Original Message -----
From: Rene Brun <Rene.Brun@cern.ch>
To: Anton Fokin <anton.fokin@smartquant.com>
Cc: roottalk <roottalk@pcroot.cern.ch>
Sent: Friday, March 16, 2001 2:34 PM
Subject: Re: [ROOT] Print() collections


> Hi Anton,
>
> You must be using an old version. TCollection::Print uses an iterator
> and not the macro ForEach.
>
> I take this opportunity to mention again:
>  PLEASE ALWAYS INDICATE WHICH VERSION/OS YOU USE
>
> Rene Brun
>
> Anton Fokin wrote:
> >
> > Hi Rene&Fons,
> >
> > by default TCollection uses
> >
> > this->ForEach(TObject,Print)(option);
> >
> > Thus if you put objects derived from TObject with their own Print()
memeber
> > function you will still get
> >
> > OBJ: TTicker    TTicker A ticker
> > OBJ: TTicker    TTicker A ticker
> > OBJ: TTicker    TTicker A ticker
> > OBJ: TTicker    TTicker A ticker
> > OBJ: TTicker    TTicker A ticker
> >
> > instead of actual Prints.
> >
> > Ticker3  Bloomberg3  Reuter3  NYSE3  CUSIP3
> > Ticker2  Bloomberg2  Reuter2  NYSE2  CUSIP2
> > Ticker5  Bloomberg5  Reuter5  NYSE5  CUSIP5
> > Ticker4  Bloomberg4  Reuter4  NYSE4  CUSIP4
> > Ticker1  Bloomberg1  Reuter1  NYSE1  CUSIP1
> >
> > Is it done on purpose? If not, I propose you use another iterator like
> > next() to get things printed correctly.
> >
> > Regards,
> > Anton
> >
> > http://www.smartquant.com
>
>



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:39 MET