]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpVIndexed.cxx
Coding conventions corrections only
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVIndexed.cxx
CommitLineData
5f91c9e8 1// $Id$
2// Category: basic
3//
4// Class AliMpVIndexed
5// -------------------
6// Class that defines the limits of global pad indices.
7//
8// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
9
10#include "AliMpVIndexed.h"
11
12ClassImp(AliMpVIndexed)
13
14//_____________________________________________________________________________
d1d8330f 15AliMpVIndexed::AliMpVIndexed(const AliMpIntPair& lowLimit,
16 const AliMpIntPair& highLimit)
5f91c9e8 17 : TObject(),
18 fLowIndicesLimit(lowLimit),
19 fHighIndicesLimit(highLimit) {
20//
21}
22
23//_____________________________________________________________________________
24AliMpVIndexed::AliMpVIndexed()
25 : TObject(),
26 fLowIndicesLimit(AliMpIntPair::Invalid()),
27 fHighIndicesLimit(AliMpIntPair::Invalid()) {
28//
29}
30
31//_____________________________________________________________________________
32AliMpVIndexed::~AliMpVIndexed(){
33//
34}
35
36
37//_____________________________________________________________________________
38AliMpIntPair AliMpVIndexed::GlobalIndices(const AliMpIntPair& localIndices) const
39{
40// Returns the global indices corresponding to the given local indices.
41// ---
42
43 return GetLowIndicesLimit()+localIndices;
44
45}
46
47//_____________________________________________________________________________
48Bool_t AliMpVIndexed::HasIndices(const AliMpIntPair& indices) const
49{
50// Returns true in the specified indices are within the limits.
51// ---
52
53 return (indices.GetFirst() >= fLowIndicesLimit.GetFirst() &&
54 indices.GetSecond() >= fLowIndicesLimit.GetSecond() &&
55 indices.GetFirst() <= fHighIndicesLimit.GetFirst() &&
56 indices.GetSecond() <= fHighIndicesLimit.GetSecond() );
57}
58
59//_____________________________________________________________________________
60Bool_t AliMpVIndexed::HasValidIndices() const
61{
62// Returns true if both indices limits have valid values.
63// ---
64
65 return (fLowIndicesLimit.IsValid() && fHighIndicesLimit.IsValid() );
66}
67
68
69