The Gaudi Framework
v26r1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
MyVertex.h
Go to the documentation of this file.
1
// $Id: MyVertex.h,v 1.4 2006/01/26 18:11:06 mato Exp $
2
#ifndef GAUDIEXAMPLES_MYVERTEX_H
3
#define GAUDIEXAMPLES_MYVERTEX_H
4
5
// Include files
6
#include "GaudiKernel/SmartRef.h"
7
#include "GaudiKernel/SmartRefVector.h"
8
#include "GaudiKernel/StreamBuffer.h"
9
#include "GaudiKernel/ContainedObject.h"
10
#include "GaudiKernel/KeyedContainer.h"
11
12
// Forward declaration
13
class
MyTrack
;
14
15
// External declaration
16
static
const
CLID
& CLID_MyVertex = 9998;
17
24
class
MyVertex
:
public
KeyedObject
<int> {
25
private
:
27
double
m_x
,
m_y
,
m_z
;
29
SmartRef<MyTrack>
m_mother
;
30
SmartRefVector<MyTrack>
m_daughters
;
31
public
:
33
MyVertex
() :
m_x
(0.0),
m_y
(0.0),
m_z
(0.0) {
34
}
36
MyVertex
(
double
x
,
double
y
,
double
z
) :
m_x
(x),
m_y
(y),
m_z
(z) {
37
}
39
virtual
~MyVertex
() {
40
}
42
virtual
const
CLID
&
clID
()
const
{
return
classID
(); }
43
static
const
CLID
&
classID
() {
return
CLID_MyVertex; }
45
double
x
()
const
{
return
m_x
; }
47
double
y
()
const
{
return
m_y
; }
49
double
z
()
const
{
return
m_z
; }
51
void
setX
(
double
x
) {
m_x
=
x
; }
53
void
setY
(
double
y
) {
m_y
=
y
; }
55
void
setZ
(
double
z
) {
m_z
=
z
; }
56
58
const
MyTrack
*
motherTrack
()
const
{
return
m_mother
; }
59
MyTrack
*
motherTrack
() {
return
m_mother
; }
61
void
setMotherTrack
(
MyTrack
*
value
) {
m_mother
=
value
; }
62
//void setMotherTrack( SmartRef<MyTrack> value );
63
65
//const SmartRefVector<MyTrack>& daughterTracks() const;
66
// SmartRefVector<MyTrack>& daughterTracks();
68
//void setDaughterTracks( const SmartRefVector<MyTrack>& value );
70
//void removeDaughterTracks();
73
void
addDaughterTrack
(
MyTrack
*
value
) {
m_daughters
.push_back(value); }
74
//void addDaughterTrack( SmartRef<MyTrack> value );
75
77
virtual
StreamBuffer
&
serialize
(
StreamBuffer
&
s
);
78
80
virtual
StreamBuffer
&
serialize
(
StreamBuffer
&
s
)
const
;
81
};
82
83
#include "
MyTrack.h
"
84
86
inline
StreamBuffer
&
MyVertex::serialize
(
StreamBuffer
&
s
) {
87
return
s >>
m_x
>>
m_y
>>
m_z
>>
m_mother
(
this
) >>
m_daughters
(
this
);
88
}
90
inline
StreamBuffer
&
MyVertex::serialize
(
StreamBuffer
&
s
)
const
{
91
return
s <<
m_x
<<
m_y
<<
m_z
<<
m_mother
(
this
) <<
m_daughters
(
this
);
92
}
93
94
95
// Definition of all container types of MyVertex
96
typedef
KeyedContainer<MyVertex>
MyVertexVector
;
97
98
#endif // RIO_EXAMPLE1_MYTRACK_H
GaudiPython
src
Test
MyVertex.h
Generated on Mon Feb 16 2015 11:56:57 for The Gaudi Framework by
1.8.2