AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpMotifType.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: AliMpMotifType.h,v 1.11 2006/05/24 13:58:18 ivana Exp $
6 
12 
13 #ifndef ALI_MP_MOTIF_TYPE_H
14 #define ALI_MP_MOTIF_TYPE_H
15 
16 #include <TObject.h>
17 
18 #include "AliMpEncodePair.h"
19 
20 #ifndef ROOT_TObjArray
21 # include <TObjArray.h>
22 #endif
23 
24 #include <TString.h>
25 
26 class AliMpVPadIterator;
27 class AliMpConnection;
28 
29 class AliMpMotifType : public TObject
30  {
31  public:
32  AliMpMotifType(const TString &id);
33  AliMpMotifType(const AliMpMotifType& rhs);
35  AliMpMotifType(TRootIOCtor* ioCtor);
36  virtual ~AliMpMotifType();
37 
38  TObject* Clone(const char* newname="") const;
39 
40  virtual AliMpVPadIterator* CreateIterator() const;
41 
42  // find methods
43  AliMpConnection *FindConnectionByPadNum(Int_t padNum) const;
45  MpPair_t localIndices) const;
47  Int_t localIx, Int_t localIy) const;
48  AliMpConnection *FindConnectionByGassiNum(Int_t gassiNum) const;
49  AliMpConnection *FindConnectionByKaptonNum(Int_t kaptonNum) const;
50  AliMpConnection *FindConnectionByBergNum(Int_t bergNum) const;
51 
52  MpPair_t FindLocalIndicesByPadNum(Int_t padNum) const;
53  MpPair_t FindLocalIndicesByGassiNum(Int_t gassiNum) const;
54  MpPair_t FindLocalIndicesByKaptonNum(Int_t kaptonNum) const;
55  MpPair_t FindLocalIndicesByBergNum(Int_t bergNum) const;
57  const AliMpConnection* connection) const;
58 
59  // set methods
60  void SetNofPads(Int_t nofPadsX, Int_t nofPadY);
61 
62  // get methods
64  TString GetID() const {return fID;}
66  Int_t GetNofPadsX() const {return fNofPadsX;}
68  Int_t GetNofPadsY() const {return fNofPadsY;}
70  Int_t GetNofPads() const {return fNofPads;}
71 
72  // Other methods
73  Bool_t AddConnection(AliMpConnection* connection);
74 
75  virtual void Print(Option_t *option="") const;
76 
77  Int_t PadNum(const TString &padName) const;
78 
79  TString PadName(Int_t padNum) const;
80 
81  Bool_t HasPadByLocalIndices(MpPair_t localIndices) const;
82  Bool_t HasPadByLocalIndices(Int_t localIx, Int_t localIy) const;
83 
84  Bool_t HasPadByManuChannel(Int_t manuChannel) const;
85 
87  Bool_t HasPadByGassiNum(Int_t gassiNum) const { return HasPadByManuChannel(gassiNum); }
88 
89  Bool_t IsFull() const;
90 
91  Bool_t Save(const char* motifName) const;
92  Bool_t Save() const;
93 
94  private:
97 
98  // methods
99  void Copy(TObject& o) const;
100 
101  // static data members
102  static const Int_t fgkPadNumForA;
103 
104  // data members
105  TString fID;
106  Int_t fNofPadsX;
107  Int_t fNofPadsY;
108  Int_t fNofPads;
109  Int_t fMaxNofPads;
112 
113  ClassDef(AliMpMotifType,2) // Motif type
114  };
115 
116 // inline functions
117 
119 inline Bool_t AliMpMotifType::IsFull() const
120 { return GetNofPads() == fNofPadsX*fNofPadsY; }
121 
122 #endif //ALI_MP_MOTIF_TYPE_H
123 
124 
Int_t fNofPads
total number of pads (= the number of non-void entries in the arrays below)
Int_t PadNum(const TString &padName) const
A connection properties.
#define TObjArray
virtual AliMpVPadIterator * CreateIterator() const
AliMpConnection * FindConnectionByGassiNum(Int_t gassiNum) const
AliMpConnection * FindConnectionByKaptonNum(Int_t kaptonNum) const
MpPair_t FindLocalIndicesByPadNum(Int_t padNum) const
Int_t fNofPadsX
number of pads in x direction
virtual ~AliMpMotifType()
AliMpConnection * FindConnectionByLocalIndices(MpPair_t localIndices) const
void Copy(TObject &o) const
TString PadName(Int_t padNum) const
MpPair_t FindLocalIndicesByGassiNum(Int_t gassiNum) const
AliMpMotifType & operator=(const AliMpMotifType &rhs)
TObject * Clone(const char *newname="") const
TObjArray fConnectionsByManuChannel
array [manuChannel] -> AliMpConnection*
Bool_t HasPadByGassiNum(Int_t gassiNum) const
Return whether the pad with given manu channel exists.
void SetNofPads(Int_t nofPadsX, Int_t nofPadY)
static const Int_t fgkPadNumForA
the pad number for the pad "A"
AliMpMotifType()
Not implemented.
AliMpConnection * FindConnectionByBergNum(Int_t bergNum) const
Int_t GetNofPadsX() const
Return number of pads in x direction.
Int_t fNofPadsY
number of pads in y direction
Bool_t Save() const
Int_t GetNofPadsY() const
Return number of pads in y direction.
Bool_t HasPadByLocalIndices(MpPair_t localIndices) const
Bool_t HasPadByManuChannel(Int_t manuChannel) const
An interface for an iterator over pads.
MpPair_t FindLocalIndicesByConnection(const AliMpConnection *connection) const
Int_t fMaxNofPads
max number of pads we can hold
MpPair_t FindLocalIndicesByBergNum(Int_t bergNum) const
Int_t GetNofPads() const
Return the total number of pads.
virtual void Print(Option_t *option="") const
TString GetID() const
Return unique motif ID.
Int_t MpPair_t
Bool_t AddConnection(AliMpConnection *connection)
MpPair_t FindLocalIndicesByKaptonNum(Int_t kaptonNum) const
TObjArray fConnectionsByLocalIndices
array [ix + 64*iy ] -> AliMpConnection*
Bool_t IsFull() const
Return true if the motif conatins all pads.
TString fID
unique motif ID
AliMpConnection * FindConnectionByPadNum(Int_t padNum) const
Class that defines the motif properties.