HepMC3 event record library
Public Member Functions | Protected Member Functions | Private Attributes
AssociatedParticle Class Reference

Detailed Description

Attribute class allowing eg. a GenParticle to refer to another GenParticle.

Examples
LHEF_example_cat.cc.

Definition at line 31 of file AssociatedParticle.h.

#include <AssociatedParticle.h>

+ Inheritance diagram for AssociatedParticle:
+ Collaboration diagram for AssociatedParticle:

Public Member Functions

 AssociatedParticle ()
 Default constructor.
 
 AssociatedParticle (ConstGenParticlePtr p)
 Constructor initializing attribute value.
 
bool from_string (const std::string &att)
 Implementation of Attribute::from_string.
 
int associatedId () const
 get id of the associated particle.
 
ConstGenParticlePtr associated () const
 get a pointer to the associated particle.
 
void set_associated (ConstGenParticlePtr p)
 set the value associated to this Attribute.
 
bool to_string (std::string &att) const override
 Implementation of Attribute::to_string.
 
int value () const
 get the value associated to this Attribute.
 
void set_value (const int &i)
 set the value associated to this Attribute.
 
virtual bool init ()
 Optionally initialize the attribute after from_string.
 
virtual bool init (const GenRunInfo &)
 Optionally initialize the attribute after from_string.
 
bool is_parsed () const
 Check if this attribute is parsed.
 
const std::string & unparsed_string () const
 Get unparsed string.
 
const GenEventevent () const
 
GenParticlePtr particle ()
 
ConstGenParticlePtr particle () const
 
GenVertexPtr vertex ()
 
ConstGenVertexPtr vertex () const
 

Protected Member Functions

void set_is_parsed (bool flag)
 Set is_parsed flag.
 
void set_unparsed_string (const std::string &st)
 Set unparsed string.
 

Private Attributes

ConstGenParticlePtr m_associated
 The associated particle.
 
int m_val
 Attribute value.
 
bool m_is_parsed
 Is this attribute parsed?
 
std::string m_string
 Raw (unparsed) string.
 
const GenEventm_event
 
GenParticlePtr m_particle
 controlling GenEvent object.
 
GenVertexPtr m_vertex
 Vertex to which assigned.
 

Constructor & Destructor Documentation

◆ AssociatedParticle() [1/2]

AssociatedParticle ( )
inline

Default constructor.

Definition at line 35 of file AssociatedParticle.h.

◆ AssociatedParticle() [2/2]

AssociatedParticle ( ConstGenParticlePtr  p)
inline

Constructor initializing attribute value.

Definition at line 38 of file AssociatedParticle.h.

Member Function Documentation

◆ associated()

ConstGenParticlePtr associated ( ) const
inline

get a pointer to the associated particle.

Definition at line 56 of file AssociatedParticle.h.

References AssociatedParticle::m_associated.

◆ associatedId()

int associatedId ( ) const
inline

get id of the associated particle.

Definition at line 51 of file AssociatedParticle.h.

References IntAttribute::value().

◆ event()

const GenEvent * event ( ) const
inlineinherited

return the GenEvent to which this Attribute belongs, if at all.

Definition at line 108 of file Attribute.h.

References Attribute::m_event.

◆ from_string()

bool from_string ( const std::string &  att)
inlinevirtual

◆ init() [1/2]

virtual bool init ( )
inlinevirtualinherited

Optionally initialize the attribute after from_string.

Reimplemented in HEPEUPAttribute.

Definition at line 81 of file Attribute.h.

◆ init() [2/2]

virtual bool init ( const GenRunInfo )
inlinevirtualinherited

Optionally initialize the attribute after from_string.

Is passed a reference to the GenRunInfo object to which the Attribute belongs.

Reimplemented in HEPEUPAttribute.

Definition at line 90 of file Attribute.h.

◆ is_parsed()

bool is_parsed ( ) const
inlineinherited

Check if this attribute is parsed.

Definition at line 102 of file Attribute.h.

References Attribute::m_is_parsed.

◆ particle() [1/2]

GenParticlePtr particle ( )
inlineinherited

return the GenParticle to which this Attribute belongs, if at all.

Definition at line 113 of file Attribute.h.

References Attribute::m_particle.

◆ particle() [2/2]

ConstGenParticlePtr particle ( ) const
inlineinherited

return the GenParticle to which this Attribute belongs, if at all.

Definition at line 118 of file Attribute.h.

References Attribute::m_particle.

◆ set_associated()

void set_associated ( ConstGenParticlePtr  p)
inline

set the value associated to this Attribute.

Definition at line 61 of file AssociatedParticle.h.

References AssociatedParticle::m_associated, and IntAttribute::set_value().

◆ set_is_parsed()

void set_is_parsed ( bool  flag)
inlineprotectedinherited

Set is_parsed flag.

Definition at line 134 of file Attribute.h.

References Attribute::m_is_parsed.

◆ set_unparsed_string()

void set_unparsed_string ( const std::string &  st)
inlineprotectedinherited

Set unparsed string.

Definition at line 137 of file Attribute.h.

References Attribute::m_string.

◆ set_value()

void set_value ( const int &  i)
inlineinherited

set the value associated to this Attribute.

Definition at line 184 of file Attribute.h.

References IntAttribute::m_val.

◆ to_string()

bool to_string ( std::string &  att) const
inlineoverridevirtualinherited

Implementation of Attribute::to_string.

Implements Attribute.

Definition at line 173 of file Attribute.h.

References IntAttribute::m_val.

◆ unparsed_string()

const std::string & unparsed_string ( ) const
inlineinherited

Get unparsed string.

Definition at line 105 of file Attribute.h.

References Attribute::m_string.

◆ value()

int value ( ) const
inlineinherited

get the value associated to this Attribute.

Definition at line 179 of file Attribute.h.

References IntAttribute::m_val.

◆ vertex() [1/2]

GenVertexPtr vertex ( )
inlineinherited

return the GenVertex to which this Attribute belongs, if at all.

Definition at line 123 of file Attribute.h.

References Attribute::m_vertex.

◆ vertex() [2/2]

ConstGenVertexPtr vertex ( ) const
inlineinherited

return the GenVertex to which this Attribute belongs, if at all.

Definition at line 128 of file Attribute.h.

References Attribute::m_vertex.

Field Documentation

◆ m_associated

ConstGenParticlePtr m_associated
private

The associated particle.

Definition at line 68 of file AssociatedParticle.h.

◆ m_event

const GenEvent* m_event
privateinherited

Possibility to be aware of the

Definition at line 145 of file Attribute.h.

◆ m_is_parsed

bool m_is_parsed
privateinherited

Is this attribute parsed?

Definition at line 143 of file Attribute.h.

◆ m_particle

GenParticlePtr m_particle
privateinherited

controlling GenEvent object.

Particle to which assigned.

Definition at line 147 of file Attribute.h.

◆ m_string

std::string m_string
privateinherited

Raw (unparsed) string.

Definition at line 144 of file Attribute.h.

◆ m_val

int m_val
privateinherited

Attribute value.

Definition at line 189 of file Attribute.h.

◆ m_vertex

GenVertexPtr m_vertex
privateinherited

Vertex to which assigned.

Definition at line 148 of file Attribute.h.


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