HepMC event record
Public Member Functions | Protected Member Functions | Private Attributes
IntAttribute Class Reference

Detailed Description

Attribute that holds an Integer implemented as an int.

Examples:
LHEF_example_cat.cc.

Definition at line 120 of file build/outputs/include/HepMC/Attribute.h.

#include <Attribute.h>

+ Inheritance diagram for IntAttribute:
+ Collaboration diagram for IntAttribute:

Public Member Functions

 IntAttribute ()
 Default constructor. More...
 
 IntAttribute (int val)
 Constructor initializing attribute value. More...
 
bool from_string (const string &att)
 Implementation of Attribute::from_string. More...
 
bool to_string (string &att) const
 Implementation of Attribute::to_string. More...
 
int value () const
 get the value associated to this Attribute. More...
 
void set_value (int i)
 set the value associated to this Attribute. More...
 
 IntAttribute ()
 Default constructor. More...
 
 IntAttribute (int val)
 Constructor initializing attribute value. More...
 
bool from_string (const string &att)
 Implementation of Attribute::from_string. More...
 
bool to_string (string &att) const
 Implementation of Attribute::to_string. More...
 
int value () const
 get the value associated to this Attribute. More...
 
void set_value (int i)
 set the value associated to this Attribute. More...
 
virtual bool init (const GenEvent &)
 Optionally initialize the attribute after from_string. More...
 
virtual bool init (const GenRunInfo &)
 Optionally initialize the attribute after from_string. More...
 
virtual bool init (const GenEvent &)
 Optionally initialize the attribute after from_string. More...
 
virtual bool init (const GenRunInfo &)
 Optionally initialize the attribute after from_string. More...
 
bool is_parsed ()
 Check if this attribute is parsed. More...
 
bool is_parsed ()
 Check if this attribute is parsed. More...
 
const string & unparsed_string () const
 Get unparsed string. More...
 
const string & unparsed_string () const
 Get unparsed string. More...
 

Protected Member Functions

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

Private Attributes

int m_val
 Attribute value. More...
 

Constructor & Destructor Documentation

◆ IntAttribute() [1/4]

IntAttribute ( )
inline

Default constructor.

Definition at line 124 of file build/outputs/include/HepMC/Attribute.h.

◆ IntAttribute() [2/4]

IntAttribute ( int  val)
inline

Constructor initializing attribute value.

Definition at line 127 of file build/outputs/include/HepMC/Attribute.h.

◆ IntAttribute() [3/4]

IntAttribute ( )
inline

Default constructor.

Definition at line 124 of file include/HepMC/Attribute.h.

◆ IntAttribute() [4/4]

IntAttribute ( int  val)
inline

Constructor initializing attribute value.

Definition at line 127 of file include/HepMC/Attribute.h.

Member Function Documentation

◆ from_string() [1/2]

bool from_string ( const string &  att)
inlinevirtual

Implementation of Attribute::from_string.

Implements Attribute.

Definition at line 130 of file build/outputs/include/HepMC/Attribute.h.

References IntAttribute::m_val.

◆ from_string() [2/2]

bool from_string ( const string &  att)
inlinevirtual

Implementation of Attribute::from_string.

Implements Attribute.

Definition at line 130 of file include/HepMC/Attribute.h.

References IntAttribute::m_val.

◆ init() [1/4]

virtual bool init ( const GenEvent )
inlinevirtualinherited

Optionally initialize the attribute after from_string.

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

Reimplemented in HEPEUPAttribute, and HEPEUPAttribute.

Definition at line 73 of file build/outputs/include/HepMC/Attribute.h.

◆ init() [2/4]

virtual bool init ( const GenEvent )
inlinevirtualinherited

Optionally initialize the attribute after from_string.

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

Reimplemented in HEPEUPAttribute, and HEPEUPAttribute.

Definition at line 73 of file include/HepMC/Attribute.h.

◆ init() [3/4]

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, and HEPEUPAttribute.

Definition at line 82 of file build/outputs/include/HepMC/Attribute.h.

◆ init() [4/4]

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, and HEPEUPAttribute.

Definition at line 82 of file include/HepMC/Attribute.h.

◆ is_parsed() [1/2]

bool is_parsed ( )
inlineinherited

Check if this attribute is parsed.

Definition at line 94 of file build/outputs/include/HepMC/Attribute.h.

References Attribute::m_is_parsed.

◆ is_parsed() [2/2]

bool is_parsed ( )
inlineinherited

Check if this attribute is parsed.

Definition at line 94 of file include/HepMC/Attribute.h.

References Attribute::m_is_parsed.

◆ set_is_parsed() [1/2]

void set_is_parsed ( bool  flag)
inlineprotectedinherited

Set is_parsed flag.

Definition at line 101 of file build/outputs/include/HepMC/Attribute.h.

References Attribute::m_is_parsed.

◆ set_is_parsed() [2/2]

void set_is_parsed ( bool  flag)
inlineprotectedinherited

Set is_parsed flag.

Definition at line 101 of file include/HepMC/Attribute.h.

References Attribute::m_is_parsed.

◆ set_unparsed_string() [1/2]

void set_unparsed_string ( const string &  st)
inlineprotectedinherited

Set unparsed string.

Definition at line 104 of file include/HepMC/Attribute.h.

References Attribute::m_string.

◆ set_unparsed_string() [2/2]

void set_unparsed_string ( const string &  st)
inlineprotectedinherited

Set unparsed string.

Definition at line 104 of file build/outputs/include/HepMC/Attribute.h.

References Attribute::m_string.

◆ set_value() [1/2]

void set_value ( int  i)
inline

set the value associated to this Attribute.

Definition at line 157 of file build/outputs/include/HepMC/Attribute.h.

References IntAttribute::m_val.

◆ set_value() [2/2]

void set_value ( int  i)
inline

set the value associated to this Attribute.

Definition at line 157 of file include/HepMC/Attribute.h.

References IntAttribute::m_val.

◆ to_string() [1/2]

bool to_string ( string &  att) const
inlinevirtual

Implementation of Attribute::to_string.

Implements Attribute.

Definition at line 140 of file build/outputs/include/HepMC/Attribute.h.

References IntAttribute::m_val.

◆ to_string() [2/2]

bool to_string ( string &  att) const
inlinevirtual

Implementation of Attribute::to_string.

Implements Attribute.

Definition at line 140 of file include/HepMC/Attribute.h.

References IntAttribute::m_val.

◆ unparsed_string() [1/2]

const string& unparsed_string ( ) const
inlineinherited

Get unparsed string.

Definition at line 97 of file build/outputs/include/HepMC/Attribute.h.

References Attribute::m_string.

◆ unparsed_string() [2/2]

const string& unparsed_string ( ) const
inlineinherited

Get unparsed string.

Definition at line 97 of file include/HepMC/Attribute.h.

References Attribute::m_string.

◆ value() [1/2]

int value ( ) const
inline

get the value associated to this Attribute.

Definition at line 152 of file include/HepMC/Attribute.h.

References IntAttribute::m_val.

◆ value() [2/2]

int value ( ) const
inline

get the value associated to this Attribute.

Definition at line 152 of file build/outputs/include/HepMC/Attribute.h.

References IntAttribute::m_val.

Field Documentation

◆ m_val

int m_val
private

Attribute value.

Definition at line 162 of file build/outputs/include/HepMC/Attribute.h.


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