MyVertex Class Reference

Simple class that represents a vertex for testing purposes. More...

#include <src/Test/MyVertex.h>

Inheritance diagram for MyVertex:
Collaboration diagram for MyVertex:

Public Member Functions

 MyVertex ()
 Standard constructor. More...
 
 MyVertex (double x, double y, double z)
 Standard constructor. More...
 
virtual ~MyVertex ()
 Standard Destructor. More...
 
virtual const CLIDclID () const
 Retrieve pointer to class definition structure. More...
 
double x () const
 Accessors: Retrieve x-position. More...
 
double y () const
 Accessors: Retrieve y-position. More...
 
double z () const
 Accessors: Retrieve z-position. More...
 
void setX (double x)
 Accessors: Update x-position. More...
 
void setY (double y)
 Accessors: Update y-position. More...
 
void setZ (double z)
 Accessors: Update z-position. More...
 
const MyTrackmotherTrack () const
 Retrieve pointer to mother particle (const or non-const) More...
 
MyTrackmotherTrack ()
 
void setMotherTrack (MyTrack *value)
 Update pointer to mother particle (by a C++ pointer or a smart reference) More...
 
void addDaughterTrack (MyTrack *value)
 Retrieve pointer to vector of daughter particles (const or non-const) More...
 
virtual StreamBufferserialize (StreamBuffer &s)
 Input streamer. More...
 
virtual StreamBufferserialize (StreamBuffer &s) const
 Output streamer. More...
 
- Public Member Functions inherited from KeyedObject< int >
 KeyedObject ()=default
 Standard Constructor. The object key is preset to the invalid value. More...
 
 KeyedObject (const key_type &kval)
 Standard Constructor accepting the object's key. More...
 
 KeyedObject ()=default
 Standard Constructor. The object key is preset to the invalid value. More...
 
 KeyedObject (const key_type &kval)
 Standard Constructor accepting the object's key. More...
 
 ~KeyedObject () override
 Standard destructor. More...
 
 ~KeyedObject () override
 Standard destructor. More...
 
const key_typekey () const
 Retrieve Key of the object. More...
 
const key_typekey () const
 Retrieve Key of the object. More...
 
bool hasKey () const
 Check if the object has a key assigned or not. More...
 
bool hasKey () const
 Check if the object has a key assigned or not. More...
 
long index () const override
 Distance in the parent container. More...
 
long index () const override
 Distance in the parent container. More...
 
StreamBufferserialize (StreamBuffer &s) const override
 Serialize the object for writing. More...
 
StreamBufferserialize (StreamBuffer &s) override
 Serialize the object for reading. More...
 
StreamBufferserialize (StreamBuffer &s) const override
 Serialize the object for writing. More...
 
StreamBufferserialize (StreamBuffer &s) override
 Serialize the object for reading. More...
 
- Public Member Functions inherited from ContainedObject
const ObjectContainerBaseparent () const
 Access to parent object. More...
 
void setParent (ObjectContainerBase *value)
 Update parent member. More...
 
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the output stream (ASCII) More...
 
const ObjectContainerBaseparent () const
 Access to parent object. More...
 
void setParent (ObjectContainerBase *value)
 Update parent member. More...
 
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the output stream (ASCII) More...
 

Static Public Member Functions

static const CLIDclassID ()
 
- Static Public Member Functions inherited from ContainedObject
static const CLIDclassID ()
 
static const CLIDclassID ()
 

Private Attributes

double m_x
 The track momentum. More...
 
double m_y
 
double m_z
 
SmartRef< MyTrackm_mother
 Link to Top level event. More...
 
SmartRefVector< MyTrackm_daughters
 

Additional Inherited Members

- Public Types inherited from KeyedObject< int >
typedef int key_type
 Definition of the key-type to access object. More...
 
typedef int key_type
 Definition of the key-type to access object. More...
 
- Protected Types inherited from KeyedObject< int >
typedef Containers::key_traits< key_typetraits
 definition of the container key traits to be made friend More...
 
