1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // $MpId: AliMpConnection.cxx,v 1.7 2006/05/24 13:58:41 ivana Exp $
20 //-----------------------------------------------------------------------------
21 // Class AliMpConnection
23 // Class that defines a connexion properties.
24 // Included in AliRoot: 2003/05/02
25 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
26 //-----------------------------------------------------------------------------
28 #include "AliMpConnection.h"
32 ClassImp(AliMpConnection)
35 //_____________________________________________________________________________
36 AliMpConnection::AliMpConnection(Int_t padNum, Int_t bergNum,Int_t kaptonNum,
37 Int_t gassiNum, const AliMpIntPair& localIndices)
41 fKaptonNum(kaptonNum),
45 /// Standard constructor
47 SetUniqueID(localIndices.GetFirst() | ( localIndices.GetSecond() << 16 ));
49 AliDebug(1,Form("this=%p padNum=%d bergNum=%d kaptonNum=%d gassiNum=%d",
50 this,padNum,bergNum,kaptonNum,gassiNum));
54 //_____________________________________________________________________________
55 AliMpConnection::AliMpConnection()
63 /// Default constructor
64 AliDebug(1,Form("this=%p",this));
67 //_____________________________________________________________________________
68 AliMpConnection::~AliMpConnection()
71 AliDebug(1,Form("this=%p"));
75 //_____________________________________________________________________________
77 AliMpConnection::SetLocalIndices(const AliMpIntPair& pair)
79 SetUniqueID(pair.GetFirst() | ( pair.GetSecond() << 16 ));
83 //_____________________________________________________________________________
84 AliMpIntPair AliMpConnection::LocalIndices() const
86 /// Return local indices
88 Int_t f = GetUniqueID() & 0xFFFF;
89 Int_t s = ( ( GetUniqueID() & 0xFFFF0000 ) >> 16);
90 return AliMpIntPair(f,s);