Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_settings Class Reference

#include <GIDI_settings.hh>

Public Member Functions

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

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}

◆ 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}

◆ 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}

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( ); }

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