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

#include <GIDI.hpp>

Inheritance diagram for GIDI::Map::Import:

Public Member Functions

 Import (HAPI::Node const &a_node, PoPI::Database const &a_pops, std::string const &a_basePath, Map const *a_parent)
 ~Import ()
EntryType entryType () const
Map const * map () const
ProtareBase const * findProtareEntry (std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_library="", std::string const &a_evaluation="") const
void findProtareEntries (FindProtareEntries &a_protareEntries, std::regex const &a_projectileID, std::regex const &a_targetID, std::regex const &a_library=std::regex(".*"), std::regex const &a_evaluation=std::regex(".*")) const
std::string protareFilename (std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_library="", std::string const &a_evaluation="", PathForm a_form=PathForm::real) const
bool isProtareAvailable (std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_library="", std::string const &a_evaluation="") const
std::vector< std::string > availableEvaluations (std::string const &a_projectileID, std::string const &a_targetID) 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 GIDI::Map::BaseEntry
 BaseEntry (HAPI::Node const &a_node, std::string const &a_basePath, Map const *a_parent)
virtual ~BaseEntry ()=0
std::string const & name () const
Map const * parent () const
std::string path (PathForm a_form=PathForm::real) const
void libraries (std::vector< std::string > &a_libraries) 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

Public Types inherited from GIDI::Map::BaseEntry
enum class  PathForm { entered , cumulative , real }
Static Public Member Functions inherited from GUPI::Ancestry
static std::string buildXLinkItemKey (std::string const &a_name, std::string const &a_key)

Detailed Description

Definition at line 5210 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ Import()

GIDI::Map::Import::Import ( HAPI::Node const & a_node,
PoPI::Database const & a_pops,
std::string const & a_basePath,
Map const * a_parent )
Parameters
a_node[in] The HAPI::Node to be parsed to contruct a Import instance.
a_pops[in] A PoPI::Database instance used to get particle indices and possibly other particle information.
a_basePath[in] A path prepended to this entry's path.
a_parent[in] Pointer to the Map containing this.

Definition at line 160 of file GIDI_map.cc.

160 :
161 BaseEntry( a_node, a_basePath, a_parent ),
162 m_map( nullptr ) {
163
164 m_map = new Map( path( BaseEntry::PathForm::cumulative ), a_pops, a_parent );
165}
BaseEntry(HAPI::Node const &a_node, std::string const &a_basePath, Map const *a_parent)
Definition GIDI_map.cc:110
std::string path(PathForm a_form=PathForm::real) const
Definition GIDI_map.cc:133

◆ ~Import()

GIDI::Map::Import::~Import ( )

Definition at line 170 of file GIDI_map.cc.

170 {
171
172 delete m_map;
173}

Member Function Documentation

◆ availableEvaluations()

std::vector< std::string > GIDI::Map::Import::availableEvaluations ( std::string const & a_projectileID,
std::string const & a_targetID ) const

Returns a list of all evaluations with a match to a_projectileID and a_targetID.

Parameters
a_projectileID[in] The projectile's id to match.
a_targetID[in] The target's id to match.
Returns
List of evaluations.

Definition at line 238 of file GIDI_map.cc.

238 {
239
240 return( m_map->availableEvaluations( a_projectileID, a_targetID ) );
241}

Referenced by GIDI::Map::Map::availableEvaluations().

◆ entryType()

EntryType GIDI::Map::Import::entryType ( ) const
inlinevirtual

Returns EntryType::import.

Implements GIDI::Map::BaseEntry.

Definition at line 5219 of file GIDI.hpp.

◆ findInAncestry3() [1/2]

GUPI::Ancestry * GIDI::Map::Import::findInAncestry3 ( LUPI_maybeUnused std::string const & a_item)
inline

Always returns nullptr.

Definition at line 5235 of file GIDI.hpp.

◆ findInAncestry3() [2/2]

GUPI::Ancestry const * GIDI::Map::Import::findInAncestry3 ( LUPI_maybeUnused std::string const & a_item) const
inline

