]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpIntPair.cxx
PMD module
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpIntPair.cxx
index 40b8e40823a12c5d7b9f0d756a6e0a59b12cb62b..2f4c4814e676d14305a276e1f780de952d81b26c 100755 (executable)
  **************************************************************************/
 
 // $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
 
 
 ///////////////////////////////////////////////////
@@ -147,7 +154,19 @@ AliMpIntPair& AliMpIntPair::operator=(const AliMpIntPair& src)
   
   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)
 {