]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpIntPair.h
Adding new libraries
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpIntPair.h
index a8688f0655aa79ae6a9e1a18a7e4b671670495cb..a3846c62c3d2ab53394c0d5235326d05261428c4 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpIntPair.h,v 1.5 2006/05/23 13:07:29 ivana Exp $
+// $MpId: AliMpIntPair.h,v 1.6 2006/05/24 13:58:07 ivana Exp $
 
 /// \ingroup basic
 /// \class AliMpIntPair
@@ -11,7 +11,7 @@
 /// The pair created by the default constructor is in invalide state,
 /// setting one of values changes the state to valid.
 ///
-/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+/// \author David Guez, Ivana Hrivnacova; IPN Orsay
 
 #ifndef ALI_MP_INT_PAIR_H
 #define ALI_MP_INT_PAIR_H
@@ -35,18 +35,39 @@ class AliMpIntPair : public TObject
   void operator += (const AliMpIntPair& op);
   void operator -= (const AliMpIntPair& op);
 
+  //
   // static get methods
+  //
+         /// Return invalid pair
   static AliMpIntPair Invalid() {return AliMpIntPair();}
 
+  //
   // get methods
+  //
+         /// Return first value
   Int_t  GetFirst() const  {return fFirst;}
+         /// Return second value
   Int_t  GetSecond() const {return fSecond;}
+         /// Return validity
   Bool_t IsValid() const   {return fValidity;}
 
+  //
   // set methods
+  //
+         /// Set first value 
   void SetFirst(Int_t ix)  {fFirst=ix; fValidity=true; }
+         /// Set second value 
   void SetSecond(Int_t iy) {fSecond=iy; fValidity=true;}
+         /// Set both first and second value
+  void Set(Int_t ix, Int_t iy) { fFirst=ix; fSecond=iy; fValidity=true; }
   
+  //
+  // TObject functions used for sorting in Root collections
+  //
+         /// Return true as Compare() function is implemented 
+  virtual Bool_t  IsSortable() const {return kTRUE;}
+  virtual Int_t   Compare(const TObject* obj) const;
+
  private:
   // data members
   Int_t   fFirst;    ///< the first value