Geant4-11
Public Member Functions | Private Attributes
GIDI_settings Class Reference

#include <GIDI_settings.hh>

Public Member Functions

int addParticle (GIDI_settings_particle const &particle)
 
int eraseParticle (int PoPId)
 
GIDI_settings_particle const * getParticle (int PoPId) const
 
 GIDI_settings ()
 
void releaseMemory ()
 
 ~GIDI_settings ()
 

Private Attributes

std::map< int, GIDI_settings_particlemParticles
 

Detailed Description

Definition at line 224 of file GIDI_settings.hh.

Constructor & Destructor Documentation

◆ GIDI_settings()

GIDI_settings::GIDI_settings ( )

This is the top settings class used when a GND file is read.

Definition at line 17 of file GIDI_settings.cc.

17 {
18
19}

◆ ~GIDI_settings()

GIDI_settings::~GIDI_settings ( )

Definition at line 23 of file GIDI_settings.cc.

23 {
24
25}

Member Function Documentation

◆ addParticle()

int GIDI_settings::addParticle ( GIDI_settings_particle const &  particle)

Definition at line 29 of file GIDI_settings.cc.

29 {
30
31 int PoPId = particle.getPoPId( );
32
33 if( mParticles.find( PoPId ) != mParticles.end( ) ) return( 1 );
34 mParticles.insert( std::pair<int, GIDI_settings_particle>( PoPId, GIDI_settings_particle( particle ) ) );
35 return( 0 );
36}
std::map< int, GIDI_settings_particle > mParticles

References GIDI_settings_particle::getPoPId(), and mParticles.

◆ eraseParticle()

int GIDI_settings::eraseParticle ( int  PoPId)

Definition at line 50 of file GIDI_settings.cc.

50 {
51
52 std::map<int, GIDI_settings_particle>::iterator particle = mParticles.find( PoPId );
53
54 if( particle == mParticles.end( ) ) return( 1 );
55 mParticles.erase( PoPId );
56 return( 0 );
57}

References mParticles.

◆ getParticle()

GIDI_settings_particle const * GIDI_settings::getParticle ( int  PoPId) const

Definition at line 40 of file GIDI_settings.cc.

40 {
41
42 std::map<int, GIDI_settings_particle>::const_iterator particle = mParticles.find( PoPId );
43
44 if( particle == mParticles.end( ) ) return( NULL );
45 return( &(particle->second) );
46}

References mParticles.

Referenced by MCGIDI_target_heated_recast(), and MCGIDI_quantitiesLookupModes::setGroupIndex().

◆ releaseMemory()

void GIDI_settings::releaseMemory ( )
inline

Definition at line 236 of file GIDI_settings.hh.

236{ mParticles.clear( ); }

References mParticles.

Field Documentation

◆ mParticles

std::map<int, GIDI_settings_particle> GIDI_settings::mParticles
private

Definition at line 227 of file GIDI_settings.hh.

Referenced by addParticle(), eraseParticle(), getParticle(), and releaseMemory().


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