ATLAS Offline Software
AthExElephantino.cxx
Go to the documentation of this file.
1 
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
17 
19 // Public methods:
21 
22 // Constructors
24 
26  m_legs(),
27  m_ears()
28 {}
29 
31  m_legs( rhs.m_legs ),
32  m_ears( rhs.m_ears )
33 {}
34 
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
47 {}
48 
50 // Const methods:
52 
54 {
55  assert( m_legs.size() == 4 );
56  if ( m_legs[0].isValid() ) { return *m_legs[0];
57  } else { return 0;
58  }
59 }
60 
62 {
63  assert( m_legs.size() == 4 );
64  if ( m_legs[1].isValid() ) { return *m_legs[1];
65  } else { return 0;
66  }
67 }
68 
70 {
71  assert( m_legs.size() == 4 );
72  if ( m_legs[2].isValid() ) { return *m_legs[2];
73  } else { return 0;
74  }
75 }
76 
78 {
79  assert( m_legs.size() == 4 );
80  if ( m_legs[3].isValid() ) { return *m_legs[3];
81  } else { return 0;
82  }
83 }
84 
86 {
87  assert (m_ears.size() == 2);
88  if (m_ears[0].isValid()) { return *m_ears[0];
89  } else { return 0;
90  }
91 }
92 
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 
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 
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::~AthExElephantino
virtual ~AthExElephantino()
Constructor with parameters:
Definition: AthExElephantino.cxx:46
AthExElephantino::leg4
const AthExIParticle * leg4() const
Definition: AthExElephantino.cxx:77
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
ElementLinkVector::push_back
void push_back(const ElemLink &link)
Definition: AthLinks/ElementLinkVector.h:316
AthExElephantino::ear2
const AthExIParticle * ear2() const
Definition: AthExElephantino.cxx:93
AthExElephantino::ear1
const AthExIParticle * ear1() const
Definition: AthExElephantino.cxx:85
ElementLinkVector::clear
void clear()
Definition: AthLinks/ElementLinkVector.h:341
AthExElephantino::leg2
const AthExIParticle * leg2() const
Definition: AthExElephantino.cxx:61
AthExElephantino::m_ears
ElementLinkVector< AthExIParticles > m_ears
Definition: AthExElephantino.h:92
AthExElephantino
Definition: AthExElephantino.h:33
AthExElephantino::AthExElephantino
AthExElephantino()
Default constructor:
Definition: AthExElephantino.cxx:25
AthExElephantino::operator=
AthExElephantino & operator=(const AthExElephantino &rhs)
Assignment operator:
Definition: AthExElephantino.cxx:35
AthExElephantino::setLegs
void setLegs(const ElementLink< AthExIParticles > &p1, const ElementLink< AthExIParticles > &p2, const ElementLink< AthExIParticles > &p3, const ElementLink< AthExIParticles > &p4)
Definition: AthExElephantino.cxx:105
ElementLinkVector::size
size_type size() const
Definition: AthLinks/ElementLinkVector.h:292
AthExElephantino.h
AthExElephantino::leg1
const AthExIParticle * leg1() const
Definition: AthExElephantino.cxx:53
ElementLinkVector::reserve
void reserve(size_type n)
Definition: AthLinks/ElementLinkVector.h:297
AthExElephantino::leg3
const AthExIParticle * leg3() const
Definition: AthExElephantino.cxx:69
AthExElephantino::m_legs
ElementLinkVector< AthExIParticles > m_legs
Definition: AthExElephantino.h:91
AthExElephantino::setEars
void setEars(const ElementLink< AthExIParticles > &e1, const ElementLink< AthExIParticles > &e4)
Definition: AthExElephantino.cxx:118
AthExIParticle
Definition: AthExIParticle.h:21