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

#include <GIDI.hpp>

Inheritance diagram for GIDI::Styles::MultiGroup:

Public Member Functions

 MultiGroup (Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, GIDI::Suite *a_parent)
 ~MultiGroup ()
int maximumLegendreOrder () const
PhysicalQuantity const & temperature () const
std::vector< double > groupBoundaries (std::string const &a_productID) const
GIDI::Suite const & transportables () const
void toXMLList (GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Public Member Functions inherited from GIDI::Styles::Base
 Base (HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
 ~Base ()
std::string const & date () const
std::string const & label () const
std::string const & derivedStyle () const
bool hasDocumentation ()
GUPI::Documentationdocumentation ()
Base const * getDerivedStyle () const
Base const * getDerivedStyle (std::string const &a_moniker) const
std::vector< Base const * > chain () const
bool isStyleInDerivedForm (Base const *a_style) const
std::string baseXMLAttributes (GUPI::WriteInfo &a_writeInfo) 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

This is the multiGroup style class.

Definition at line 3270 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ MultiGroup()

GIDI::Styles::MultiGroup::MultiGroup ( Construction::Settings const & a_construction,
HAPI::Node const & a_node,
SetupInfo & a_setupInfo,
PoPI::Database const & a_pops,
PoPI::Database const & a_internalPoPs,
GIDI::Suite * a_parent )
Parameters
a_construction[in] Used to pass user options to the constructor.
a_node[in] The HAPI::Node to be parsed.
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_internalPoPs[in] The internal PoPI::Database instance used to get particle indices and possibly other particle information. This is the <PoPs> node under the <reactionSuite> node.
a_parent[in] The parent GIDI::Suite.

Definition at line 660 of file GIDI_styles.cc.

661 :
662 Base( a_node, a_setupInfo, a_parent ),
663 m_maximumLegendreOrder( a_node.attribute_as_int( GIDI_lMaxChars ) ),
664 m_transportables( a_construction, GIDI_transportablesChars, GIDI_labelChars, a_node, a_setupInfo, a_pops, a_internalPoPs, parseTransportablesSuite, nullptr ) {
665
666 m_transportables.setAncestor( this );
667}
#define GIDI_lMaxChars
Definition GIDI.hpp:426
#define GIDI_transportablesChars
Definition GIDI.hpp:247
#define GIDI_labelChars
Definition GIDI.hpp:438
Base(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
Form * parseTransportablesSuite(Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles)

◆ ~MultiGroup()

GIDI::Styles::MultiGroup::~MultiGroup ( )

Definition at line 672 of file GIDI_styles.cc.

672 {
673
674}

Member Function Documentation

◆ groupBoundaries()

std::vector< double > GIDI::Styles::MultiGroup::groupBoundaries ( std::string const & a_productID) const

Returns the multi-group boundaries for the product with index a_productID.

Parameters
a_productID[in] Particle id for the requested product.
Returns
The multi-group boundaries.

Definition at line 697 of file GIDI_styles.cc.

697 {
698
699 for( std::size_t index = 0; index < m_transportables.size( ); ++index ) {
700 Transportable const &transportable1 = *m_transportables.get<Transportable>( index );
701
702 if( transportable1.pid( ) == a_productID ) {
703 return( transportable1.groupBoundaries( ) );
704 }
705 }
706 throw Exception( "MultiGroup::groupBoundaries: product index not found" );
707}

◆ maximumLegendreOrder()

int GIDI::Styles::MultiGroup::maximumLegendreOrder ( ) const
inline

Returns the value of the m_maximumLegendreOrder member.

Definition at line 3280 of file GIDI.hpp.

◆ temperature()

PhysicalQuantity const & GIDI::Styles::MultiGroup::temperature ( ) const
virtual

Ascends the derivedFrom styles until a temperature is found.

Returns
Returns the temperature associated with this style.

Implements GIDI::Styles::Base.

Definition at line 682 of file GIDI_styles.cc.

682 {
683
684 Base const *style = getDerivedStyle( );
685
686 if( style == nullptr ) throw Exception( "No style with temperature." );
687 return( style->temperature( ) );
688}
Base const * getDerivedStyle() const

◆ toXMLList()

void GIDI::Styles::MultiGroup::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 716 of file GIDI_styles.cc.

716 {
717
718 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
719 std::string attributes = baseXMLAttributes( a_writeInfo );
720
721 attributes += a_writeInfo.addAttribute( GIDI_lMaxChars, intToString( m_maximumLegendreOrder ) );
722 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
723 m_transportables.toXMLList( a_writeInfo, indent2 );
724 a_writeInfo.addNodeEnder( moniker( ) );
725}
std::string baseXMLAttributes(GUPI::WriteInfo &a_writeInfo) const
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
std::string intToString(int a_value)
Definition GIDI_misc.cc:415

◆ transportables()

GIDI::Suite const & GIDI::Styles::MultiGroup::transportables ( ) const
inline

Returns the value of the m_transportables member.

Definition at line 3284 of file GIDI.hpp.


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