]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpVIndexed.cxx
Implemented write and read methods (with real mapping for tracker chamber) (Christian)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVIndexed.cxx
CommitLineData
dee1d5f1 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
5f91c9e8 16// $Id$
dee1d5f1 17// $MpId: AliMpVIndexed.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $
5f91c9e8 18// Category: basic
19//
20// Class AliMpVIndexed
21// -------------------
22// Class that defines the limits of global pad indices.
dbe945cc 23// Included in AliRoot: 2003/05/02
5f91c9e8 24// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
25
26#include "AliMpVIndexed.h"
27
28ClassImp(AliMpVIndexed)
29
30//_____________________________________________________________________________
d1d8330f 31AliMpVIndexed::AliMpVIndexed(const AliMpIntPair& lowLimit,
32 const AliMpIntPair& highLimit)
5f91c9e8 33 : TObject(),
34 fLowIndicesLimit(lowLimit),
dee1d5f1 35 fHighIndicesLimit(highLimit)
36{
37/// Standard constructor
5f91c9e8 38}
39
40//_____________________________________________________________________________
41AliMpVIndexed::AliMpVIndexed()
42 : TObject(),
43 fLowIndicesLimit(AliMpIntPair::Invalid()),
dee1d5f1 44 fHighIndicesLimit(AliMpIntPair::Invalid())
45{
46/// Default constructor
5f91c9e8 47}
48
49//_____________________________________________________________________________
dee1d5f1 50AliMpVIndexed::~AliMpVIndexed()
51{
52/// Destructor
5f91c9e8 53}
54
55
56//_____________________________________________________________________________
57AliMpIntPair AliMpVIndexed::GlobalIndices(const AliMpIntPair& localIndices) const
58{
dee1d5f1 59/// Return the global indices corresponding to the given local indices.
5f91c9e8 60
61 return GetLowIndicesLimit()+localIndices;
62
63}
64
65//_____________________________________________________________________________
66Bool_t AliMpVIndexed::HasIndices(const AliMpIntPair& indices) const
67{
dee1d5f1 68/// Return true in the specified indices are within the limits.
5f91c9e8 69
70 return (indices.GetFirst() >= fLowIndicesLimit.GetFirst() &&
71 indices.GetSecond() >= fLowIndicesLimit.GetSecond() &&
72 indices.GetFirst() <= fHighIndicesLimit.GetFirst() &&
73 indices.GetSecond() <= fHighIndicesLimit.GetSecond() );
74}
75
76//_____________________________________________________________________________
77Bool_t AliMpVIndexed::HasValidIndices() const
78{
dee1d5f1 79/// Returns true if both indices limits have valid values.
5f91c9e8 80
81 return (fLowIndicesLimit.IsValid() && fHighIndicesLimit.IsValid() );
82}
83
84
85