Geant4-11
GIDI_settings.cc
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# <<END-copyright>>
4*/
5
6#include <iostream>
7#include <stdlib.h>
8
9#include "GIDI_settings.hh"
10
11/*
12=========================================================
13*/
18
19}
20/*
21=========================================================
22*/
24
25}
26/*
27=========================================================
28*/
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}
37/*
38=========================================================
39*/
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}
47/*
48=========================================================
49*/
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}
int getPoPId(void) const
GIDI_settings_particle const * getParticle(int PoPId) const
int eraseParticle(int PoPId)
int addParticle(GIDI_settings_particle const &particle)
std::map< int, GIDI_settings_particle > mParticles