Gaudi Framework, version v25r2

Home   Generated: Wed Jun 4 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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"
15 
16 class IFileAccess;
17 
18 namespace Gaudi {
19 // ============================================================================
71 class ParticlePropertySvc: public extends1<Service,IParticlePropertySvc>
72 {
73 public:
74  // typedefs for container type
76  typedef std::map< int, mapped_type > MapID ;
77  typedef std::map< std::string, mapped_type > MapName ;
78  typedef std::map< int, mapped_type > MapStdHepID ;
79  typedef std::map< int, mapped_type > MapPythiaID ;
83  typedef std::set<ParticleProperty*> Set ;
84  // Inherited Service overrides:
85 
87  virtual StatusCode initialize();
89  virtual StatusCode finalize();
102  virtual StatusCode push_back
103  ( const std::string& particle ,
104  int geantId ,
105  int jetsetId ,
106  double charge ,
107  double mass ,
108  double tlife ,
109  const std::string& evtName ,
110  int pythiaId ,
111  double maxWidth ) ;
119  virtual const_iterator begin() const { return m_vectpp.begin() ; }
121  virtual const_iterator end () const { return m_vectpp.end() ; }
123  virtual int size() const { return m_vectpp.size() ; };
125  virtual ParticleProperty* find( int geantId )
126  { return m_idmap[ geantId ] ; }
128  virtual ParticleProperty* find( const std::string& name )
129  { return m_namemap[ name ] ; }
131  virtual ParticleProperty* findByStdHepID( int stdHepId )
132  { return m_stdhepidmap[ stdHepId ] ; }
134  virtual ParticleProperty* findByPythiaID( int pythiaID )
135  { return m_pythiaidmap[ pythiaID ]; }
137  virtual StatusCode erase( int geantId )
138  { return erase ( find ( geantId ) ) ; }
140  virtual StatusCode erase( const std::string& name )
141  { return erase ( find ( name ) ) ; }
143  virtual StatusCode eraseByStdHepID( int stdHepId )
144  { return erase( findByStdHepID ( stdHepId ) ) ; }
150  ( const std::string& name , ISvcLocator* svc );
152  virtual ~ParticlePropertySvc();
153 protected:
159  const ParticleProperty* anti
160  ( const ParticleProperty* pp ) const ;
165  StatusCode setAntiParticles() ;
167  StatusCode rebuild() ;
169  StatusCode erase ( const ParticleProperty* pp ) ;
171  StatusCode parse ( const std::string& file ) ;
172  // Text file parsing routine.
173  StatusCode parse();
174  // treat additional particles
175  StatusCode addParticles() ;
176  // compare 2 entries
177  bool diff
178  ( const ParticleProperty* o ,
179  const ParticleProperty* n ,
180  const MSG::Level l = MSG::DEBUG ) const ;
181 private:
182  typedef std::vector<std::string> Files ;
183  typedef std::vector<std::string> Particles ;
184 
185  std::string m_filename;
187  // properties to be redefined explicitly
189 
195 
196  // local storage of ALL properties
198  std::set<std::string> m_replaced ;
199 
201 };
202 } // namespace Gaudi
203 // =============================================================================
204 // The END
205 // =============================================================================
206 #endif
207 // =============================================================================
208 
209 

Generated at Wed Jun 4 2014 14:48:57 for Gaudi Framework, version v25r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004