26 #include "Riostream.h"
69 AliDebug(1,Form(
"this=%p Empty ctor",
this));
71 fPCBs.SetOwner(kTRUE);
72 fManuMap.SetOwner(kFALSE);
79 fPlaneType(bendingOrNonBending),
93 AliDebug(1,Form(
"this=%p id=%s",
this,
id));
95 fPCBs.SetOwner(kTRUE);
105 AliDebug(1,Form(
"this=%p fId=%s",
this,
fId.Data()));
127 ixOffset = pcbType.
Ixmin();
129 Double_t xOffset =
DX()*2;
137 for ( Int_t i = 0; i < pcb->
GetSize(); ++i )
140 Int_t manuID = mp->
GetID();
146 AliDebug(1,Form(
"Adding %d-th manuId=%d (%d) to ManuMap (size=%d)",n,manuID,mp->
GetID(),
fManuMap.
GetSize()));
151 AliError(Form(
"ManuID %d is duplicated for PCB %s",manuID,pcbType.
GetID()));
233 for ( Int_t i = 0; i <
GetSize(); ++i )
236 if ( ix >= pcb->
Ixmin() && ix <= pcb->
Ixmax() )
251 for ( Int_t i = 0; i <
GetSize(); ++i )
254 if ( ix >= pcb->
Ixmin() && ix <= pcb->
Ixmax() )
269 for ( Int_t i = 0; i <
GetSize(); ++i )
277 if ( x < pcb->Xmin() || x >= pcb->
Xmax() ||
278 y < pcb->
Ymin() || y >= pcb->
Ymax() )
294 for ( Int_t i = 0; i <
GetSize(); ++i )
297 if ( x >= pcb->
Xmin() && x < pcb->
Xmax() &&
298 y >= pcb->
Ymin() && y < pcb->
Ymax() )
311 for ( Int_t i = 0; i<
GetSize(); ++i )
341 assert(nofElectronicCards>0);
342 ecn.Set(nofElectronicCards);
346 while ( ( mp = static_cast<AliMpMotifPosition*>(next()) ) )
348 ecn.AddAt(mp->GetID(),n);
351 assert(n==nofElectronicCards);
384 return last->
Ixmax();
397 TString name(
GetID());
404 name +=
".NonBending";
440 if ( i >=
fPCBs.GetEntriesFast() )
return 0;
451 return fPCBs.GetEntriesFast();
461 cout <<
"SLAT " <<
GetID() <<
" 1/2 DIM = (" <<
DX() <<
"," <<
DY() <<
")"
465 <<
" NPCBs=" <<
GetSize() << endl;
467 TString soption(option);
469 if ( soption.Contains(
"P") )
471 for ( Int_t i = 0; i <
GetSize() ; ++i )
476 fPCBs[i]->Print(option+1);
485 if ( soption.Contains(
"M") || soption.Contains(
"L") )
488 cout <<
"Electronic card (manu or local board) Ids : ";
491 while ( ( mp = static_cast<AliMpMotifPosition*>(next())) )
493 cout << mp->
GetID() <<
" ";
Bool_t HasMotifPositionID(Int_t manuId) const
TObjArray fPCBs
array of AliMpPCB*
AliMpPCB * FindPCB(Int_t ix) const
Find the PCB containing the pad at location (ix,any iy).
void GetAllMotifPositionsIDs(TArrayI &ecn) const
Return the ids of the electronic cards (either manu or local board).
Double_t GetPositionY() const
Return y position.
Int_t GetNofPadsX() const
AliMp::PlaneType fPlaneType
Whether it's bending or non-bending plane.
A PCB for station 3,4 or 5.
AliMpMotifPosition * FindMotifPosition(Int_t ix, Int_t iy) const
Returns the motifPosition which contains the pad at (ix,iy).
void Add(const AliMpPCB &pcbType, const TArrayI &manuList)
Int_t fNofPadsX
Actual number of pads in x direction.
Int_t GetSize() const
The number of motifs, aka manus.
Int_t FindPCBIndexByMotifPositionID(Int_t manuId) const
Find the index of the PCB containing a given manu.
Double_t fPositionX
x Position of the slat center.
A slat (building block of stations 3, 4 and 5)
Double_t fPositionY
y Position of the slat center.
Int_t GetNofPadsY() const
AliMpMotifPosition * FindMotifPosition(Double_t x, Double_t y) const
Returns the MotifPosition containing location (x,y).
void ForcePosition(Double_t x, Double_t y)
Int_t fNofPads
number of pads in this slat
void Print(Option_t *option="") const
Int_t GetID() const
Return motif position ID = manu id.
AliMpPCB * GetPCB(Int_t i) const
Returns the i-th PCB of this slat.
const char * GetID() const
const char * GetName() const
Int_t GetNofPadsX() const
Returns the number of pads in the x-direction contained in this slat.
Int_t fMaxNofPadsY
Maximum number of pads in y direction.
Double_t fDY
Half-size in Y (cm)
TObject * GetValue(Int_t keyFirst, Int_t keySecond) const
Int_t GetMaxNofPadsY() const
Double_t fDX
Half-size in X (cm)
const char * GetID() const
void Add(Int_t keyFirst, Int_t keySecond, TObject *object)
AliMpMotifPosition * GetMotifPosition(Int_t i) const
void SetOwner(Bool_t owner)
Int_t FindPCBIndex(Int_t ix) const
Find the index of the PCB containing the pad at location ix.
Double_t GetPositionX() const
Return x position.
AliMpSlat()
Not implemented.
Int_t GetMaxPadIndexX() const
TObject * Clone(const char *newname="") const
TString fId
The name of this slat, e.g. 112233N.
AliMpExMap fManuMap
map of int to AliMpMotifPosition*
Int_t GetNofElectronicCards() const
Return the number of electronic cards (either manu or local board).
Int_t NofPads() const
Return the number of pads in this PCB.
Int_t GetSize() const
Returns the number of PCBs of this slat.
AliMpExMapIterator * CreateIterator() const