flexibility in sort compare functions

From: George Irwin (gmieg@EGNEXT1.SLAC.STANFORD.EDU)
Date: Mon Feb 02 1998 - 23:24:27 MET


I need the ability to sort a TClonesArray with various compare
functions.  For example, sort on plane number, or counter number
within plane, or pulse height, or time, or some combination of these,
etc.  TClonesArray seems to want me to compile my compare function
into the object occupying the TClonesArray.  But I need the
flexibility to define new kinds of sorts in an analysis job
constructed after the object in the TClonesArray is defined.
With STL containers I would use the STL sort construct with different
externally defined compare functions.  How can I achieve this
functionality with TClonesArray.  Thanks.  George



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:29 MET