ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GIDI_settings.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GIDI_settings.cc
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 */
50 int GIDI_settings::eraseParticle( int PoPId ) {
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 }