|
MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
Base attribute class. More...
#include <Attribute.h>
Public Member Functions | |
| Attribute () | |
| Default constructor. | |
| virtual | ~Attribute () |
| Virtual destructor. | |
| const GenEvent * | event () const |
| virtual bool | from_string (const std::string &att)=0 |
| Fill class content from string. | |
| 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. | |
| GenParticlePtr | particle () |
| ConstGenParticlePtr | particle () const |
| virtual bool | to_string (std::string &att) const =0 |
| Fill string from class content. | |
| const std::string & | unparsed_string () const |
| Get unparsed string. | |
| GenVertexPtr | vertex () |
| ConstGenVertexPtr | vertex () const |
Protected Member Functions | |
| Attribute (const std::string &st) | |
| Protected constructor that allows to set string. | |
| void | set_is_parsed (bool flag) |
| Set is_parsed flag. | |
| void | set_unparsed_string (const std::string &st) |
| Set unparsed string. | |
Friends | |
| class | GenEvent |
| GenEvent is a friend. | |
Base attribute class.
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 44 of file Attribute.h.
|
inline |
Default constructor.
Definition at line 51 of file Attribute.h.
Referenced by HepMC3::BoolAttribute::BoolAttribute(), HepMC3::BoolAttribute::BoolAttribute(), HepMC3::CharAttribute::CharAttribute(), HepMC3::CharAttribute::CharAttribute(), HepMC3::DoubleAttribute::DoubleAttribute(), HepMC3::DoubleAttribute::DoubleAttribute(), HepMC3::FloatAttribute::FloatAttribute(), HepMC3::FloatAttribute::FloatAttribute(), HepMC3::IntAttribute::IntAttribute(), HepMC3::IntAttribute::IntAttribute(), HepMC3::LongAttribute::LongAttribute(), HepMC3::LongAttribute::LongAttribute(), HepMC3::LongDoubleAttribute::LongDoubleAttribute(), HepMC3::LongDoubleAttribute::LongDoubleAttribute(), HepMC3::LongLongAttribute::LongLongAttribute(), HepMC3::LongLongAttribute::LongLongAttribute(), HepMC3::StringAttribute::StringAttribute(), HepMC3::StringAttribute::StringAttribute(), HepMC3::UIntAttribute::UIntAttribute(), HepMC3::UIntAttribute::UIntAttribute(), HepMC3::ULongAttribute::ULongAttribute(), HepMC3::ULongAttribute::ULongAttribute(), HepMC3::ULongLongAttribute::ULongLongAttribute(), HepMC3::ULongLongAttribute::ULongLongAttribute(), HepMC3::VectorCharAttribute::VectorCharAttribute(), HepMC3::VectorCharAttribute::VectorCharAttribute(), HepMC3::VectorDoubleAttribute::VectorDoubleAttribute(), HepMC3::VectorDoubleAttribute::VectorDoubleAttribute(), HepMC3::VectorFloatAttribute::VectorFloatAttribute(), HepMC3::VectorFloatAttribute::VectorFloatAttribute(), HepMC3::VectorIntAttribute::VectorIntAttribute(), HepMC3::VectorIntAttribute::VectorIntAttribute(), HepMC3::VectorLongDoubleAttribute::VectorLongDoubleAttribute(), HepMC3::VectorLongDoubleAttribute::VectorLongDoubleAttribute(), HepMC3::VectorLongIntAttribute::VectorLongIntAttribute(), HepMC3::VectorLongIntAttribute::VectorLongIntAttribute(), HepMC3::VectorLongLongAttribute::VectorLongLongAttribute(), HepMC3::VectorLongLongAttribute::VectorLongLongAttribute(), HepMC3::VectorStringAttribute::VectorStringAttribute(), HepMC3::VectorStringAttribute::VectorStringAttribute(), HepMC3::VectorUIntAttribute::VectorUIntAttribute(), HepMC3::VectorUIntAttribute::VectorUIntAttribute(), HepMC3::VectorULongAttribute::VectorULongAttribute(), HepMC3::VectorULongAttribute::VectorULongAttribute(), HepMC3::VectorULongLongAttribute::VectorULongLongAttribute(), and HepMC3::VectorULongLongAttribute::VectorULongLongAttribute().
|
inlinevirtual |
|
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 66 of file Attribute.h.
|
inline |
return the GenEvent to which this Attribute belongs, if at all.
Definition at line 108 of file Attribute.h.
References GenEvent.
|
pure virtual |
Fill class content from string.
Implemented in HepMC3::BoolAttribute, HepMC3::CharAttribute, HepMC3::DoubleAttribute, HepMC3::FloatAttribute, HepMC3::GenCrossSection, HepMC3::GenHeavyIon, HepMC3::GenPdfInfo, HepMC3::IntAttribute, HepMC3::LongAttribute, HepMC3::LongDoubleAttribute, HepMC3::LongLongAttribute, HepMC3::StringAttribute, HepMC3::UIntAttribute, HepMC3::ULongAttribute, HepMC3::ULongLongAttribute, HepMC3::VectorCharAttribute, HepMC3::VectorDoubleAttribute, HepMC3::VectorFloatAttribute, HepMC3::VectorIntAttribute, HepMC3::VectorLongDoubleAttribute, HepMC3::VectorLongIntAttribute, HepMC3::VectorLongLongAttribute, HepMC3::VectorStringAttribute, HepMC3::VectorUIntAttribute, HepMC3::VectorULongAttribute, and HepMC3::VectorULongLongAttribute.
|
inlinevirtual |
Optionally initialize the attribute after from_string.
Definition at line 81 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.
Definition at line 90 of file Attribute.h.
|
inline |
Check if this attribute is parsed.
Definition at line 102 of file Attribute.h.
|
inline |
return the GenParticle to which this Attribute belongs, if at all.
Definition at line 113 of file Attribute.h.
|
inline |
return the GenParticle to which this Attribute belongs, if at all.
Definition at line 118 of file Attribute.h.
|
inlineprotected |
Set is_parsed flag.
Definition at line 134 of file Attribute.h.
Referenced by HepMC3::BoolAttribute::from_string(), HepMC3::CharAttribute::from_string(), HepMC3::DoubleAttribute::from_string(), HepMC3::FloatAttribute::from_string(), HepMC3::IntAttribute::from_string(), HepMC3::LongAttribute::from_string(), HepMC3::LongDoubleAttribute::from_string(), HepMC3::LongLongAttribute::from_string(), HepMC3::UIntAttribute::from_string(), HepMC3::ULongAttribute::from_string(), HepMC3::ULongLongAttribute::from_string(), HepMC3::VectorCharAttribute::from_string(), HepMC3::VectorDoubleAttribute::from_string(), HepMC3::VectorFloatAttribute::from_string(), HepMC3::VectorIntAttribute::from_string(), HepMC3::VectorLongDoubleAttribute::from_string(), HepMC3::VectorLongIntAttribute::from_string(), HepMC3::VectorLongLongAttribute::from_string(), HepMC3::VectorStringAttribute::from_string(), HepMC3::VectorUIntAttribute::from_string(), HepMC3::VectorULongAttribute::from_string(), HepMC3::VectorULongLongAttribute::from_string(), HepMC3::BoolAttribute::set_value(), HepMC3::CharAttribute::set_value(), HepMC3::DoubleAttribute::set_value(), HepMC3::FloatAttribute::set_value(), HepMC3::IntAttribute::set_value(), HepMC3::LongAttribute::set_value(), HepMC3::LongDoubleAttribute::set_value(), HepMC3::LongLongAttribute::set_value(), HepMC3::UIntAttribute::set_value(), HepMC3::ULongAttribute::set_value(), HepMC3::ULongLongAttribute::set_value(), HepMC3::VectorCharAttribute::set_value(), HepMC3::VectorDoubleAttribute::set_value(), HepMC3::VectorFloatAttribute::set_value(), HepMC3::VectorIntAttribute::set_value(), HepMC3::VectorLongDoubleAttribute::set_value(), HepMC3::VectorLongIntAttribute::set_value(), HepMC3::VectorLongLongAttribute::set_value(), HepMC3::VectorStringAttribute::set_value(), HepMC3::VectorUIntAttribute::set_value(), HepMC3::VectorULongAttribute::set_value(), and HepMC3::VectorULongLongAttribute::set_value().
|
inlineprotected |
Set unparsed string.
Definition at line 137 of file Attribute.h.
Referenced by HepMC3::StringAttribute::from_string(), and HepMC3::StringAttribute::set_value().
|
pure virtual |
Fill string from class content.
Implemented in HepMC3::BoolAttribute, HepMC3::CharAttribute, HepMC3::DoubleAttribute, HepMC3::FloatAttribute, HepMC3::GenCrossSection, HepMC3::GenHeavyIon, HepMC3::GenPdfInfo, HepMC3::IntAttribute, HepMC3::LongAttribute, HepMC3::LongDoubleAttribute, HepMC3::LongLongAttribute, HepMC3::StringAttribute, HepMC3::UIntAttribute, HepMC3::ULongAttribute, HepMC3::ULongLongAttribute, HepMC3::VectorCharAttribute, HepMC3::VectorDoubleAttribute, HepMC3::VectorFloatAttribute, HepMC3::VectorIntAttribute, HepMC3::VectorLongDoubleAttribute, HepMC3::VectorLongIntAttribute, HepMC3::VectorLongLongAttribute, HepMC3::VectorStringAttribute, HepMC3::VectorUIntAttribute, HepMC3::VectorULongAttribute, and HepMC3::VectorULongLongAttribute.
|
inline |
Get unparsed string.
Definition at line 105 of file Attribute.h.
Referenced by HepMC3::StringAttribute::to_string(), and HepMC3::StringAttribute::value().
|
inline |
return the GenVertex to which this Attribute belongs, if at all.
Definition at line 123 of file Attribute.h.
|
inline |
return the GenVertex to which this Attribute belongs, if at all.
Definition at line 128 of file Attribute.h.
|
friend |