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