]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpConnection.h
Replacement of AliMpIntPair object with algoritmic
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpConnection.h
index f71109e2c1aae3fa21bc9897bcbcd4a4103c45ee..6d6937531e4294a08a9c1b9469dcd46954361782 100755 (executable)
 #include <TObject.h>
 
 #include "AliMpMotifType.h"
-#include "AliMpIntPair.h"
+#include "AliMpEncodePair.h"
 
 #include <TString.h>
 
 class AliMpConnection : public TObject
 {
   public:
-    AliMpConnection();
-    AliMpConnection(Int_t padNum,Int_t bergNum,Int_t kaptonNum,Int_t gassiNum);
+    AliMpConnection(Int_t padNum, 
+                    Int_t bergNum,
+                    Int_t kaptonNum,
+                    Int_t gassiNum,
+                    MpPair_t localIndices);
+    AliMpConnection(TRootIOCtor* /*ioCtor*/);
+    //AliMpConnection();
     virtual ~AliMpConnection();
 
-    // methods
-
     //
     // accessors
     //
           /// Return Berg connector number
-    Int_t GetBergNum()   const {return fBergNum;}
+    Int_t GetBergNum()   const     { return fBergNum; }
           /// Return kapton connector number
-    Int_t GetKaptonNum() const {return fKaptonNum;}
-          /// Return Gassiplex channel number
-    Int_t GetGassiNum()  const {return fGassiNum;}
+    Int_t GetKaptonNum() const     { return fKaptonNum; }
+          /// Return manu channel number
+    Int_t GetManuChannel() const   { return fGassiNum; }
           /// Return pad number
-    Int_t GetPadNum()  const {return fPadNum;}
+    Int_t GetPadNum()  const       { return GetUniqueID(); }
+
+          /// Return encoded local indices
+    MpPair_t GetLocalIndices() const { return fLocalIndices; }
+    Int_t  GetLocalIx() const;
+    Int_t  GetLocalIy() const;
+    
           /// Return the motif type which contains this connection
-    AliMpMotifType *GetOwner() const {return fOwner;}
+    AliMpMotifType *GetOwner() const { return fOwner; }
     
-    AliMpIntPair LocalIndices() const;
     TString  PadName() const;
     
     //
@@ -51,34 +59,32 @@ class AliMpConnection : public TObject
     //
 
           /// Set Gassiplex channel number
-    void SetGassiNum(Int_t n) { fGassiNum = n; }
+    void SetGassiNum(Int_t n)            { fGassiNum = n; }
           /// Set the motif type which contains this connection
-    void SetOwner(AliMpMotifType *owner) {fOwner=owner;}
-
+    void SetOwner(AliMpMotifType *owner) { fOwner=owner; }
+    
   private:
+    /// Not implemented
+    AliMpConnection();
     /// Not implemented
     AliMpConnection(const AliMpConnection& right);
     /// Not implemented
     AliMpConnection& operator=(const AliMpConnection& right);
 
     // data members
-    Int_t fPadNum;    ///< Pad number
-    Int_t fBergNum;   ///< Berg connector number
-    Int_t fKaptonNum; ///< Kapton connector number
-    Int_t fGassiNum;  ///< Gassiplex channel number
+    Int_t   fBergNum;   ///< Berg connector number
+    Int_t   fKaptonNum; ///< Kapton connector number
+    Int_t   fGassiNum;  ///< Gassiplex channel number
+    MpPair_t  fLocalIndices;  ///< Local indices
     AliMpMotifType *fOwner; ///< The motif type which contains this connection
 
-  ClassDef(AliMpConnection,1)  // Connection description
+  ClassDef(AliMpConnection,2)  // Connection description
 };
 
 // inline functions
 
-          /// Return the pad number converted to a name
+/// Return the pad number converted to a name
 inline TString AliMpConnection::PadName() const 
-{ return fOwner->PadName(fPadNum); }
-
-          /// Return the local indices of this pad in the motif
-inline AliMpIntPair AliMpConnection::LocalIndices() const
-{ return fOwner->FindLocalIndicesByConnection(this);}
+{ return fOwner->PadName(GetUniqueID()); }
 
 #endif //ALI_MP_CONNECTION_H