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

#include <GIDI.hpp>

Inheritance diagram for GIDI::Transportable:

Public Member Functions

 Transportable (Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, Suite *a_parent)
 Transportable (Transportable const &a_transportable)
std::string pid () const
std::string const & conserve () const
Group const & group () const
std::vector< double > groupBoundaries () const
void toXMLList (GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Public Member Functions inherited from GIDI::Form
 Form (FormType a_type)
 Form (std::string const &a_moniker, FormType a_type, std::string const &a_label)
 Form (HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_suite=nullptr)
 Form (Form const &a_form)
virtual ~Form ()
Formoperator= (Form const &a_rhs)
Suiteparent () const
std::string const & label () const
void setLabel (std::string const &a_label)
virtual std::string actualMoniker () const
std::string const & keyName () const
void setKeyName (std::string const &a_keyName)
std::string const & keyValue () const
virtual void setKeyValue (std::string const &a_keyName) const
FormType type () const
Form const * sibling (std::string a_label) const
GUPI::AncestryfindInAncestry3 (LUPI_maybeUnused std::string const &a_item)
GUPI::Ancestry const * findInAncestry3 (LUPI_maybeUnused std::string const &a_item) const
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
virtual LUPI_HOST void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
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

Class for the GNDS <transportable> node that resides under the <transportables> node.

Definition at line 2902 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ Transportable() [1/2]

GIDI::Transportable::Transportable ( Construction::Settings const & a_construction,
HAPI::Node const & a_node,
SetupInfo & a_setupInfo,
PoPI::Database const & a_pops,
Suite * a_parent )
Parameters
a_construction[in] Used to pass user options to the constructor.
a_node[in] The HAPI::Node to be parsed to construct a Transportable instance.
a_setupInfo[in] Information create my the Protare constructor to help in parsing.
a_pops[in] A PoPI::Database instance used to get particle indices and possibly other particle information.
a_parent[in] The parent GIDI::Suite.

Definition at line 29 of file GIDI_transportable.cc.

30 :
31 Form( a_node, a_setupInfo, FormType::transportable, a_parent ),
32 m_conserve( a_node.attribute_as_string( GIDI_conserveChars ) ),
33 m_group( a_construction, a_node.child( GIDI_groupChars ), a_setupInfo, a_pops ) {
34}
#define GIDI_groupChars
Definition GIDI.hpp:237
#define GIDI_conserveChars
Form(FormType a_type)
Definition GIDI_form.cc:25

Referenced by Transportable().

◆ Transportable() [2/2]

GIDI::Transportable::Transportable ( Transportable const & a_transportable)

Copy constructor.

Parameters
a_transportable[in] Transportable instance to copy.

Definition at line 42 of file GIDI_transportable.cc.

42 :
43 Form( a_transportable ),
44 m_conserve( a_transportable.conserve( ) ),
45 m_group( a_transportable.group( ) ) {
46
47}

Member Function Documentation

◆ conserve()

std::string const & GIDI::Transportable::conserve ( ) const
inline

Returns a const reference to member m_conserve.

Definition at line 2913 of file GIDI.hpp.

Referenced by GIDI::Transporting::Particle::process(), and Transportable().

◆ group()

Group const & GIDI::Transportable::group ( ) const
inline

Returns the value of the m_group member.

Definition at line 2914 of file GIDI.hpp.

Referenced by GIDI::Transporting::Particle::process(), and Transportable().

◆ groupBoundaries()

std::vector< double > GIDI::Transportable::groupBoundaries ( ) const
inline

Returns the multi-group boundaries for this transportable particle.

Definition at line 2915 of file GIDI.hpp.

Referenced by GIDI::Styles::HeatedMultiGroup::groupBoundaries(), GIDI::Styles::MultiGroup::groupBoundaries(), and GIDI::Transporting::Particle::process().

◆ pid()

std::string GIDI::Transportable::pid ( ) const
inline

Returns the value of the particle id for the Transportable.

Definition at line 2912 of file GIDI.hpp.

Referenced by GIDI::Styles::MultiGroup::groupBoundaries().

◆ toXMLList()

void GIDI::Transportable::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 56 of file GIDI_transportable.cc.

56 {
57
58 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
59 std::string attributes = a_writeInfo.addAttribute( GIDI_labelChars, label( ) );
60
61 attributes += a_writeInfo.addAttribute( GIDI_conserveChars, m_conserve );
62 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
63 m_group.toXMLList( a_writeInfo, indent2 );
64 a_writeInfo.addNodeEnder( moniker( ) );
65}
#define GIDI_labelChars
Definition GIDI.hpp:438
std::string const & label() const
Definition GIDI.hpp:658
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: