]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpConnection.cxx
New macro to help with LC2 in the pit at Point 2
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpConnection.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 // $Id$
17 // $MpId: AliMpConnection.cxx,v 1.7 2006/05/24 13:58:41 ivana Exp $
18 // Category: motif
19
20 //-----------------------------------------------------------------------------
21 // Class AliMpConnection
22 // ----------------
23 // Class that defines a connexion properties.
24 // Included in AliRoot: 2003/05/02
25 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
26 //-----------------------------------------------------------------------------
27
28 #include "AliMpConnection.h"
29 #include "AliLog.h"
30
31 /// \cond CLASSIMP
32 ClassImp(AliMpConnection)
33 /// \endcond
34
35 //_____________________________________________________________________________
36 AliMpConnection::AliMpConnection(Int_t padNum, Int_t bergNum,Int_t kaptonNum,
37                                  Int_t gassiNum, const AliMpIntPair& localIndices) 
38   : TObject(),
39     fPadNum(padNum),
40     fBergNum(bergNum),
41     fKaptonNum(kaptonNum),
42     fGassiNum(gassiNum),
43     fOwner(0)
44 {
45 /// Standard constructor
46
47       SetUniqueID(localIndices.GetFirst() | ( localIndices.GetSecond() << 16 ));
48
49       AliDebug(1,Form("this=%p padNum=%d bergNum=%d kaptonNum=%d gassiNum=%d",
50                       this,padNum,bergNum,kaptonNum,gassiNum));
51
52 }
53
54 //_____________________________________________________________________________
55 AliMpConnection::AliMpConnection() 
56   : TObject(),
57     fPadNum(-1),
58     fBergNum(-1),
59     fKaptonNum(-1),
60     fGassiNum(-1),
61     fOwner(0)
62 {
63 /// Default constructor
64       AliDebug(1,Form("this=%p",this));
65 }
66
67 //_____________________________________________________________________________
68 AliMpConnection::~AliMpConnection() 
69 {
70 /// Destructor  
71   AliDebug(1,Form("this=%p"));
72 }
73
74 /*
75 //_____________________________________________________________________________
76 void
77 AliMpConnection::SetLocalIndices(const AliMpIntPair& pair)
78 {
79   SetUniqueID(pair.GetFirst() | ( pair.GetSecond() << 16 ));
80 }
81 */
82
83 //_____________________________________________________________________________
84 AliMpIntPair AliMpConnection::LocalIndices() const
85 {
86 /// Return local indices 
87
88   Int_t f = GetUniqueID() & 0xFFFF;
89   Int_t s = ( ( GetUniqueID() & 0xFFFF0000 ) >> 16);
90   return AliMpIntPair(f,s);
91 }
92