| The Gaudi Framework v32r1 (f65d50dc)

PartPropSvc.h
Go to the documentation of this file.
1 #ifndef __PARTPROPSVC_H__
2 #define __PARTPROPSVC_H__
3
4 #include "GaudiKernel/IPartPropSvc.h"
5 #include "GaudiKernel/Service.h"
6 #include "HepPDT/ParticleDataTable.hh"
7 #include "HepPDT/TableBuilder.hh"
8
9 #include <iostream>
10 #include <optional>
11 #include <string>
12 #include <utility>
13 #include <vector>
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, IPartPropSvc> {
29 public:
30 using extends::extends;
31
32 StatusCode initialize() override;
33 StatusCode finalize() override;
34
35 // The table
36 HepPDT::ParticleDataTable* PDT() override;
37
38 void setUnknownParticleHandler( HepPDT::ProcessUnknownID*, const std::string& ) override;
39
40 private:
41 using inputFunPtr = bool ( * )( std::istream&, HepPDT::TableBuilder& );
42
43 StatusCode createTable();
44 std::vector<std::pair<std::string, inputFunPtr>> m_inputs;
45
46 Gaudi::Property<std::string> m_pdtFiles{this, "InputFile", "PDGTABLE.MeV"};
47
48 HepPDT::ProcessUnknownID* m_upid = nullptr;
49 std::string m_upid_name;
50
51 std::optional<HepPDT::ParticleDataTable> m_pdt;
52
53 inputFunPtr parseTableType( const std::string& );
54
55 bool m_upid_local = false;
56 };
57
58 #endif
PartPropSvc::initialize
StatusCode initialize() override
Definition: PartPropSvc.cpp:22
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
PartPropSvc::parseTableType
inputFunPtr parseTableType(const std::string &)
Definition: PartPropSvc.cpp:109
PartPropSvc::inputFunPtr
bool(*)(std::istream &, HepPDT::TableBuilder &) inputFunPtr
Definition: PartPropSvc.h:41
PartPropSvc::m_pdtFiles
Gaudi::Property< std::string > m_pdtFiles
Definition: PartPropSvc.h:46
PartPropSvc::m_inputs
std::vector< std::pair< std::string, inputFunPtr > > m_inputs
Definition: PartPropSvc.h:44
std::istream
STL class.
PartPropSvc
Definition: PartPropSvc.py:1
PartPropSvc::finalize
StatusCode finalize() override
Definition: PartPropSvc.cpp:88
PartPropSvc::m_upid
HepPDT::ProcessUnknownID * m_upid
Definition: PartPropSvc.h:48
std::string
STL class.
Service.h
IPartPropSvc.h
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
PartPropSvc::m_upid_local
bool m_upid_local
Definition: PartPropSvc.h:55
PartPropSvc::PDT
HepPDT::ParticleDataTable * PDT() override
Definition: PartPropSvc.cpp:156
std::vector
STL class.
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
PartPropSvc::createTable
StatusCode createTable()
Definition: PartPropSvc.cpp:125
PartPropSvc::m_pdt
std::optional< HepPDT::ParticleDataTable > m_pdt
Definition: PartPropSvc.h:51
PartPropSvc::setUnknownParticleHandler
void setUnknownParticleHandler(HepPDT::ProcessUnknownID *, const std::string &) override
Definition: PartPropSvc.cpp:171
PartPropSvc::m_upid_name
std::string m_upid_name
Definition: PartPropSvc.h:49