34 #include <TClonesArray.h>
35 #include <Riostream.h>
43 const Int_t
AliMpPad::fgkMaxNofLocations = 6;
48 Double_t x, Double_t y,
49 Double_t dx, Double_t dy,
54 fLLocation(AliMp::
Pair(manuId, channel)),
55 fLIndices(AliMp::
Pair(ix, iy)),
72 Double_t x, Double_t y,
73 Double_t dx, Double_t dy,
78 fLLocation(AliMp::
Pair(manuId, channel)),
141 if (
this == &rhs)
return *
this;
144 TObject::operator=(rhs);
181 Bool_t sameLocations =
true;
186 sameLocations =
false;
202 return !(*
this==rhs);
210 if ( left.
GetIx() < right.
GetIx() )
return kTRUE;
211 if ( left.
GetIx() > right.
GetIx() )
return kFALSE;
212 if ( left.
GetIy() < right.
GetIy() )
return kTRUE;
228 AliWarningStream() <<
"Cannot add location: ("
229 << localBoardId <<
"," << localBoardChannel <<
")."
230 <<
" Maximum number has been reached." << endl;
236 if (
HasLocation(localBoardId, localBoardChannel) ) {
238 AliWarningStream() <<
"Cannot add location: "
239 << localBoardId <<
"," << localBoardChannel <<
")."
240 <<
" Location is already present." << endl;
293 out <<
"Pad::Invalid";
297 out <<
"Pad: Location ";
308 out <<
" Other locations: ";
MpPair_t fLIndices
pad indices as encoded pair (ix, iy)
Int_t GetNofLocations() const
Bool_t operator<(const AliMpPad &left, const AliMpPad &right)
Double_t fDimensionX
the pad x dimension - half length (in cm)
void PrintOn(ostream &out) const
MpPair_t * fLLocations
Collection of pad locations - encoded pair (localBoardId, localBoardChannel)
ostream & operator<<(ostream &out, const AliMpPad &pad)
MpPair_t Pair(Int_t first, Int_t second)
Encode the pair of integers to another integer.
MpPair_t fLLocation
pad location as encoded pair (manuId, manuChannel)
Bool_t HasLocation(Int_t localBoardId, Int_t localBoardChannel) const
Bool_t operator==(const AliMpPad &pos2) const
Double_t fPositionY
the pad y position (in cm)
MpPair_t GetLocation() const
Return pad location as encoded pair (manuId, manuChannel)
Int_t GetManuChannel() const
static const Int_t fgkMaxNofLocations
maximum number of pad locations in the collection
void Print(const char *="") const
Int_t GetLocalBoardId(Int_t i) const
Double_t fPositionX
the pad x position (in cm)
Bool_t operator!=(const AliMpPad &pos2) const
AliMpPad & operator=(const AliMpPad &src)
Int_t PairFirst(MpPair_t pair)
Decode the first integer from encoded pair.
Class which encapsuate all information about a pad.
Int_t PairSecond(MpPair_t pair)
Decode the second integer from encoded pair.
Double_t fDimensionY
the pad y dimension - half length(in cm)
Bool_t AddLocation(Int_t localBoardId, Int_t localBoardChannel, Bool_t warn=true)
ostream & PairPut(ostream &s, MpPair_t pair)
A special printing for encoded pair.
Int_t GetLocalBoardChannel(Int_t i) const