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