| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

PartPropSvc.h
Go to the documentation of this file.
1 #ifndef __PARTPROPSVC_H__
2 #define __PARTPROPSVC_H__
3
4 #include "GaudiKernel/Service.h"
5 #include "GaudiKernel/IPartPropSvc.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 #include <memory>
14
15 //------------------------------------------------------------------
16 //
17 // ClassName: PartPropSvc
18 //
19 // Description: This service provides access to particle properties.
20 // Uses HepPDT as the underlying layer
21 //
22 // Author: Charles Leggett
23 //
24 // Date: 3-8-2001
25 //
26 //------------------------------------------------------------------
27
28 class PartPropSvc: public extends<Service,
29 IPartPropSvc> {
30 public:
31
32 PartPropSvc( const std::string& name, ISvcLocator* svc );
33
34 StatusCode initialize() override;
35 StatusCode finalize() override;
36
37 // The table
38 HepPDT::ParticleDataTable *PDT() override;
39
40 void setUnknownParticleHandler( HepPDT::ProcessUnknownID*,
41 const std::string&) override;
42
43 // Destructor.
44 ~PartPropSvc() override = default;
45
46 private:
47
48 using inputFunPtr = bool(*)(std::istream&,HepPDT::TableBuilder&);
49
50 StatusCode createTable();
51 std::vector<std::pair<std::string,inputFunPtr>> m_inputs;
52
53 StringProperty m_pdtFiles;
54 HepPDT::ProcessUnknownID* m_upid = nullptr;
55 std::string m_upid_name;
56
57 std::unique_ptr<HepPDT::ParticleDataTable> m_pdt;
58
59 inputFunPtr parseTableType(const std::string&);
60
61 bool m_upid_local = false;
62
63 };
64
65 #endif
AnalysisTest.initialize
def initialize()
Definition: AnalysisTest.py:12
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
PartPropSvc::parseTableType
inputFunPtr parseTableType(const std::string &)
Definition: PartPropSvc.cpp:133
PartPropSvc::m_pdt
std::unique_ptr< HepPDT::ParticleDataTable > m_pdt
Definition: PartPropSvc.h:57
PartPropSvc::PartPropSvc
PartPropSvc(const std::string &name, ISvcLocator *svc)
Definition: PartPropSvc.cpp:25
std::istream
STL class.
PartPropSvc
Definition: PartPropSvc.py:1
PartPropSvc::finalize
StatusCode finalize() override
Definition: PartPropSvc.cpp:109
PartPropSvc::m_upid
HepPDT::ProcessUnknownID * m_upid
Definition: PartPropSvc.h:54
std::string
STL class.
SimpleProperty< std::string >
Service.h
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
IPartPropSvc.h
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
PartPropSvc::inputFunPtr
bool(*)(std::istream &, HepPDT::TableBuilder &) inputFunPtr
Definition: PartPropSvc.h:48
PartPropSvc::m_upid_local
bool m_upid_local
Definition: PartPropSvc.h:61
PartPropSvc::~PartPropSvc
~PartPropSvc() override=default
PartPropSvc::PDT
HepPDT::ParticleDataTable * PDT() override
Definition: PartPropSvc.cpp:192
std::vector
STL class.
std::unique_ptr< HepPDT::ParticleDataTable >
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
PartPropSvc::createTable
StatusCode createTable()
Definition: PartPropSvc.cpp:155
PartPropSvc::m_inputs
std::vector< std::pair< std::string, inputFunPtr > > m_inputs
Definition: PartPropSvc.h:51
PartPropSvc::setUnknownParticleHandler
void setUnknownParticleHandler(HepPDT::ProcessUnknownID *, const std::string &) override
Definition: PartPropSvc.cpp:208
PartPropSvc::m_pdtFiles
StringProperty m_pdtFiles
Definition: PartPropSvc.h:53
PartPropSvc::m_upid_name
std::string m_upid_name
Definition: PartPropSvc.h:55