ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExThinning
src_lib
AthExElephantino.cxx
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// AthExElephantino.cxx
8
// Implementation file for class AthExElephantino
9
// Author: S.Binet<binet@cern.ch>
11
12
13
// STL includes
14
15
// AthExThinning includes
16
#include "
AthExThinning/AthExElephantino.h
"
17
19
// Public methods:
21
22
// Constructors
24
25
AthExElephantino::AthExElephantino
() :
26
m_legs
(),
27
m_ears
()
28
{}
29
30
AthExElephantino::AthExElephantino
(
const
AthExElephantino
& rhs ) :
31
m_legs
( rhs.
m_legs
),
32
m_ears
( rhs.
m_ears
)
33
{}
34
35
AthExElephantino
&
AthExElephantino::operator=
(
const
AthExElephantino
& rhs )
36
{
37
if
(
this
!= &rhs ) {
38
m_legs
= rhs.
m_legs
;
39
m_ears
= rhs.
m_ears
;
40
}
41
return
*
this
;
42
}
43
44
// Destructor
46
AthExElephantino::~AthExElephantino
()
47
{}
48
50
// Const methods:
52
53
const
AthExIParticle
*
AthExElephantino::leg1
()
const
54
{
55
assert(
m_legs
.size() == 4 );
56
if
(
m_legs
[0].
isValid
() ) {
return
*
m_legs
[0];
57
}
else
{
return
0;
58
}
59
}
60
61
const
AthExIParticle
*
AthExElephantino::leg2
()
const
62
{
63
assert(
m_legs
.size() == 4 );
64
if
(
m_legs
[1].
isValid
() ) {
return
*
m_legs
[1];
65
}
else
{
return
0;
66
}
67
}
68
69
const
AthExIParticle
*
AthExElephantino::leg3
()
const
70
{
71
assert(
m_legs
.size() == 4 );
72
if
(
m_legs
[2].
isValid
() ) {
return
*
m_legs
[2];
73
}
else
{
return
0;
74
}
75
}
76
77
const
AthExIParticle
*
AthExElephantino::leg4
()
const
78
{
79
assert(
m_legs
.size() == 4 );
80
if
(
m_legs
[3].
isValid
() ) {
return
*
m_legs
[3];
81
}
else
{
return
0;
82
}
83
}
84
85
const
AthExIParticle
*
AthExElephantino::ear1
()
const
86
{
87
assert (
m_ears
.size() == 2);
88
if
(
m_ears
[0].
isValid
()) {
return
*
m_ears
[0];
89
}
else
{
return
0;
90
}
91
}
92
93
const
AthExIParticle
*
AthExElephantino::ear2
()
const
94
{
95
assert (
m_ears
.size() == 2);
96
if
(
m_ears
[1].
isValid
()) {
return
*
m_ears
[1];
97
}
else
{
return
0;
98
}
99
}
100
102
// Non-const methods:
104
105
void
AthExElephantino::setLegs
(
const
ElementLink<AthExIParticles>
&
leg1
,
106
const
ElementLink<AthExIParticles>
&
leg2
,
107
const
ElementLink<AthExIParticles>
&
leg3
,
108
const
ElementLink<AthExIParticles>
&
leg4
)
109
{
110
m_legs
.clear();
111
m_legs
.reserve( 4 );
112
m_legs
.push_back(
leg1
);
113
m_legs
.push_back(
leg2
);
114
m_legs
.push_back(
leg3
);
115
m_legs
.push_back(
leg4
);
116
}
117
118
void
AthExElephantino::setEars
(
const
ElementLink<AthExIParticles>
&
ear1
,
119
const
ElementLink<AthExIParticles>
&
ear2
)
120
{
121
m_ears
.clear();
122
m_ears
.reserve( 2 );
123
m_ears
.push_back(
ear1
);
124
m_ears
.push_back(
ear2
);
125
}
AthExElephantino.h
isValid
bool isValid() const
Test to see if the link can be dereferenced.
AthExElephantino::setEars
void setEars(const ElementLink< AthExIParticles > &e1, const ElementLink< AthExIParticles > &e4)
Definition
AthExElephantino.cxx:118
AthExElephantino::m_legs
ElementLinkVector< AthExIParticles > m_legs
Definition
AthExElephantino.h:91
AthExElephantino::m_ears
ElementLinkVector< AthExIParticles > m_ears
Definition
AthExElephantino.h:92
AthExElephantino::ear1
const AthExIParticle * ear1() const
Definition
AthExElephantino.cxx:85
AthExElephantino::leg4
const AthExIParticle * leg4() const
Definition
AthExElephantino.cxx:77
AthExElephantino::leg3
const AthExIParticle * leg3() const
Definition
AthExElephantino.cxx:69
AthExElephantino::leg1
const AthExIParticle * leg1() const
Definition
AthExElephantino.cxx:53
AthExElephantino::AthExElephantino
AthExElephantino()
Default constructor:
Definition
AthExElephantino.cxx:25
AthExElephantino::leg2
const AthExIParticle * leg2() const
Definition
AthExElephantino.cxx:61
AthExElephantino::setLegs
void setLegs(const ElementLink< AthExIParticles > &p1, const ElementLink< AthExIParticles > &p2, const ElementLink< AthExIParticles > &p3, const ElementLink< AthExIParticles > &p4)
Definition
AthExElephantino.cxx:105
AthExElephantino::~AthExElephantino
virtual ~AthExElephantino()
Constructor with parameters:
Definition
AthExElephantino.cxx:46
AthExElephantino::ear2
const AthExIParticle * ear2() const
Definition
AthExElephantino.cxx:93
AthExElephantino::operator=
AthExElephantino & operator=(const AthExElephantino &rhs)
Assignment operator:
Definition
AthExElephantino.cxx:35
AthExIParticle
Definition
AthExIParticle.h:21
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:40
Generated on
for ATLAS Offline Software by
1.17.0