The Gaudi Framework
master (57817a18)
Toggle main menu visibility
Loading...
Searching...
No Matches
MyVertex.cpp
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2026 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#include <
GaudiTestSuite/MyVertex.h
>
12
13
using namespace
Gaudi::TestSuite
;
14
15
namespace
{
16
struct
MyVertexInstanceCount {
17
long
count;
18
MyVertexInstanceCount() : count( 0 ) {}
19
~MyVertexInstanceCount() {
20
if
( count ) std::cout <<
"Number of MyVertex instances:"
<< count << std::endl;
21
}
22
};
23
}
// namespace
24
static
MyVertexInstanceCount s_instances;
25
27
MyVertex::MyVertex
() :
m_x
( 0.0 ),
m_y
( 0.0 ),
m_z
( 0.0 ) { s_instances.count++; }
28
30
MyVertex::MyVertex
(
float
x
,
float
y
,
float
z
) :
m_x
(
x
),
m_y
(
y
),
m_z
(
z
) { s_instances.count++; }
31
33
MyVertex::~MyVertex
() { s_instances.count--; }
34
36
inline
StreamBuffer
&
MyVertex::serialize
(
StreamBuffer
& s )
const
{
37
KeyedObject<int>::serialize
( s );
38
s <<
m_motherParticle
(
this
);
39
s <<
m_decayParticles
(
this
);
40
s <<
m_event
(
this
);
41
s <<
m_collisions
(
this
);
42
s <<
m_x
<<
m_y
<<
m_z
;
43
return
s;
44
}
45
47
inline
StreamBuffer
&
MyVertex::serialize
(
StreamBuffer
& s ) {
48
KeyedObject<int>::serialize
( s );
49
s >>
m_motherParticle
(
this
);
50
s >>
m_decayParticles
(
this
);
51
s >>
m_event
(
this
);
52
s >>
m_collisions
(
this
);
53
s >>
m_x
>>
m_y
>>
m_z
;
54
return
s;
55
}
MyVertex.h
Gaudi::TestSuite::MyVertex::MyVertex
MyVertex()
Standard constructor.
Definition
MyVertex.cpp:27
Gaudi::TestSuite::MyVertex::m_y
float m_y
Definition
MyVertex.h:36
Gaudi::TestSuite::MyVertex::y
float y() const
Accessors: Retrieve y-component of the track momentum.
Definition
MyVertex.h:59
Gaudi::TestSuite::MyVertex::m_event
SmartRef< Event > m_event
Link to Top level event.
Definition
MyVertex.h:38
Gaudi::TestSuite::MyVertex::m_x
float m_x
The vertex location.
Definition
MyVertex.h:36
Gaudi::TestSuite::MyVertex::x
float x() const
Accessors: Retrieve x-component of the track momentum.
Definition
MyVertex.h:57
Gaudi::TestSuite::MyVertex::~MyVertex
~MyVertex() override
Standard Destructor.
Definition
MyVertex.cpp:33
Gaudi::TestSuite::MyVertex::z
float z() const
Accessors: Retrieve z-component of the track momentum.
Definition
MyVertex.h:61
Gaudi::TestSuite::MyVertex::serialize
StreamBuffer & serialize(StreamBuffer &s) const override
Serialize the object for writing.
Definition
MyVertex.cpp:36
Gaudi::TestSuite::MyVertex::m_decayParticles
SmartRefVector< MyTrack > m_decayParticles
Links to all daughter particles.
Definition
MyVertex.h:42
Gaudi::TestSuite::MyVertex::m_z
float m_z
Definition
MyVertex.h:36
Gaudi::TestSuite::MyVertex::m_collisions
SmartRefVector< Collision > m_collisions
Vector of collisions this object belongs to.
Definition
MyVertex.h:44
Gaudi::TestSuite::MyVertex::m_motherParticle
SmartRef< MyTrack > m_motherParticle
Link to mother track.
Definition
MyVertex.h:40
KeyedObject::serialize
StreamBuffer & serialize(StreamBuffer &s) const override
Serialize the object for writing.
Definition
KeyedObject.h:137
StreamBuffer
The stream buffer is a small object collecting object data.
Definition
StreamBuffer.h:48
Gaudi::TestSuite
Definition
ConditionAccessorHolder.h:21
GaudiTestSuite
src
Lib
MyVertex.cpp
Generated on
for The Gaudi Framework by
1.17.0