**************************************************************************/
// $Id$
-// $MpId: AliMpIntPair.cxx,v 1.6 2006/03/17 11:34:46 ivana Exp $
+// $MpId: AliMpIntPair.cxx,v 1.7 2006/05/24 13:58:29 ivana Exp $
// Category: basic
-//
+
+//-----------------------------------------------------------------------------
// Class AliMpIntPair
// --------------
// Class that defines the pair of integers.
//
// Included in AliRoot: 2003/05/02
// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+//-----------------------------------------------------------------------------
#include "AliMpIntPair.h"
+#include "AliLog.h"
+
#include <Riostream.h>
+using std::endl;
+/// \cond CLASSIMP
ClassImp(AliMpIntPair)
+/// \endcond
///////////////////////////////////////////////////
return *this;
}
+//_____________________________________________________________________________
+Int_t AliMpIntPair::Compare(const TObject* obj) const
+{
+/// Compare using operator <
+
+ const AliMpIntPair* pair = dynamic_cast<const AliMpIntPair*>(obj);
+ if ( !pair ) {
+ AliErrorStream() << "Wrong object type." << endl;
+ return -1;
+ }
+ return ( *this < *pair ) ? -1 : 1;
+}
//_____________________________________________________________________________
void AliMpIntPair::operator += (const AliMpIntPair& op)
{