Re: [ROOT] sorting

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Jul 28 2000 - 18:56:34 MEST


Hi Dmitri,

   as soon as you add another object to the array (or remove an object)
IsSorted() will return false. What is the case the this does not work
for you?

Cheers, Fons.



On Thu, Jul 27, 2000 at 01:11:11PM -0500, Dmitri Litvintsev wrote:
> 
> 
> Hi Rooters, 
> 
> I've run into the following problem. 
>  
>  I have a object with an attribute that changes over time. 
> I shove a set of these objects into TClonesArray(). I need 
> to sort them from time to time since they must be ordered 
> with respect to this attribute. I added method Compare. 
> And use Sort() method.
> I noticed that this method can be called only once. Having sorted 
> an array once, the flag IsSorted() is set and cannot be changed. 
> 
> Could you advise on how to avoid this problem?
> 
> this is really important for me, 
> Dmitri Litvintsev
> 
> /----------------------------------------------------------\
> | Tel:       (630) 840 5005                                |  
> | FAX:       (630) 840 2968                                |      
> | office:    169-E CDF Trailers                            |
> | E-mail:    litvinse@fnal.gov                             |
> \----------------------------------------------------------/
> 
> 
> 

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET