Updated det element names (Christian)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpPadPair.cxx
CommitLineData
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: AliMpPadPair.cxx,v 1.7 2006/05/24 13:58:29 ivana Exp $
5f91c9e8 18// Category: basic
19//
20// Class AliMpPadPair
21// ------------------
22// Wrap up for std::pair<AliMpPad, AliMpPad>
23// to avoid problems with CINT.
dbe945cc 24// Included in AliRoot: 2003/05/02
5f91c9e8 25// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
26
27#include "AliMpPadPair.h"
28
13985652 29/// \cond CLASSIMP
5f91c9e8 30ClassImp(AliMpPadPair)
13985652 31/// \endcond
5f91c9e8 32
33//_____________________________________________________________________________
34AliMpPadPair::AliMpPadPair(const AliMpPad& pad1, const AliMpPad& pad2)
35 : TObject(),
f79c58a5 36 fPadFirst(pad1),
dee1d5f1 37 fPadSecond(pad2)
38{
39/// Standard constructor
5f91c9e8 40}
41
42//_____________________________________________________________________________
43AliMpPadPair::AliMpPadPair(const AliMpPadPair& right)
44 : TObject(),
f79c58a5 45 fPadFirst(right.GetFirst()),
dee1d5f1 46 fPadSecond(right.GetSecond())
47{
48/// Copy constructor
5f91c9e8 49}
50
51//_____________________________________________________________________________
52AliMpPadPair::AliMpPadPair()
53 : TObject(),
f79c58a5 54 fPadFirst(AliMpPad::Invalid()),
dee1d5f1 55 fPadSecond(AliMpPad::Invalid())
56{
57/// Default constructor
5f91c9e8 58}
59
60//_____________________________________________________________________________
dee1d5f1 61AliMpPadPair::~AliMpPadPair()
62{
63/// Destructor
5f91c9e8 64}
65
66//_____________________________________________________________________________
67Bool_t AliMpPadPair::operator == (const AliMpPadPair& right) const
68{
dee1d5f1 69/// Equality operator
70
f79c58a5 71 return (fPadFirst == right.fPadFirst && fPadSecond == right.fPadSecond);
5f91c9e8 72}
73
74//_____________________________________________________________________________
75Bool_t AliMpPadPair::operator!= (const AliMpPadPair& right) const
76{
dee1d5f1 77/// Non-equality operator
78
5f91c9e8 79 return !(*this == right);
80}
81
82//_____________________________________________________________________________
83AliMpPadPair& AliMpPadPair::operator = (const AliMpPadPair& right)
84{
dee1d5f1 85/// Assignment operator
86
87 // check assignment to self
5f91c9e8 88 if (this == &right) return *this;
89
dee1d5f1 90 // base class assignment
5f91c9e8 91 TObject::operator=(right);
92
dee1d5f1 93 // assignment operator
f79c58a5 94 fPadFirst = right.fPadFirst;
95 fPadSecond = right.fPadSecond;
5f91c9e8 96
97 return *this;
98}
99
100