Re: [ROOT] TObjArray::Sort, ROOT container classes

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Mon Feb 09 2004 - 15:32:31 MET


Hi Gero,

On Mon, 2004-02-09 at 14:29, Gero Flucke wrote:
> Hi,
> I tried to find out how TObjArray::Sort work, but could not find the
> implentation of the method QSort which is used in there.
> 
Check TSeqCollection.cxx.

> But my main question is whether the sorting uses only the TObject::Compare
> method or whether IsEqual is also involved (form what I read in the users
> guide I guess not).
> 
Only TObject::Compare() is used. IsEqual() is used for FindObject().

> In general it would be good to know where in the ROOT container classes
> Compare and IsEqual are used. Maybe the methods in TObject can get little
> docu about that? The user's guide tells about IsEqual that it is used in
> FindObject, but I know it's used also in TObjArray::IndexOf and
> TCollection::Contains
> 
Yes, IsEqual() is used in all method looking for a precise object.

-- Fons


> Cheers
> 
> 	Gero
> 
> 
> PS: Using 3.05_07, but also tried the most recent HTML documentation.
> 
> -----------------------------------------------------------------------
> Gero Flucke
> 1a / 603
> DESY
> Notkestr. 85
> 22607 Hamburg
> +49-(0)40-8998-2454
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://www.rademakers.org/fons/      Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET