]>
Commit | Line | Data |
---|---|---|
dee1d5f1 | 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 | ||
5f91c9e8 | 16 | // $Id$ |
13985652 | 17 | // $MpId: AliMpConnection.cxx,v 1.7 2006/05/24 13:58:41 ivana Exp $ |
5f91c9e8 | 18 | // Category: motif |
3d1463c8 | 19 | |
20 | //----------------------------------------------------------------------------- | |
5f91c9e8 | 21 | // Class AliMpConnection |
22 | // ---------------- | |
23 | // Class that defines a connexion properties. | |
dbe945cc | 24 | // Included in AliRoot: 2003/05/02 |
5f91c9e8 | 25 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay |
3d1463c8 | 26 | //----------------------------------------------------------------------------- |
5f91c9e8 | 27 | |
28 | #include "AliMpConnection.h" | |
73dd9171 | 29 | #include "AliLog.h" |
5f91c9e8 | 30 | |
13985652 | 31 | /// \cond CLASSIMP |
5f91c9e8 | 32 | ClassImp(AliMpConnection) |
13985652 | 33 | /// \endcond |
5f91c9e8 | 34 | |
35 | //_____________________________________________________________________________ | |
36 | AliMpConnection::AliMpConnection(Int_t padNum, Int_t bergNum,Int_t kaptonNum, | |
630711ed | 37 | Int_t gassiNum, const AliMpIntPair& localIndices) |
5f91c9e8 | 38 | : TObject(), |
39 | fPadNum(padNum), | |
40 | fBergNum(bergNum), | |
41 | fKaptonNum(kaptonNum), | |
42 | fGassiNum(gassiNum), | |
43 | fOwner(0) | |
44 | { | |
dee1d5f1 | 45 | /// Standard constructor |
630711ed | 46 | |
47 | SetUniqueID(localIndices.GetFirst() | ( localIndices.GetSecond() << 16 )); | |
48 | ||
73dd9171 | 49 | AliDebug(1,Form("this=%p padNum=%d bergNum=%d kaptonNum=%d gassiNum=%d", |
50 | this,padNum,bergNum,kaptonNum,gassiNum)); | |
630711ed | 51 | |
5f91c9e8 | 52 | } |
53 | ||
54 | //_____________________________________________________________________________ | |
55 | AliMpConnection::AliMpConnection() | |
56 | : TObject(), | |
57 | fPadNum(-1), | |
58 | fBergNum(-1), | |
59 | fKaptonNum(-1), | |
60 | fGassiNum(-1), | |
61 | fOwner(0) | |
62 | { | |
dee1d5f1 | 63 | /// Default constructor |
73dd9171 | 64 | AliDebug(1,Form("this=%p",this)); |
5f91c9e8 | 65 | } |
66 | ||
67 | //_____________________________________________________________________________ | |
73dd9171 | 68 | AliMpConnection::~AliMpConnection() |
69 | { | |
f5671fc3 | 70 | /// Destructor |
73dd9171 | 71 | AliDebug(1,Form("this=%p")); |
5f91c9e8 | 72 | } |
630711ed | 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 |