typedef Containers::key_traits< key_typetraits
 definition of the container key traits to be made friend More...
 
- Protected Member Functions inherited from KeyedObject< int >
unsigned long addRef ()
 Add reference to object (Increase reference counter). More...
 
unsigned long addRef ()
 Add reference to object (Increase reference counter). More...
 
unsigned long release ()
 Release reference. If the reference count is ZERO, delete the object. More...
 
unsigned long release ()
 Release reference. If the reference count is ZERO, delete the object. More...
 
void setKey (const key_type &key)
 Set object key. More...
 
void setKey (const key_type &key)
 Set object key. More...
 
- Protected Member Functions inherited from ContainedObject
 ContainedObject ()=default
 Constructors. More...
 
 ContainedObject (const ContainedObject &)
 Copy constructor – do NOT copy the parent reference... More...
 
virtual ~ContainedObject ()
 Destructor. More...
 
 ContainedObject ()=default
 Constructors. More...
 
 ContainedObject (const ContainedObject &)
 Copy constructor – do NOT copy the parent reference... More...
 
virtual ~ContainedObject ()
 Destructor. More...
 
- Protected Attributes inherited from KeyedObject< int >
key_type m_key
 Object Key; It's initial value is not determined. More...
 
long m_refCount
 Reference counter. More...
 
bool m_hasKey
 Boolean to indicate wether a key was already assigned. More...
 

Detailed Description

Simple class that represents a vertex for testing purposes.

Author
Pere Mato

Definition at line 23 of file MyVertex.h.

Constructor & Destructor Documentation

MyVertex::MyVertex ( )
inline

Standard constructor.

Definition at line 32 of file MyVertex.h.

32  : m_x(0.0), m_y(0.0), m_z(0.0) {
33  }
double m_z
Definition: MyVertex.h:26
double m_x
The track momentum.
Definition: MyVertex.h:26
double m_y
Definition: MyVertex.h:26
MyVertex::MyVertex ( double  x,
double  y,
double  z 
)
inline

Standard constructor.

Definition at line 35 of file MyVertex.h.

35  : m_x(x), m_y(y), m_z(z) {
36  }
double y() const
Accessors: Retrieve y-position.
Definition: MyVertex.h:46
double m_z
Definition: MyVertex.h:26
double m_x
The track momentum.
Definition: MyVertex.h:26
double m_y
Definition: MyVertex.h:26
double x() const
Accessors: Retrieve x-position.
Definition: MyVertex.h:44
double z() const
Accessors: Retrieve z-position.
Definition: MyVertex.h:48
virtual MyVertex::~MyVertex ( )
inlinevirtual

Standard Destructor.

Definition at line 38 of file MyVertex.h.

38  {
39  }

Member Function Documentation

void MyVertex::addDaughterTrack ( MyTrack value)
inline

Retrieve pointer to vector of daughter particles (const or non-const)

Update all daughter particles Remove all daughter particles Add single daughter particle to vector of daughter particles (by a C++ pointer or a smart reference)

Definition at line 72 of file MyVertex.h.

72 { m_daughters.push_back(value); }
SmartRefVector< MyTrack > m_daughters
Definition: MyVertex.h:29
static const CLID& MyVertex::classID ( )
inlinestatic

Definition at line 42 of file MyVertex.h.

42 { return CLID_MyVertex; }
virtual const CLID& MyVertex::clID ( ) const
inlinevirtual

Retrieve pointer to class definition structure.

Reimplemented from ContainedObject.

Definition at line 41 of file MyVertex.h.

41 { return classID(); }
static const CLID & classID()
Definition: MyVertex.h:42
const MyTrack* MyVertex::motherTrack ( ) const
inline

Retrieve pointer to mother particle (const or non-const)

Definition at line 57 of file MyVertex.h.

57 { return m_mother; }
SmartRef< MyTrack > m_mother
Link to Top level event.
Definition: MyVertex.h:28
MyTrack* MyVertex::motherTrack ( )
inline

