HepMC3 event record library
|
Forward declaration of GenParticle. More...
#include <Attribute.h>
Public Member Functions | |
Attribute () | |
Default constructor. More... | |
virtual | ~Attribute () |
Virtual destructor. More... | |
virtual bool | from_string (const std::string &att)=0 |
Fill class content from string. More... | |
virtual bool | init () |
Optionally initialize the attribute after from_string. More... | |
virtual bool | init (const GenRunInfo &) |
Optionally initialize the attribute after from_string. More... | |
virtual bool | to_string (std::string &att) const =0 |
Fill string from class content. More... | |
bool | is_parsed () const |
Check if this attribute is parsed. More... | |
const std::string & | unparsed_string () const |
Get unparsed string. More... | |
const GenEvent * | event () const |
GenParticlePtr | particle () |
ConstGenParticlePtr | particle () const |
GenVertexPtr | vertex () |
ConstGenVertexPtr | vertex () const |
Protected Member Functions | |
Attribute (const std::string &st) | |
Protected constructor that allows to set string. More... | |
void | set_is_parsed (bool flag) |
Set is_parsed flag. More... | |
void | set_unparsed_string (const std::string &st) |
Set unparsed string. More... | |
Private Attributes | |
bool | m_is_parsed |
Is this attribute parsed? More... | |
std::string | m_string |
Raw (unparsed) string. More... | |
const GenEvent * | m_event |
GenParticlePtr | m_particle |
controlling GenEvent object. More... | |
GenVertexPtr | m_vertex |
Vertex to which assigned. More... | |
Friends | |
class | GenEvent |
GenEvent is a friend. More... | |
Forward declaration of GenParticle.
Base class for all attributes.
Contains virtual functions to_string and from_string that each attribute must implement, as well as init function that attributes should overload to initialize parsed attribute
Definition at line 45 of file Attribute.h.
|
inline |
|
inlinevirtual |
Virtual destructor.
Definition at line 55 of file Attribute.h.
|
inlineexplicitprotected |
Protected constructor that allows to set string.
Used when parsing attributes from file. An StringAttribute class object is made, which uses this constructor to signify that it just holds string without parsing it.
Definition at line 67 of file Attribute.h.
References Attribute::m_event.
|
inline |
return the GenEvent to which this Attribute belongs, if at all.
Definition at line 109 of file Attribute.h.
References Attribute::m_event.
|
pure virtual |
Fill class content from string.
Implemented in VectorStringAttribute, VectorDoubleAttribute, VectorLongIntAttribute, VectorIntAttribute, VectorULongLongAttribute, VectorULongAttribute, VectorUIntAttribute, VectorLongLongAttribute, VectorLongDoubleAttribute, VectorFloatAttribute, VectorCharAttribute, BoolAttribute, ULongLongAttribute, ULongAttribute, UIntAttribute, LongDoubleAttribute, LongLongAttribute, CharAttribute, StringAttribute, FloatAttribute, DoubleAttribute, LongAttribute, GenHeavyIon, IntAttribute, HEPEUPAttribute, GenCrossSection, GenPdfInfo, HEPRUPAttribute, and AssociatedParticle.
|
inlinevirtual |
Optionally initialize the attribute after from_string.
Reimplemented in HEPEUPAttribute.
Definition at line 82 of file Attribute.h.
|
inlinevirtual |
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 91 of file Attribute.h.
|
inline |
Check if this attribute is parsed.
Definition at line 103 of file Attribute.h.
References Attribute::m_is_parsed.
|
inline |
return the GenParticle to which this Attribute belongs, if at all.
Definition at line 114 of file Attribute.h.
References Attribute::m_particle.
|
inline |
return the GenParticle to which this Attribute belongs, if at all.
Definition at line 119 of file Attribute.h.
References Attribute::m_particle.
|
inlineprotected |
|
inlineprotected |
|
pure virtual |
Fill string from class content.
Implemented in VectorStringAttribute, VectorDoubleAttribute, VectorLongIntAttribute, VectorIntAttribute, VectorULongLongAttribute, VectorULongAttribute, VectorUIntAttribute, VectorLongLongAttribute, VectorLongDoubleAttribute, VectorFloatAttribute, VectorCharAttribute, BoolAttribute, ULongLongAttribute, ULongAttribute, UIntAttribute, LongDoubleAttribute, LongLongAttribute, CharAttribute, StringAttribute, FloatAttribute, DoubleAttribute, LongAttribute, GenHeavyIon, IntAttribute, HEPEUPAttribute, GenCrossSection, GenPdfInfo, and HEPRUPAttribute.
|
inline |
|
inline |
return the GenVertex to which this Attribute belongs, if at all.
Definition at line 124 of file Attribute.h.
References Attribute::m_vertex.
|
inline |
return the GenVertex to which this Attribute belongs, if at all.
Definition at line 129 of file Attribute.h.
References Attribute::m_vertex.
|
friend |
GenEvent is a friend.
Definition at line 70 of file Attribute.h.
|
private |
Possibility to be aware of the
Definition at line 146 of file Attribute.h.
|
private |
Is this attribute parsed?
Definition at line 144 of file Attribute.h.
|
private |
controlling GenEvent object.
Particle to which assigned.
Definition at line 148 of file Attribute.h.
|
private |
Raw (unparsed) string.
Definition at line 145 of file Attribute.h.
|
private |
Vertex to which assigned.
Definition at line 149 of file Attribute.h.