The Gaudi Framework
master (750c24bb)
Toggle main menu visibility
Loading...
Searching...
No Matches
PartPropSvc.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <
GaudiKernel/IPartPropSvc.h
>
14
#include <
GaudiKernel/Service.h
>
15
#include <HepPDT/ParticleDataTable.hh>
16
#include <HepPDT/TableBuilder.hh>
17
18
#include <iostream>
19
#include <optional>
20
#include <string>
21
#include <utility>
22
#include <vector>
23
24
//------------------------------------------------------------------
25
//
26
// ClassName: PartPropSvc
27
//
28
// Description: This service provides access to particle properties.
29
// Uses HepPDT as the underlying layer
30
//
31
// Author: Charles Leggett
32
//
33
// Date: 3-8-2001
34
//
35
//------------------------------------------------------------------
36
37
class
PartPropSvc
:
public
extends
<Service, IPartPropSvc> {
38
public
:
39
using
extends::extends;
40
41
StatusCode
initialize
()
override
;
42
StatusCode
finalize
()
override
;
43
44
// The table
45
HepPDT::ParticleDataTable*
PDT
()
override
;
46
47
void
setUnknownParticleHandler
( HepPDT::ProcessUnknownID*,
const
std::string& )
override
;
48
49
private
:
50
using
inputFunPtr
= bool ( * )( std::istream&, HepPDT::TableBuilder& );
51
52
StatusCode
createTable
();
53
std::vector<std::pair<std::string, inputFunPtr>>
m_inputs
;
54
55
Gaudi::Property<std::string>
m_pdtFiles
{
this
,
"InputFile"
,
"PDGTABLE.MeV"
};
56
57
HepPDT::ProcessUnknownID*
m_upid
=
nullptr
;
58
std::string
m_upid_name
;
59
60
std::optional<HepPDT::ParticleDataTable>
m_pdt
;
61
62
inputFunPtr
parseTableType
(
const
std::string& );
63
64
bool
m_upid_local
=
false
;
65
};
IPartPropSvc.h
Service.h
Gaudi::Property
Implementation of property with value of concrete type.
Definition
Property.h:35
PartPropSvc::m_pdtFiles
Gaudi::Property< std::string > m_pdtFiles
Definition
PartPropSvc.h:55
PartPropSvc::m_upid_name
std::string m_upid_name
Definition
PartPropSvc.h:58
PartPropSvc::parseTableType
inputFunPtr parseTableType(const std::string &)
Definition
PartPropSvc.cpp:113
PartPropSvc::finalize
StatusCode finalize() override
Definition
PartPropSvc.cpp:92
PartPropSvc::m_upid
HepPDT::ProcessUnknownID * m_upid
Definition
PartPropSvc.h:57
PartPropSvc::m_inputs
std::vector< std::pair< std::string, inputFunPtr > > m_inputs
Definition
PartPropSvc.h:53
PartPropSvc::inputFunPtr
bool(*)(std::istream &, HepPDT::TableBuilder &) inputFunPtr
Definition
PartPropSvc.h:50
PartPropSvc::m_upid_local
bool m_upid_local
Definition
PartPropSvc.h:64
PartPropSvc::initialize
StatusCode initialize() override
Definition
PartPropSvc.cpp:26
PartPropSvc::m_pdt
std::optional< HepPDT::ParticleDataTable > m_pdt
Definition
PartPropSvc.h:60
PartPropSvc::PDT
HepPDT::ParticleDataTable * PDT() override
Definition
PartPropSvc.cpp:160
PartPropSvc::createTable
StatusCode createTable()
Definition
PartPropSvc.cpp:129
PartPropSvc::setUnknownParticleHandler
void setUnknownParticleHandler(HepPDT::ProcessUnknownID *, const std::string &) override
Definition
PartPropSvc.cpp:175
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
extends
Base class used to extend a class implementing other interfaces.
Definition
extends.h:19
PartPropSvc
Definition
PartPropSvc.py:1
PartPropSvc
src
PartPropSvc.h
Generated on
for The Gaudi Framework by
1.17.0