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

#include <GIDI.hpp>

Inheritance diagram for GIDI::TargetInfo::ChemicalElement:

Public Member Functions

 ChemicalElement (HAPI::Node const &a_node)
 ~ChemicalElement ()
GUPI::Suitenuclides ()
GUPI::Suite const & nuclides () const
std::string const & symbol () const
Nuclide const * operator[] (std::string const &a_pid) 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::Entry
 Entry (std::string const &a_moniker, std::string const &a_keyName, std::string const &a_keyValue)
 Entry (HAPI::Node const &a_node, std::string const &a_keyName)
 ~Entry ()
std::string const & keyName () const
std::string const & keyValue () const
AncestryfindInAncestry3 (LUPI_maybeUnused std::string const &a_item)
Ancestry const * findInAncestry3 (LUPI_maybeUnused std::string const &a_item) const
LUPI_HOST void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
std::string xlinkItemKey () 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
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 a chemicalElement node.

Definition at line 2951 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ ChemicalElement()

GIDI::TargetInfo::ChemicalElement::ChemicalElement ( HAPI::Node const & a_node)

Definition at line 67 of file GIDI_targetInfo.cc.

67 :
68 GUPI::Entry( a_node, PoPI_symbolChars ),
69 m_nuclides( a_node.child( PoPI_nuclidesChars ), GIDI_pidChars, parseNuclide ) {
70
71}
#define GIDI_pidChars
Definition GIDI.hpp:454
#define PoPI_symbolChars
Definition PoPI.hpp:40
#define PoPI_nuclidesChars
Definition PoPI.hpp:48

◆ ~ChemicalElement()

GIDI::TargetInfo::ChemicalElement::~ChemicalElement ( )

Definition at line 76 of file GIDI_targetInfo.cc.

76 {
77
78}

Member Function Documentation

◆ findInAncestry3() [1/2]

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

Definition at line 2965 of file GIDI.hpp.

2965{ return( nullptr ); }

◆ findInAncestry3() [2/2]

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

Definition at line 2966 of file GIDI.hpp.

2966{ return( nullptr ); }

◆ nuclides() [1/2]

GUPI::Suite & GIDI::TargetInfo::ChemicalElement::nuclides ( )
inline

Definition at line 2960 of file GIDI.hpp.

2960{ return( m_nuclides ); }

◆ nuclides() [2/2]

GUPI::Suite const & GIDI::TargetInfo::ChemicalElement::nuclides ( ) const
inline

Definition at line 2961 of file GIDI.hpp.

2961{ return( m_nuclides ); }

◆ operator[]()

Nuclide const * GIDI::TargetInfo::ChemicalElement::operator[] ( std::string const & a_pid) const

Returns the Nuclide with pid a_pid if it exists; otherwise, nullptr is returned.

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

Definition at line 86 of file GIDI_targetInfo.cc.

86 {
87
88 for( auto nuclideIter = m_nuclides.begin( ); nuclideIter != m_nuclides.end( ); ++nuclideIter ) {
89 Nuclide const *nuclide = static_cast<Nuclide *>( *nuclideIter );
90 if( nuclide->pid( ) == a_pid ) return( nuclide );
91 }
92
93 return( nullptr );
94}

◆ symbol()

std::string const & GIDI::TargetInfo::ChemicalElement::symbol ( ) const
inline

Returns a const reference to the results of the call to the keyValue() method.

Definition at line 2963 of file GIDI.hpp.

Referenced by toXMLList().

◆ toXMLList()

void GIDI::TargetInfo::ChemicalElement::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 103 of file GIDI_targetInfo.cc.

103 {
104
105 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
106 std::string attributes;
107
108 attributes = a_writeInfo.addAttribute( PoPI_symbolChars, symbol( ) );
109 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
110 m_nuclides.toXMLList( a_writeInfo, indent2 );
111 a_writeInfo.addNodeEnder( moniker( ) );
112}
std::string const & symbol() const
Definition GIDI.hpp:2963
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
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60

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