HepMC3 event record library
|
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 46 of file Attribute.h.
#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... | |
|
inline |
|
inlinevirtual |
Virtual destructor.
Definition at line 56 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 68 of file Attribute.h.
References Attribute::m_event.
|
inline |
return the GenEvent to which this Attribute belongs, if at all.
Definition at line 110 of file Attribute.h.
References Attribute::m_event.
|
pure virtual |
Fill class content from string.
Implemented in AssociatedParticle, IntAttribute, LongAttribute, DoubleAttribute, FloatAttribute, StringAttribute, CharAttribute, LongLongAttribute, LongDoubleAttribute, UIntAttribute, ULongAttribute, ULongLongAttribute, BoolAttribute, VectorCharAttribute, VectorFloatAttribute, VectorLongDoubleAttribute, VectorLongLongAttribute, VectorUIntAttribute, VectorULongAttribute, VectorULongLongAttribute, VectorIntAttribute, VectorLongIntAttribute, VectorDoubleAttribute, GenCrossSection, GenHeavyIon, GenPdfInfo, HEPRUPAttribute, HEPEUPAttribute, and VectorStringAttribute.
|
inlinevirtual |
Optionally initialize the attribute after from_string.
Reimplemented in HEPEUPAttribute.
Definition at line 83 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 92 of file Attribute.h.
|
inline |
Check if this attribute is parsed.
Definition at line 104 of file Attribute.h.
References Attribute::m_is_parsed.
|
inline |
return the GenParticle to which this Attribute belongs, if at all.
Definition at line 115 of file Attribute.h.
References Attribute::m_particle.
|
inline |
return the GenParticle to which this Attribute belongs, if at all.
Definition at line 120 of file Attribute.h.
References Attribute::m_particle.
|
inlineprotected |
|
inlineprotected |
|
pure virtual |
Fill string from class content.
Implemented in IntAttribute, LongAttribute, DoubleAttribute, FloatAttribute, StringAttribute, CharAttribute, LongLongAttribute, LongDoubleAttribute, UIntAttribute, ULongAttribute, ULongLongAttribute, BoolAttribute, VectorCharAttribute, VectorFloatAttribute, VectorLongDoubleAttribute, VectorLongLongAttribute, VectorUIntAttribute, VectorULongAttribute, VectorULongLongAttribute, VectorIntAttribute, VectorLongIntAttribute, VectorDoubleAttribute, VectorStringAttribute, GenCrossSection, GenHeavyIon, GenPdfInfo, HEPRUPAttribute, and HEPEUPAttribute.
|
inline |
|
inline |
return the GenVertex to which this Attribute belongs, if at all.
Definition at line 125 of file Attribute.h.
References Attribute::m_vertex.
|
inline |
return the GenVertex to which this Attribute belongs, if at all.
Definition at line 130 of file Attribute.h.
References Attribute::m_vertex.
|
friend |
GenEvent is a friend.
Definition at line 71 of file Attribute.h.
|
private |
Possibility to be aware of the
Definition at line 147 of file Attribute.h.
|
private |
Is this attribute parsed?
Definition at line 145 of file Attribute.h.
|
private |
controlling GenEvent object.
Particle to which assigned.
Definition at line 149 of file Attribute.h.
|
private |
Raw (unparsed) string.
Definition at line 146 of file Attribute.h.
|
private |
Vertex to which assigned.
Definition at line 150 of file Attribute.h.