Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PoPI::Decay Class Reference

#include <PoPI.hpp>

Public Member Functions

 Decay (HAPI::Node const &a_node, DecayMode const *a_decayMode)
 ~Decay ()
int index (void) const
std::string const & mode () const
bool complete () const
Suite< Product, Decay > const & products (void) const
void toXMLList (std::vector< std::string > &a_XMLList, std::string const &a_indent1) const

Detailed Description

Definition at line 748 of file PoPI.hpp.

Constructor & Destructor Documentation

◆ Decay()

PoPI::Decay::Decay ( HAPI::Node const & a_node,
DecayMode const * a_decayMode )

Definition at line 151 of file PoPI_decayData.cc.

151 :
152 m_index( a_node.attribute( PoPI_indexChars ).as_int( ) ),
153 m_mode( a_node.attribute( PoPI_modeChars ).value( ) ),
154 m_complete( a_node.attribute( PoPI_completeChars ).value( ) == "true" ),
155 m_products( PoPI_productsChars ) {
156
157 if( a_node.attribute( PoPI_typeChars ).value( ) != "" ) m_mode = a_node.attribute( PoPI_typeChars ).value( );
158
159 m_products.appendFromParentNode2( a_node.child( PoPI_productsChars ), this );
160}
#define PoPI_indexChars
Definition PoPI.hpp:91
#define PoPI_modeChars
#define PoPI_completeChars
#define PoPI_productsChars
#define PoPI_typeChars

◆ ~Decay()

PoPI::Decay::~Decay ( )

Definition at line 165 of file PoPI_decayData.cc.

165 {
166
167}

Member Function Documentation

◆ complete()

bool PoPI::Decay::complete ( ) const
inline

Definition at line 762 of file PoPI.hpp.

762{ return( m_complete ); }

◆ index()

int PoPI::Decay::index ( void ) const
inline

Definition at line 760 of file PoPI.hpp.

760{ return( m_index ); }

◆ mode()

std::string const & PoPI::Decay::mode ( ) const
inline

Definition at line 761 of file PoPI.hpp.

761{ return( m_mode ); }

◆ products()

Suite< Product, Decay > const & PoPI::Decay::products ( void ) const
inline

Definition at line 763 of file PoPI.hpp.

763{ return( m_products ); }

◆ toXMLList()

void PoPI::Decay::toXMLList ( std::vector< std::string > & a_XMLList,
std::string const & a_indent1 ) const

Adds the contents of this to a_XMLList where each item in a_XMLList is one line (without linefeeds) to output as an XML representation of this.

Parameters
a_XMLList[in] The list to add an XML output representation of this to.
a_indent1[in] The amount of indentation to added to each line added to a_XMLList.

Definition at line 176 of file PoPI_decayData.cc.

176 {
177
178 std::string indexString( std::to_string( m_index ) );
179
180 std::string header = a_indent1 + "<decay index=\"" + indexString + "\"";
181 if( m_mode != "" ) header += " mode=\"" + m_mode + "\"";
182 if( m_complete ) header += " mode=\"true\"";
183 header += ">";
184 a_XMLList.push_back( std::move( header ) );
185
186 std::string indent2 = a_indent1 + " ";
187 m_products.toXMLList( a_XMLList, indent2 );
188
189 appendXMLEnd( a_XMLList, PoPI_decayChars );
190}
#define PoPI_decayChars
void appendXMLEnd(std::vector< std::string > &a_XMLList, std::string const &a_label)
Definition PoPI_misc.cc:53
std::string to_string(G4FermiAtomicMass mass)

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