The Gaudi Framework  v30r3 (a5ef0a68)
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 "boost/optional.hpp"
10 
11 #include <iostream>
12 #include <string>
13 #include <utility>
14 #include <vector>
15 
16 //------------------------------------------------------------------
17 //
18 // ClassName: PartPropSvc
19 //
20 // Description: This service provides access to particle properties.
21 // Uses HepPDT as the underlying layer
22 //
23 // Author: Charles Leggett
24 //
25 // Date: 3-8-2001
26 //
27 //------------------------------------------------------------------
28 
29 class PartPropSvc : public extends<Service, IPartPropSvc>
30 {
31 public:
32  using extends::extends;
33 
34  StatusCode initialize() override;
35  StatusCode finalize() override;
36 
37  // The table
38  HepPDT::ParticleDataTable* PDT() override;
39 
40  void setUnknownParticleHandler( HepPDT::ProcessUnknownID*, const std::string& ) override;
41 
42 private:
43  using inputFunPtr = bool ( * )( std::istream&, HepPDT::TableBuilder& );
44 
47 
48  Gaudi::Property<std::string> m_pdtFiles{this, "InputFile", "PDGTABLE.MeV"};
49 
50  HepPDT::ProcessUnknownID* m_upid = nullptr;
52 
53  boost::optional<HepPDT::ParticleDataTable> m_pdt;
54 
56 
57  bool m_upid_local = false;
58 };
59 
60 #endif
boost::optional< HepPDT::ParticleDataTable > m_pdt
Definition: PartPropSvc.h:53
StatusCode initialize() override
Definition: PartPropSvc.cpp:22
Implementation of property with value of concrete type.
Definition: Property.h:381
inputFunPtr parseTableType(const std::string &)
bool(*)(std::istream &, HepPDT::TableBuilder &) inputFunPtr
Definition: PartPropSvc.h:43
Gaudi::Property< std::string > m_pdtFiles
Definition: PartPropSvc.h:48
std::vector< std::pair< std::string, inputFunPtr > > m_inputs
Definition: PartPropSvc.h:46
STL class.
StatusCode finalize() override
Definition: PartPropSvc.cpp:89
HepPDT::ProcessUnknownID * m_upid
Definition: PartPropSvc.h:50
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
bool m_upid_local
Definition: PartPropSvc.h:57
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:51