Always returns nullptr.

Definition at line 5236 of file GIDI.hpp.

◆ findProtareEntries()

void GIDI::Map::Import::findProtareEntries ( FindProtareEntries & a_protareEntries,
std::regex const & a_projectileID,
std::regex const & a_targetID,
std::regex const & a_library = std::regex( ".*" ),
std::regex const & a_evaluation = std::regex( ".*" ) ) const
virtual

Returns the list of all Protare entries that match a_projectileID, a_targetID, a_library and a_evaluation. The arguments a_projectileID, a_targetID, a_library and a_evaluation can be an C++ regex string. An empty string for any of the arguments will match all.

Parameters
a_protareEntries[out] The list of ProtareBase found.
a_projectileID[in] The projectile's id to match.
a_targetID[in] The target's id to match.
a_library[in] The library to match.
a_evaluation[in] The evaluation to match.

Implements GIDI::Map::BaseEntry.

Definition at line 205 of file GIDI_map.cc.

206 {
207
208 return( m_map->findProtareEntries( a_protareEntries, a_projectileID, a_targetID, a_library, a_evaluation ) );
209}

◆ findProtareEntry()

ProtareBase const * GIDI::Map::Import::findProtareEntry ( std::string const & a_projectileID,
std::string const & a_targetID,
std::string const & a_library = "",
std::string const & a_evaluation = "" ) const
virtual

Returns the Protare entry to the first protare to match a_projectileID, a_targetID, a_library and a_evaluation. If a_evaluation is an empty string, only a_projectileID and a_targetID are matched.

Parameters
a_projectileID[in] The projectile's id to match.
a_targetID[in] The target's id to match.
a_library[in] The library to match.
a_evaluation[in] The evaluation to match.
Returns
The const pointer ProtareBase for the matched protare.

Implements GIDI::Map::BaseEntry.

Definition at line 187 of file GIDI_map.cc.

188 {
189
190 return( m_map->findProtareEntry( a_projectileID, a_targetID, a_library, a_evaluation ) );
191}

◆ isProtareAvailable()

bool GIDI::Map::Import::isProtareAvailable ( std::string const & a_projectileID,
std::string const & a_targetID,
std::string const & a_library = "",
std::string const & a_evaluation = "" ) const
inline

Returns the value of the m_map member.

Definition at line 5229 of file GIDI.hpp.

◆ map()

Map const * GIDI::Map::Import::map ( ) const
inline

Returns the value of the m_map member.

Definition at line 5221 of file GIDI.hpp.

Referenced by GIDI::Map::Map::walk().

◆ protareFilename()

std::string GIDI::Map::Import::protareFilename ( std::string const & a_projectileID,
std::string const & a_targetID,
std::string const & a_library = "",
std::string const & a_evaluation = "",
PathForm a_form = PathForm::real ) const

Returns the path to the first protare to match a_projectileID, a_targetID, a_library and a_evaluation. If a_evaluation is an empty string, only a_projectileID and a_targetID are matched.

Parameters
a_projectileID[in] The projectile's id to match.
a_targetID[in] The target's id to match.
a_library[in] The library to match.
a_evaluation[in] The evaluation to match.
a_form[in] Determines the form of the path returned.
Returns
The path to the matched protare.

Definition at line 224 of file GIDI_map.cc.

225 {
226
227 return( m_map->protareFilename( a_projectileID, a_targetID, a_library, a_evaluation, a_form ) );
228}

Referenced by isProtareAvailable().

◆ toXMLList()

void GIDI::Map::Import::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.

Implements GIDI::Map::BaseEntry.

Definition at line 250 of file GIDI_map.cc.

250 {
251
252 std::string attributes;
253
254 attributes = a_writeInfo.addAttribute( GIDI_pathChars, path( ) );
255 a_writeInfo.addNodeStarterEnder( a_indent, moniker( ), attributes );
256}
#define GIDI_pathChars
Definition GIDI.hpp:450
std::string const & moniker() const
Definition GUPI.hpp:102
void addNodeStarterEnder(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:57
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: