All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ()
 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...
 
virtual ~KeyedObject ()
 Standard destructor. 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...
 
virtual long index () const
 Distance in the parent container. 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...
 

Static Public Member Functions

static const CLIDclassID ()
 
- Static Public Member Functions inherited from ContainedObject
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...
 
- Protected Types inherited from KeyedObject< int >
typedef Containers::key_traits
< key_type
traits
 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 release ()
 Release reference. If the reference count is ZERO, delete the object. More...
 
void setKey (const key_type &key)
 Set object key. More...
 
- Protected Member Functions inherited from ContainedObject
 ContainedObject ()
 Constructors. More...
 
 ContainedObject (const ContainedObject &)
 Copy constructor. 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 24 of file MyVertex.h.

Constructor & Destructor Documentation

MyVertex::MyVertex ( )
inline

Standard constructor.

Definition at line 33 of file MyVertex.h.

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

Standard constructor.

Definition at line 36 of file MyVertex.h.

36  : m_x(x), m_y(y), m_z(z) {
37  }
double y() const
Accessors: Retrieve y-position.
Definition: MyVertex.h:47
double m_z
Definition: MyVertex.h:27
double m_x
The track momentum.
Definition: MyVertex.h:27
double m_y
Definition: MyVertex.h:27
double x() const
Accessors: Retrieve x-position.
Definition: MyVertex.h:45
double z() const
Accessors: Retrieve z-position.
Definition: MyVertex.h:49
virtual MyVertex::~MyVertex ( )
inlinevirtual

Standard Destructor.

Definition at line 39 of file MyVertex.h.

39  {
40  }

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 73 of file MyVertex.h.

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

Definition at line 43 of file MyVertex.h.

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

Retrieve pointer to class definition structure.

Reimplemented from ContainedObject.

Definition at line 42 of file MyVertex.h.

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

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

Definition at line 58 of file MyVertex.h.

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

Definition at line 59 of file MyVertex.h.

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

Input streamer.

Reimplemented from KeyedObject< int >.

Definition at line 86 of file MyVertex.h.

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

Output streamer.

Reimplemented from KeyedObject< int >.

Definition at line 90 of file MyVertex.h.

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

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

Definition at line 61 of file MyVertex.h.

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

Accessors: Update x-position.

Definition at line 51 of file MyVertex.h.

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

Accessors: Update y-position.

Definition at line 53 of file MyVertex.h.

53 { m_y = y; }
double y() const
Accessors: Retrieve y-position.
Definition: MyVertex.h:47
double m_y
Definition: MyVertex.h:27
void MyVertex::setZ ( double  z)
inline

Accessors: Update z-position.

Definition at line 55 of file MyVertex.h.

55 { m_z = z; }
double m_z
Definition: MyVertex.h:27
double z() const
Accessors: Retrieve z-position.
Definition: MyVertex.h:49
double MyVertex::x ( ) const
inline

Accessors: Retrieve x-position.

Definition at line 45 of file MyVertex.h.

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

Accessors: Retrieve y-position.

Definition at line 47 of file MyVertex.h.

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

Accessors: Retrieve z-position.

Definition at line 49 of file MyVertex.h.

49 { return m_z; }
double m_z
Definition: MyVertex.h:27

Member Data Documentation

SmartRefVector<MyTrack> MyVertex::m_daughters
private

Definition at line 30 of file MyVertex.h.

SmartRef<MyTrack> MyVertex::m_mother
private

Link to Top level event.

Definition at line 29 of file MyVertex.h.

double MyVertex::m_x
private

The track momentum.

Definition at line 27 of file MyVertex.h.

double MyVertex::m_y
private

Definition at line 27 of file MyVertex.h.

double MyVertex::m_z
private

Definition at line 27 of file MyVertex.h.


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