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

#include <GIDI.hpp>

Inheritance diagram for GIDI::Groups:

Public Member Functions

 Groups ()
 Groups (std::string const &a_fileName)
void addFile (std::string const &a_fileName)
Public Member Functions inherited from GIDI::Suite
 Suite (std::string const &a_keyName=GIDI_labelChars)
 Suite (std::string const &a_moniker, std::string const &a_keyName)
 Suite (Construction::Settings const &a_construction, std::string const &a_moniker, std::string const &a_keyName, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, parseSuite a_parseSuite, Styles::Suite const *a_styles, bool a_allowsLazyParsing=false)
 ~Suite ()
std::string const & keyName () const
std::size_t size () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
std::size_t operator[] (std::string const &a_label) const
template<typename T>
T * get (std::size_t a_Index)
template<typename T>
T const * get (std::size_t a_Index) const
template<typename T>
T * get (std::string const &a_label)
template<typename T>
T const * get (std::string const &a_label) const
template<typename T>
T * getViaLineage (std::string const &a_label)
template<typename T>
T * getViaLineage (std::string const &a_label) const
template<typename T>
T * pop (std::size_t a_Index)
template<typename T>
T * pop (std::string const &a_label)
Styles::Suite const * styles ()
std::string const & href () const
void parse (Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, parseSuite a_parseSuite, Styles::Suite const *a_styles)
void add (Form *a_form)
iterator find (std::string const &a_label, bool a_convertLazyParsingHelperForm=false)
const_iterator find (std::string const &a_label, bool a_convertLazyParsingHelperForm=false) const
bool has (std::string const &a_label) const
FormcheckLazyParsingHelperForm (std::size_t a_index)
FormcheckLazyParsingHelperForm (std::size_t a_index) const
iterator checkLazyParsingHelperFormIterator (iterator a_iter)
const_iterator checkLazyParsingHelperFormIterator (const_iterator a_iter) const
void modifiedMultiGroupElasticForTNSL (std::map< std::string, std::size_t > const &a_maximumTNSL_MultiGroupIndex)
GUPI::AncestryfindInAncestry3 (std::string const &a_item)
GUPI::Ancestry const * findInAncestry3 (std::string const &a_item) const
std::vector< iteratorfindAllOfMoniker (std::string const &a_moniker)
std::vector< const_iteratorfindAllOfMoniker (std::string const &a_moniker) const
Form const * findInstanceOfTypeInLineage (std::string const &_label, std::string const &a_moniker) const
FormfindInstanceOfTypeInLineage (Styles::Suite const &a_styles, std::string const &_label, std::string const &a_moniker)
void toXMLList (GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
void printFormLabels (std::string const &a_header) const
template<typename T>
T const * get (std::size_t a_index) const
template<typename T>
T const * get (std::string const &a_label) const
template<typename T>
T const * get (std::size_t a_index) const
template<typename T>
T const * get (std::string const &a_label) 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 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

Public Types inherited from GIDI::Suite
typedef std::vector< Form * > Forms
typedef Forms::iterator iterator
typedef Forms::const_iterator const_iterator
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 <groups> node that contains a list of <group> nodes.

Definition at line 5463 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ Groups() [1/2]

GIDI::Groups::Groups ( )

Definition at line 67 of file GIDI_group.cc.

67 :
69
70}
#define GIDI_groupsChars
Definition GIDI.hpp:236
Suite(std::string const &a_keyName=GIDI_labelChars)
Definition GIDI_suite.cc:22

◆ Groups() [2/2]

GIDI::Groups::Groups ( std::string const & a_fileName)
Parameters
a_fileName[in] File containing a groups node to be parsed.

Definition at line 76 of file GIDI_group.cc.

76 :
78
79 addFile( a_fileName );
80}
void addFile(std::string const &a_fileName)
Definition GIDI_group.cc:88

Member Function Documentation

◆ addFile()

void GIDI::Groups::addFile ( std::string const & a_fileName)

Adds the contents of the specified file to this.

Parameters
a_fileName[in] File containing a groups node to be parsed.

Definition at line 88 of file GIDI_group.cc.

88 {
89
90 HAPI::File *doc = new HAPI::PugiXMLFile( a_fileName.c_str( ), "Groups::addFile" );
91
92 HAPI::Node groups = doc->first_child( );
93
94 std::string name( groups.name( ) );
95 if( name != GIDI_groupsChars ) throw Exception( "Invalid groups node file: file node name is '" + name + "'." );
96
97 Construction::Settings construction( Construction::ParseMode::all, GIDI::Construction::PhotoMode::atomicOnly );
98 PoPI::Database pops;
99
100 SetupInfo setupInfo( nullptr );
101
102 std::string formatVersionString = groups.attribute_as_string( GIDI_formatChars );
103 if( formatVersionString == "" ) formatVersionString = GNDS_formatVersion_1_10Chars;
104 LUPI::FormatVersion formatVersion;
105 formatVersion.setFormat( formatVersionString );
106 if( !formatVersion.supported( ) ) throw Exception( "Unsupport GND format version" + formatVersionString );
107 setupInfo.m_formatVersion = formatVersion;
108
109 for( HAPI::Node child = groups.first_child( ); !child.empty( ); child.to_next_sibling( ) ) {
110 Group *group = new Group( construction, child, setupInfo, pops );
111
112 add( group );
113 }
114 delete doc;
115}
#define GIDI_formatChars
Definition GIDI.hpp:167
#define GNDS_formatVersion_1_10Chars
Definition LUPI.hpp:48
void add(Form *a_form)
virtual Node first_child()=0
bool setFormat(std::string const &a_formatVersion)
const char * name(G4int ptype)

Referenced by Groups().


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