All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PartPropSvc.h
Go to the documentation of this file.
1 #ifndef __PARTPROPSVC_H__
2 #define __PARTPROPSVC_H__
3 
4 #include "GaudiKernel/Service.h"
6 #include "HepPDT/ParticleDataTable.hh"
7 #include "HepPDT/TableBuilder.hh"
8 
9 #include <vector>
10 #include <string>
11 #include <utility>
12 #include <iostream>
13 
14 //------------------------------------------------------------------
15 //
16 // ClassName: PartPropSvc
17 //
18 // Description: This service provides access to particle properties.
19 // Uses HepPDT as the underlying layer
20 //
21 // Author: Charles Leggett
22 //
23 // Date: 3-8-2001
24 //
25 //------------------------------------------------------------------
26 
27 class PartPropSvc: public extends1<Service, IPartPropSvc> {
28 public:
29 
30  virtual StatusCode initialize();
31  virtual StatusCode reinitialize();
32  virtual StatusCode finalize();
33 
34  // The table
35  HepPDT::ParticleDataTable *PDT();
36 
37  void setUnknownParticleHandler( HepPDT::ProcessUnknownID*,
38  const std::string&);
39 
40  PartPropSvc( const std::string& name, ISvcLocator* svc );
41 
42  // Destructor.
43  virtual ~PartPropSvc();
44 
45 private:
46 
47 
49  std::vector< std::pair<std::string,
50  bool(*) (std::istream&,HepPDT::TableBuilder&)> > m_inputs;
51 
53  HepPDT::ProcessUnknownID* m_upid;
54  std::string m_upid_name;
55 
56  HepPDT::ParticleDataTable *m_pdt;
57 
58  bool (*parseTableType(std::string&))(std::istream&, HepPDT::TableBuilder&);
59 
60  mutable MsgStream m_log;
61 
63 
64 
65 };
66 
67 #endif
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
struct GAUDI_API vector
Parametrisation class for vector-like implementation.
MsgStream m_log
Definition: PartPropSvc.h:60
PartPropSvc(const std::string &name, ISvcLocator *svc)
Definition: PartPropSvc.cpp:32
HepPDT::ProcessUnknownID * m_upid
Definition: PartPropSvc.h:53
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
HepPDT::ParticleDataTable * PDT()
bool m_upid_local
Definition: PartPropSvc.h:62
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
virtual StatusCode reinitialize()
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
HepPDT::ParticleDataTable * m_pdt
Definition: PartPropSvc.h:56
bool(*)(std::istream &, HepPDT::TableBuilder &) parseTableType(std::string &)
Definition: PartPropSvc.h:58
virtual ~PartPropSvc()
Definition: PartPropSvc.cpp:42
void setUnknownParticleHandler(HepPDT::ProcessUnknownID *, const std::string &)
StatusCode createTable()
std::vector< std::pair< std::string, bool(*)(std::istream &, HepPDT::TableBuilder &)> > m_inputs
Definition: PartPropSvc.h:50
StringProperty m_pdtFiles
Definition: PartPropSvc.h:52
std::string m_upid_name
Definition: PartPropSvc.h:54