6 // Class that defines the limits of global pad indices.
8 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
10 #include "AliMpVIndexed.h"
12 ClassImp(AliMpVIndexed)
14 //_____________________________________________________________________________
15 AliMpVIndexed::AliMpVIndexed(AliMpIntPair lowLimit, AliMpIntPair highLimit)
17 fLowIndicesLimit(lowLimit),
18 fHighIndicesLimit(highLimit) {
22 //_____________________________________________________________________________
23 AliMpVIndexed::AliMpVIndexed()
25 fLowIndicesLimit(AliMpIntPair::Invalid()),
26 fHighIndicesLimit(AliMpIntPair::Invalid()) {
30 //_____________________________________________________________________________
31 AliMpVIndexed::~AliMpVIndexed(){
36 //_____________________________________________________________________________
37 AliMpIntPair AliMpVIndexed::GlobalIndices(const AliMpIntPair& localIndices) const
39 // Returns the global indices corresponding to the given local indices.
42 return GetLowIndicesLimit()+localIndices;
46 //_____________________________________________________________________________
47 Bool_t AliMpVIndexed::HasIndices(const AliMpIntPair& indices) const
49 // Returns true in the specified indices are within the limits.
52 return (indices.GetFirst() >= fLowIndicesLimit.GetFirst() &&
53 indices.GetSecond() >= fLowIndicesLimit.GetSecond() &&
54 indices.GetFirst() <= fHighIndicesLimit.GetFirst() &&
55 indices.GetSecond() <= fHighIndicesLimit.GetSecond() );
58 //_____________________________________________________________________________
59 Bool_t AliMpVIndexed::HasValidIndices() const
61 // Returns true if both indices limits have valid values.
64 return (fLowIndicesLimit.IsValid() && fHighIndicesLimit.IsValid() );