Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI::TargetInfo::IsotopicAbundances Class Reference

#include <GIDI.hpp>

Inheritance diagram for GIDI::TargetInfo::IsotopicAbundances:

Public Member Functions

 IsotopicAbundances ()
 ~IsotopicAbundances ()
void initialize (HAPI::Node const &a_node)
GUPI::SuitechemicalElements ()
GUPI::Suite const & chemicalElements () const
ChemicalElement const * operator[] (std::string const &a_symbol) const
GUPI::AncestryfindInAncestry3 (LUPI_maybeUnused std::string const &a_item)
GUPI::Ancestry const * findInAncestry3 (LUPI_maybeUnused std::string const &a_item) const
void toXMLList (GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
Public Member Functions inherited from GUPI::Ancestry
 Ancestry (std::string const &a_moniker, std::string const &a_attribute="")
virtual ~Ancestry ()
Ancestryoperator= (Ancestry const &a_ancestry)
std::string const & moniker () const
void setMoniker (std::string const &a_moniker)
Ancestryancestor ()
Ancestry const * ancestor () const
void setAncestor (Ancestry *a_ancestor)
std::string attribute () const
Ancestryroot ()
Ancestry const * root () const
bool isChild (Ancestry *a_instance)
bool isParent (Ancestry *a_parent)
bool isRoot () const
AncestryfindInAncestry (std::string const &a_href)
Ancestry const * findInAncestry (std::string const &a_href) const
virtual AncestryfindInAncestry3 (std::string const &a_item)=0
virtual Ancestry const * findInAncestry3 (std::string const &a_item) const =0
virtual LUPI_HOST void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
virtual std::string xlinkItemKey () const
std::string toXLink () const
void printXML () const

Additional Inherited Members

Static Public Member Functions inherited from GUPI::Ancestry
static std::string buildXLinkItemKey (std::string const &a_name, std::string const &a_key)

Detailed Description

The class that stores an isotopicAbundances node.

Definition at line 2977 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ IsotopicAbundances()

GIDI::TargetInfo::IsotopicAbundances::IsotopicAbundances ( )

Definition at line 121 of file GIDI_targetInfo.cc.

121 :
122 GUPI::Ancestry( GIDI_isotopicAbundancesChars ),
123 m_chemicalElements( PoPI_chemicalElementsChars, PoPI_symbolChars ) {
124
125}
#define GIDI_isotopicAbundancesChars
Definition GIDI.hpp:471
#define PoPI_symbolChars
Definition PoPI.hpp:40
#define PoPI_chemicalElementsChars
Definition PoPI.hpp:41

◆ ~IsotopicAbundances()

GIDI::TargetInfo::IsotopicAbundances::~IsotopicAbundances ( )

Definition at line 130 of file GIDI_targetInfo.cc.

130 {
131
132}

Member Function Documentation

◆ chemicalElements() [1/2]

GUPI::Suite & GIDI::TargetInfo::IsotopicAbundances::chemicalElements ( )
inline

Returns a reference to the m_chemicalElements member.

Definition at line 2987 of file GIDI.hpp.

◆ chemicalElements() [2/2]

GUPI::Suite const & GIDI::TargetInfo::IsotopicAbundances::chemicalElements ( ) const
inline

Returns a const reference to the m_chemicalElements member.

Definition at line 2988 of file GIDI.hpp.

◆ findInAncestry3() [1/2]

GUPI::Ancestry * GIDI::TargetInfo::IsotopicAbundances::findInAncestry3 ( LUPI_maybeUnused std::string const & a_item)
inline

Definition at line 2991 of file GIDI.hpp.

2991{ return( nullptr ); }

◆ findInAncestry3() [2/2]

GUPI::Ancestry const * GIDI::TargetInfo::IsotopicAbundances::findInAncestry3 ( LUPI_maybeUnused std::string const & a_item) const
inline

Definition at line 2992 of file GIDI.hpp.

2992{ return( nullptr ); }

◆ initialize()

void GIDI::TargetInfo::IsotopicAbundances::initialize ( HAPI::Node const & a_node)

Definition at line 134 of file GIDI_targetInfo.cc.

134 {
135
136 m_chemicalElements.parse( a_node.child( PoPI_chemicalElementsChars ), parseChemicalElement );
137}

◆ operator[]()

ChemicalElement const * GIDI::TargetInfo::IsotopicAbundances::operator[] ( std::string const & a_symbol) const

Returns the ChemicalElement with symbol a_symbol if it exists; otherwise, nullptr is returned.

Parameters
a_symbol[in] The symbol for the chemical element whose isotopic abundance data are being requested.

Definition at line 145 of file GIDI_targetInfo.cc.

145 {
146
147 for( auto iter = m_chemicalElements.begin( ); iter != m_chemicalElements.end( ); ++iter ) {
148 ChemicalElement const *chemicalElement = static_cast<ChemicalElement const *>( *iter );
149 if( chemicalElement->symbol( ) == a_symbol ) return( chemicalElement );
150 }
151
152 return( nullptr );
153}

◆ toXMLList()

void GIDI::TargetInfo::IsotopicAbundances::toXMLList ( GUPI::WriteInfo & a_writeInfo,
std::string const & a_indent = "" ) const
virtual

Fills the argument a_writeInfo with the XML lines that represent this. Recursively enters each sub-node.

Parameters
a_writeInfo[in/out] Instance containing incremental indentation and other information and stores the appended lines.
a_indent[in] The amount to indent this node.

Reimplemented from GUPI::Ancestry.

Definition at line 162 of file GIDI_targetInfo.cc.

162 {
163
164 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
165
166 a_writeInfo.addNodeStarter( a_indent, moniker( ) );
167 m_chemicalElements.toXMLList( a_writeInfo, indent2 );
168 a_writeInfo.addNodeEnder( moniker( ) );
169}
std::string const & moniker() const
Definition GUPI.hpp:102
void addNodeEnder(std::string const &a_moniker)
Definition GUPI.hpp:59
std::string incrementalIndent(std::string const &indent)
Definition GUPI.hpp:52
void addNodeStarter(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:55

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