[ROOT] Print() collections

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


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