6 // Class that defines the pair of integers.
7 // The pair created by the default constructor is in invalide state,
8 // setting one of values changes the state to valid.
10 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
12 #ifndef ALI_MP_INT_PAIR_H
13 #define ALI_MP_INT_PAIR_H
17 class AliMpIntPair : public TObject
20 AliMpIntPair(Int_t ix,Int_t iy);
21 AliMpIntPair(Int_t ix,Int_t iy, Bool_t validity);
22 AliMpIntPair(const AliMpIntPair& right);
24 virtual ~AliMpIntPair();
27 Bool_t operator < (const AliMpIntPair& pos2) const;
28 Bool_t operator == (const AliMpIntPair& pos2) const;
29 Bool_t operator != (const AliMpIntPair& pos2) const;
30 AliMpIntPair& operator = (const AliMpIntPair& src) ;
31 void operator += (const AliMpIntPair& op);
32 void operator -= (const AliMpIntPair& op);
35 static AliMpIntPair Invalid() {return AliMpIntPair();}
38 Int_t GetFirst() const {return fFirst;}
39 Int_t GetSecond() const {return fSecond;}
40 Bool_t IsValid() const {return fValidity;}
43 void SetFirst(Int_t ix) {fFirst=ix; fValidity=true; }
44 void SetSecond(Int_t iy) {fSecond=iy; fValidity=true;}
48 Int_t fFirst; // position along x
49 Int_t fSecond; // position along y
50 Bool_t fValidity; // validity
52 ClassDef(AliMpIntPair,1) //utility class for the motif type
55 AliMpIntPair operator + (const AliMpIntPair& op1,const AliMpIntPair& op2);
56 AliMpIntPair operator - (const AliMpIntPair& op1,const AliMpIntPair& op2);
57 AliMpIntPair operator * (const AliMpIntPair& op1,const AliMpIntPair& op2);
58 ostream& operator << (ostream &stream,const AliMpIntPair& op);
60 #endif //ALI_MP_INT_PAIR_H