AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpPad.h
Go to the documentation of this file.
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: AliMpPad.h,v 1.11 2006/05/24 13:58:07 ivana Exp $
6 
12 
13 #ifndef ALI_MP_PAD_H
14 #define ALI_MP_PAD_H
15 
16 #include "AliMpEncodePair.h"
17 
18 #include <TObject.h>
19 
20 #include <TClonesArray.h>
21 
22 class AliMpPad : public TObject
23 {
24  public:
25  AliMpPad(Int_t manuId, Int_t channel,
26  Int_t ix, Int_t iy,
27  Double_t x, Double_t y,
28  Double_t dx, Double_t dy,
29  Bool_t validity = true);
30  AliMpPad(Int_t manuId, Int_t channel,
31  MpPair_t indices,
32  Double_t positionX, Double_t positionY,
33  Double_t dx, Double_t dy,
34  Bool_t validity = true);
35 
36  AliMpPad();
37  AliMpPad(const AliMpPad& src);
38  ~AliMpPad();
39 
40  //
41  // operators
42  //
43  Bool_t operator == (const AliMpPad& pos2) const;
44  Bool_t operator != (const AliMpPad& pos2) const;
45  AliMpPad& operator = (const AliMpPad& src) ;
46 
47  //
48  // methods
49  //
50  void PrintOn(ostream& out) const;
51  void Print(const char* /*option*/ = "") const;
52 
53  //
54  // static get methods
55  //
57  static AliMpPad Invalid() {return AliMpPad();}
58 
59  //
60  // set methods
61  //
62  Bool_t AddLocation(Int_t localBoardId, Int_t localBoardChannel,
63  Bool_t warn = true);
64 
65  //
66  // get methods
67  //
69  MpPair_t GetLocation() const { return fLLocation; }
70  Int_t GetManuId() const;
71  Int_t GetManuChannel() const;
72 
74  MpPair_t GetIndices() const { return fLIndices; }
75  Int_t GetIx() const;
76  Int_t GetIy() const;
77 
79  Double_t GetPositionX() const { return fPositionX; }
81  Double_t GetPositionY() const { return fPositionY; }
82 
84  Double_t GetDimensionX() const {return fDimensionX;}
86  Double_t GetDimensionY() const {return fDimensionY;}
87 
89  Bool_t IsValid() const {return fValidity ;}
90 
91  Int_t GetNofLocations() const;
92  MpPair_t GetLocation(Int_t i) const;
93  Int_t GetLocalBoardId(Int_t i) const;
94  Int_t GetLocalBoardChannel(Int_t i) const;
95 
96  Bool_t HasLocation(Int_t localBoardId, Int_t localBoardChannel) const;
97 
98  private:
99 
100  // static data members
101  static const Int_t fgkMaxNofLocations;
102  // data members
104  UInt_t fNofLocations;
105  MpPair_t* fLLocations; //[fNofLocations]
109  Double_t fPositionX;
110  Double_t fPositionY;
111  Double_t fDimensionX;
112  Double_t fDimensionY;
113  Bool_t fValidity;
114 
115  ClassDef(AliMpPad,4) //utility class for the motif type
116 };
117 
118 ostream& operator << (ostream &out, const AliMpPad& op);
119 Bool_t operator < (const AliMpPad& left, const AliMpPad& right);
120 
121 #endif //ALI_MP_PAD_H
MpPair_t fLIndices
pad indices as encoded pair (ix, iy)
Definition: AliMpPad.h:108
Int_t GetNofLocations() const
Definition: AliMpPad.cxx:325
Double_t fDimensionX
the pad x dimension - half length (in cm)
Definition: AliMpPad.h:111
UInt_t fNofLocations
Definition: AliMpPad.h:104
Int_t GetIy() const
Definition: AliMpPad.cxx:280
Int_t GetManuId() const
Definition: AliMpPad.cxx:256
void PrintOn(ostream &out) const
Definition: AliMpPad.cxx:288
MpPair_t * fLLocations
Collection of pad locations - encoded pair (localBoardId, localBoardChannel)
Definition: AliMpPad.h:106
Bool_t fValidity
validity
Definition: AliMpPad.h:113
MpPair_t fLLocation
pad location as encoded pair (manuId, manuChannel)
Definition: AliMpPad.h:107
MpPair_t GetIndices() const
Return pad indices as encoded pair (ix, iy)
Definition: AliMpPad.h:74
static AliMpPad Invalid()
Return invalid pad.
Definition: AliMpPad.h:57
Bool_t HasLocation(Int_t localBoardId, Int_t localBoardChannel) const
Definition: AliMpPad.cxx:369
Bool_t operator==(const AliMpPad &pos2) const
Definition: AliMpPad.cxx:168
Double_t fPositionY
the pad y position (in cm)
Definition: AliMpPad.h:110
MpPair_t GetLocation() const
Return pad location as encoded pair (manuId, manuChannel)
Definition: AliMpPad.h:69
Int_t GetManuChannel() const
Definition: AliMpPad.cxx:264
static const Int_t fgkMaxNofLocations
maximum number of pad locations in the collection
Definition: AliMpPad.h:101
Double_t GetPositionY() const
Return the pad x position (in cm)
Definition: AliMpPad.h:81
void Print(const char *="") const
Definition: AliMpPad.cxx:316
Int_t GetLocalBoardId(Int_t i) const
Definition: AliMpPad.cxx:347
Double_t fPositionX
the pad x position (in cm)
Definition: AliMpPad.h:109
Bool_t operator!=(const AliMpPad &pos2) const
Definition: AliMpPad.cxx:197
Bool_t IsValid() const
Return validity.
Definition: AliMpPad.h:89
AliMpPad & operator=(const AliMpPad &src)
Definition: AliMpPad.cxx:136
Int_t GetIx() const
Definition: AliMpPad.cxx:272
Int_t MpPair_t
Double_t GetDimensionY() const
Return the y pad dimension - half length (in cm)
Definition: AliMpPad.h:86
Class which encapsuate all information about a pad.
Definition: AliMpPad.h:22
ostream & operator<<(ostream &out, const AliMpPad &op)
Definition: AliMpPad.cxx:386
Double_t GetPositionX() const
Return the pad x position (in cm)
Definition: AliMpPad.h:79
Bool_t operator<(const AliMpPad &left, const AliMpPad &right)
Definition: AliMpPad.cxx:206
Double_t fDimensionY
the pad y dimension - half length(in cm)
Definition: AliMpPad.h:112
Bool_t AddLocation(Int_t localBoardId, Int_t localBoardChannel, Bool_t warn=true)
Definition: AliMpPad.cxx:217
AliMpPad()
Definition: AliMpPad.cxx:94
Int_t GetLocalBoardChannel(Int_t i) const
Definition: AliMpPad.cxx:358
Double_t GetDimensionX() const
Return the x pad dimension - half length (in cm)
Definition: AliMpPad.h:84