lhapdf
is hosted by
Hepforge
,
IPPP Durham
LHAPDF
6.5.5
Loading...
Searching...
No Matches
include
LHAPDF
PDFInfo.h
1
// -*- C++ -*-
2
//
3
// This file is part of LHAPDF
4
// Copyright (C) 2012-2024 The LHAPDF collaboration (see AUTHORS for details)
5
//
6
#
pragma
once
7
#
ifndef
LHAPDF_PDFInfo_H
8
#
define
LHAPDF_PDFInfo_H
9
10
#
include
"LHAPDF/Info.h"
11
#
include
"LHAPDF/Factories.h"
12
#
include
"LHAPDF/PDFIndex.h"
13
14
namespace
LHAPDF
{
15
16
17
/// Metadata class for PDF members
18
class
PDFInfo
:
public
Info
{
19
public
:
20
21
/// Default constructor (for container compatibility)
22
///
23
/// @note Don't use explicitly!
24
///
25
/// @todo Remove/delete?
26
PDFInfo
() { }
27
28
/// Constructor from a PDF member's data path.
29
///
30
/// @todo Bypasses standard path searching hence used by the path-based
31
/// GridPDF constructor, for example.
32
PDFInfo
(
const
std::string& mempath);
33
34
/// Constructor from a set name and member ID.
35
PDFInfo
(
const
std::string& setname,
int
member);
36
37
/// Constructor from an LHAPDF ID code.
38
PDFInfo
(
int
lhaid);
39
40
41
/// @name Metadata accessors
42
///@{
43
44
/// Get the keys defined on this object or higher
45
std
::
vector
<
std
::
string
>
keys
()
const
;
46
47
/// Can this Info object return a value for the given key? (it may be defined non-locally)
48
bool
has_key
(
const
std::string& key)
const
;
49
50
/// Retrieve a metadata string by key name
51
const
std
::
string
&
get_entry
(
const
std::string& key)
const
;
52
53
/// Retrieve a metadata string by key name, with a fallback
54
const
std
::
string
&
get_entry
(
const
std::string& key,
const
std::string& fallback)
const
{
55
return
Info::get_entry(key, fallback);
56
}
57
58
///@}
59
60
61
private
:
62
63
/// Name of the set in which this PDF is contained (for PDFSet lookup)
64
std
::
string
_setname
;
65
66
/// Member ID in PDF set
67
/// @note Not currently used, but could be useful if a memberID method is exposed.
68
int
_member
;
69
70
};
71
72
73
}
74
#
endif
LHAPDF::PDFInfo
Metadata class for PDF members.
Definition
PDFInfo.h:18
LHAPDF::PDFInfo::get_entry
const std::string & get_entry(const std::string &key) const
Retrieve a metadata string by key name.
LHAPDF::PDFInfo::PDFInfo
PDFInfo(int lhaid)
Constructor from an LHAPDF ID code.
LHAPDF::PDFInfo::get_entry
const std::string & get_entry(const std::string &key, const std::string &fallback) const
Retrieve a metadata string by key name, with a fallback.
Definition
PDFInfo.h:54
LHAPDF::PDFInfo::PDFInfo
PDFInfo(const std::string &setname, int member)
Constructor from a set name and member ID.
LHAPDF::PDFInfo::has_key
bool has_key(const std::string &key) const
Can this Info object return a value for the given key? (it may be defined non-locally)
LHAPDF::PDFInfo::_member
int _member
Definition
PDFInfo.h:68
LHAPDF::PDFInfo::keys
std::vector< std::string > keys() const
Get the keys defined on this object or higher.
LHAPDF::PDFInfo::PDFInfo
PDFInfo()
Definition
PDFInfo.h:26
LHAPDF::PDFInfo::PDFInfo
PDFInfo(const std::string &mempath)
LHAPDF::PDFInfo::_setname
std::string _setname
Name of the set in which this PDF is contained (for PDFSet lookup)
Definition
PDFInfo.h:64
LHAPDF
Namespace for all LHAPDF functions and classes.
Definition
AlphaS.h:14
Generated on Mon Dec 16 2024 19:04:48 for LHAPDF by
1.12.0