Definition at line 58 of file MyVertex.h.

58 { return m_mother; }
SmartRef< MyTrack > m_mother
Link to Top level event.
Definition: MyVertex.h:28
StreamBuffer & MyVertex::serialize ( StreamBuffer s)
inlinevirtual

Input streamer.

Reimplemented from ContainedObject.

Definition at line 85 of file MyVertex.h.

85  {
86  return s >> m_x >> m_y >> m_z >> m_mother(this) >> m_daughters(this);
87 }
SmartRef< MyTrack > m_mother
Link to Top level event.
Definition: MyVertex.h:28
double m_z
Definition: MyVertex.h:26
double m_x
The track momentum.
Definition: MyVertex.h:26
SmartRefVector< MyTrack > m_daughters
Definition: MyVertex.h:29
double m_y
Definition: MyVertex.h:26
StreamBuffer & MyVertex::serialize ( StreamBuffer s) const
inlinevirtual

Output streamer.

Reimplemented from ContainedObject.

Definition at line 89 of file MyVertex.h.

89  {
90  return s << m_x << m_y << m_z << m_mother(this) << m_daughters(this);
91 }
SmartRef< MyTrack > m_mother
Link to Top level event.
Definition: MyVertex.h:28
double m_z
Definition: MyVertex.h:26
double m_x
The track momentum.
Definition: MyVertex.h:26
SmartRefVector< MyTrack > m_daughters
Definition: MyVertex.h:29
double m_y
Definition: MyVertex.h:26
void MyVertex::setMotherTrack ( MyTrack value)
inline

Update pointer to mother particle (by a C++ pointer or a smart reference)

Definition at line 60 of file MyVertex.h.

60 { m_mother = value; }
SmartRef< MyTrack > m_mother
Link to Top level event.
Definition: MyVertex.h:28
void MyVertex::setX ( double  x)
inline

Accessors: Update x-position.

Definition at line 50 of file MyVertex.h.

50 { m_x = x; }
double m_x
The track momentum.
Definition: MyVertex.h:26
double x() const
Accessors: Retrieve x-position.
Definition: MyVertex.h:44
void MyVertex::setY ( double  y)
inline

Accessors: Update y-position.

Definition at line 52 of file MyVertex.h.

52 { m_y = y; }
double y() const
Accessors: Retrieve y-position.
Definition: MyVertex.h:46
double m_y
Definition: MyVertex.h:26
void MyVertex::setZ ( double  z)
inline

Accessors: Update z-position.

Definition at line 54 of file MyVertex.h.

54 { m_z = z; }
double m_z
Definition: MyVertex.h:26
double z() const
Accessors: Retrieve z-position.
Definition: MyVertex.h:48
double MyVertex::x ( ) const
inline

Accessors: Retrieve x-position.

Definition at line 44 of file MyVertex.h.

44 { return m_x; }
double m_x
The track momentum.
Definition: MyVertex.h:26
double MyVertex::y ( ) const
inline

Accessors: Retrieve y-position.

Definition at line 46 of file MyVertex.h.

46 { return m_y; }
double m_y
Definition: MyVertex.h:26
double MyVertex::z ( ) const
inline

Accessors: Retrieve z-position.

Definition at line 48 of file MyVertex.h.

48 { return m_z; }
double m_z
Definition: MyVertex.h:26

Member Data Documentation

SmartRefVector<MyTrack> MyVertex::m_daughters
private

Definition at line 29 of file MyVertex.h.

SmartRef<MyTrack> MyVertex::m_mother
private

Link to Top level event.

Definition at line 28 of file MyVertex.h.

double MyVertex::m_x
private

The track momentum.

Definition at line 26 of file MyVertex.h.

double MyVertex::m_y
private

Definition at line 26 of file MyVertex.h.

double MyVertex::m_z
private

Definition at line 26 of file MyVertex.h.


The documentation for this class was generated from the following file: