]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpVIndexed.h
Added switch as new member for DA (Christian)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVIndexed.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // $MpId: AliMpVIndexed.h,v 1.7 2006/05/24 13:58:07 ivana Exp $
6
7 /// \ingroup basic
8 /// \class AliMpVIndexed
9 /// \brief Base class that defines the limits of global pad indices.
10 ///
11 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
12
13 #ifndef ALI_MP_V_INDEXED_H
14 #define ALI_MP_V_INDEXED_H
15
16 #include <TObject.h>
17
18 #include "AliMpIntPair.h"
19
20 class AliMpVPadIterator;
21
22 class AliMpVIndexed : public TObject
23 {
24  public:
25   AliMpVIndexed(const AliMpIntPair& lowLimit, const AliMpIntPair& highLimit);
26   AliMpVIndexed();
27   virtual ~AliMpVIndexed();
28
29   // methods
30           /// Create iterator over this element
31   virtual AliMpVPadIterator* CreateIterator() const = 0;
32   virtual AliMpIntPair  GlobalIndices(const AliMpIntPair& localIndices) const;
33
34   // set methods
35   void SetLowIndicesLimit(const AliMpIntPair& limit);
36   void SetHighIndicesLimit(const AliMpIntPair& limit);
37
38   // get methods
39   Bool_t    HasIndices(const AliMpIntPair& indices) const;
40   Bool_t    HasValidIndices() const;
41   AliMpIntPair  GetLowIndicesLimit() const;
42   AliMpIntPair  GetHighIndicesLimit() const;
43
44  private:
45   // data members 
46   AliMpIntPair   fLowIndicesLimit;  ///<  the lowest global pad indices 
47   AliMpIntPair   fHighIndicesLimit; ///<  the hihgest global pad indices 
48
49   ClassDef(AliMpVIndexed,1) // A motif position
50 };
51
52 // inline functions
53
54 /// Set low indices limit
55 inline void AliMpVIndexed::SetLowIndicesLimit(const AliMpIntPair& limit)
56 { fLowIndicesLimit = limit; }
57   
58 /// Set high indices limit
59 inline void AliMpVIndexed::SetHighIndicesLimit(const AliMpIntPair& limit)
60 { fHighIndicesLimit = limit; }  
61   
62 /// Return low indices limit
63 inline AliMpIntPair AliMpVIndexed::GetLowIndicesLimit() const
64 { return fLowIndicesLimit; }
65
66 /// Return high indices limit
67 inline AliMpIntPair AliMpVIndexed::GetHighIndicesLimit() const
68 { return fHighIndicesLimit; }
69
70 #endif //ALI_MP_V_INDEXED_H