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

Detailed Description

Attribute that holds an Integer implemented as an int.

Examples
LHEF_example_cat.cc.

Definition at line 200 of file Attribute.h.

#include <Attribute.h>

+ Inheritance diagram for LongAttribute:
+ Collaboration diagram for LongAttribute:

Public Member Functions

 LongAttribute ()
 Default constructor. More...
 
 LongAttribute (long val)
 Constructor initializing attribute value. More...
 
bool from_string (const std::string &att) override
 Implementation of Attribute::from_string. More...
 
bool to_string (std::string &att) const override
 Implementation of Attribute::to_string. More...
 
long value () const
 get the value associated to this Attribute. More...
 
void set_value (const long &l)
 set the value associated to this Attribute. 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...
 
bool is_parsed () const
 Check if this attribute is parsed. More...
 
const std::string & unparsed_string () const
 Get unparsed string. More...
 
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. More...
 
void set_unparsed_string (const std::string &st)
 Set unparsed string. More...
 

Private Attributes

long m_val
 Attribute value. More...
 

Constructor & Destructor Documentation

◆ LongAttribute() [1/2]

LongAttribute ( )
inline

Default constructor.

Definition at line 204 of file Attribute.h.

◆ LongAttribute() [2/2]

LongAttribute ( long  val)
inline

Constructor initializing attribute value.

Definition at line 207 of file Attribute.h.

Member Function Documentation

◆ event()

const GenEvent* event ( ) const
inlineinherited

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

Definition at line 110 of file Attribute.h.

References Attribute::m_event.

◆ from_string()

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

Implementation of Attribute::from_string.

Implements Attribute.

Definition at line 210 of file Attribute.h.

References LongAttribute::m_val.

◆ init() [1/2]

virtual bool init ( )
inlinevirtualinherited

Optionally initialize the attribute after from_string.

Reimplemented in HEPEUPAttribute.

Definition at line 83 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 92 of file Attribute.h.

◆ is_parsed()

bool is_parsed ( ) const
inlineinherited

Check if this attribute is parsed.

Definition at line 104 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 115 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 120 of file Attribute.h.

References Attribute::m_particle.

◆ set_is_parsed()

void set_is_parsed ( bool  flag)
inlineprotectedinherited

Set is_parsed flag.

Definition at line 136 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 139 of file Attribute.h.

References Attribute::m_string.

◆ set_value()

void set_value ( const long &  l)
inline

set the value associated to this Attribute.

Definition at line 227 of file Attribute.h.

References LongAttribute::m_val.

◆ to_string()

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

Implementation of Attribute::to_string.

Implements Attribute.

Definition at line 216 of file Attribute.h.

References LongAttribute::m_val.

◆ unparsed_string()

const std::string& unparsed_string ( ) const
inlineinherited

Get unparsed string.

Definition at line 107 of file Attribute.h.

References Attribute::m_string.

◆ value()

long value ( ) const
inline

get the value associated to this Attribute.

Definition at line 222 of file Attribute.h.

References LongAttribute::m_val.

◆ vertex() [1/2]

GenVertexPtr vertex ( )
inlineinherited

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

Definition at line 125 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 130 of file Attribute.h.

References Attribute::m_vertex.

Field Documentation

◆ m_val

long m_val
private

Attribute value.

Definition at line 233 of file Attribute.h.


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