Gaudi Framework, version v23r8
Home
Generated: Fri May 31 2013
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiPartProp
src
ParticlePropertySvc.h
Go to the documentation of this file.
1
#ifndef PARTICLEPROPERTYSVC_PARTICLEPROPERTYSVC_H
2
#define PARTICLEPROPERTYSVC_PARTICLEPROPERTYSVC_H
3
// ============================================================================
4
// Include Files
5
// ============================================================================
6
// STD&STL
7
// ============================================================================
8
#include <
map
>
9
#include <
set
>
10
// ============================================================================
11
// GaudiKernel
12
// ============================================================================
13
#include "
GaudiKernel/Service.h
"
14
#include "
GaudiKernel/SvcFactory.h
"
15
#include "
GaudiKernel/IParticlePropertySvc.h
"
16
17
class
IFileAccess
;
18
19
namespace
Gaudi
{
20
// ============================================================================
72
class
ParticlePropertySvc
:
public
extends1
<Service,IParticlePropertySvc>
73
{
74
public
:
75
// typedefs for container type
76
typedef
ParticleProperty
*
mapped_type
;
77
typedef
std::map< int, mapped_type >
MapID
;
78
typedef
std::map< std::string, mapped_type >
MapName
;
79
typedef
std::map< int, mapped_type >
MapStdHepID
;
80
typedef
std::map< int, mapped_type >
MapPythiaID
;
81
typedef
IParticlePropertySvc::VectPP
VectPP
;
82
typedef
IParticlePropertySvc::const_iterator
const_iterator
;
83
typedef
IParticlePropertySvc::iterator
iterator
;
84
typedef
std::set<ParticleProperty*>
Set
;
85
// Inherited Service overrides:
86
88
virtual
StatusCode
initialize
();
90
virtual
StatusCode
finalize
();
103
virtual
StatusCode
push_back
104
(
const
std::string
& particle ,
105
int
geantId ,
106
int
jetsetId ,
107
double
charge ,
108
double
mass ,
109
double
tlife ,
110
const
std::string
& evtName ,
111
int
pythiaId ,
112
double
maxWidth ) ;
118
virtual
StatusCode
push_back
(
ParticleProperty
*
pp
);
120
virtual
const_iterator
begin
()
const
{
return
m_vectpp
.
begin
() ; }
122
virtual
const_iterator
end
()
const
{
return
m_vectpp
.
end
() ; }
124
virtual
int
size
()
const
{
return
m_vectpp
.
size
() ; };
126
virtual
ParticleProperty
*
find
(
int
geantId )
127
{
return
m_idmap
[ geantId ] ; }
129
virtual
ParticleProperty
*
find
(
const
std::string
& name )
130
{
return
m_namemap
[ name ] ; }
132
virtual
ParticleProperty
*
findByStdHepID
(
int
stdHepId )
133
{
return
m_stdhepidmap
[ stdHepId ] ; }
135
virtual
ParticleProperty
*
findByPythiaID
(
int
pythiaID )
136
{
return
m_pythiaidmap
[ pythiaID ]; }
138
virtual
StatusCode
erase
(
int
geantId )
139
{
return
erase
(
find
( geantId ) ) ; }
141
virtual
StatusCode
erase
(
const
std::string
& name )
142
{
return
erase
(
find
( name ) ) ; }
144
virtual
StatusCode
eraseByStdHepID
(
int
stdHepId )
145
{
return
erase
(
findByStdHepID
( stdHepId ) ) ; }
150
ParticlePropertySvc
151
(
const
std::string
& name ,
ISvcLocator
* svc );
153
virtual
~
ParticlePropertySvc
();
154
protected
:
160
const
ParticleProperty
* anti
161
(
const
ParticleProperty
*
pp
)
const
;
166
StatusCode
setAntiParticles() ;
168
StatusCode
rebuild() ;
170
StatusCode
erase (
const
ParticleProperty
*
pp
) ;
172
StatusCode
parse
(
const
std::string
&
file
) ;
173
// Text file parsing routine.
174
StatusCode
parse
();
175
// treat additional particles
176
StatusCode
addParticles() ;
177
// compare 2 entries
178
bool
diff
179
(
const
ParticleProperty
* o ,
180
const
ParticleProperty
* n ,
181
const
MSG::Level
l
=
MSG::DEBUG
)
const
;
182
private
:
183
typedef
std::vector<std::string>
Files
;
184
typedef
std::vector<std::string>
Particles
;
185
186
std::string
m_filename
;
187
Files
m_other
;
188
// properties to be redefined explicitly
189
Particles
m_particles
;
190
191
VectPP
m_vectpp
;
192
MapID
m_idmap
;
193
MapName
m_namemap
;
194
MapStdHepID
m_stdhepidmap
;
195
MapPythiaID
m_pythiaidmap
;
196
197
// local storage of ALL properties
198
Set
m_owned
;
199
std::set<std::string>
m_replaced
;
200
201
IFileAccess
*
m_fileAccess
;
202
};
203
}
// namespace Gaudi
204
// =============================================================================
205
// The END
206
// =============================================================================
207
#endif
208
// =============================================================================
209
210
Generated at Fri May 31 2013 15:09:09 for Gaudi Framework, version v23r8 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004