1 #ifndef Utilities_PdtEntry_h 2 #define Utilities_PdtEntry_h 57 Entry const*
e = getEntryPointerOrThrow_(
name);
63 PdtEntry const& defaultValue)
const {
64 Entry const*
e = retrieveUntracked(name);
65 if (e ==
nullptr)
return defaultValue;
70 inline PdtEntry ParameterSet::getParameter<PdtEntry>(
char const*
name)
const {
71 Entry const&
e = retrieve(name);
76 inline PdtEntry ParameterSet::getUntrackedParameter<PdtEntry>(
char const*
name)
const {
77 Entry const*
e = getEntryPointerOrThrow_(name);
82 inline PdtEntry ParameterSet::getUntrackedParameter<PdtEntry>(
char const*
name,
83 PdtEntry const& defaultValue)
const {
84 Entry const*
e = retrieveUntracked(name);
85 if (e ==
nullptr)
return defaultValue;
90 inline std::vector<PdtEntry> ParameterSet::getParameter<std::vector<PdtEntry> >(
std::string const&
name)
const {
91 Entry const&
e = retrieve(name);
96 inline std::vector<PdtEntry> ParameterSet::getUntrackedParameter<std::vector<PdtEntry> >(
std::string const&
name)
const {
97 Entry const*
e = getEntryPointerOrThrow_(name);
102 inline std::vector<PdtEntry> ParameterSet::getUntrackedParameter<std::vector<PdtEntry> >(
std::string const&
name,
103 std::vector<PdtEntry>
const& defaultValue)
const {
104 Entry const*
e = retrieveUntracked(name);
105 if (e ==
nullptr)
return defaultValue;
110 inline std::vector<PdtEntry> ParameterSet::getParameter<std::vector<PdtEntry> >(
char const*
name)
const {
111 Entry const&
e = retrieve(name);
116 inline std::vector<PdtEntry> ParameterSet::getUntrackedParameter<std::vector<PdtEntry> >(
char const*
name)
const {
117 Entry const*
e = getEntryPointerOrThrow_(name);
122 inline std::vector<PdtEntry> ParameterSet::getUntrackedParameter<std::vector<PdtEntry> >(
char const*
name,
123 std::vector<PdtEntry>
const& defaultValue)
const {
124 Entry const*
e = retrieveUntracked(name);
125 if (e ==
nullptr)
return defaultValue;
130 inline std::vector<std::string> ParameterSet::getParameterNamesForType<PdtEntry>(
bool trackiness)
const {
131 std::vector<std::string> ints = getParameterNamesForType<int>(trackiness);
132 std::vector<std::string>
strings = getParameterNamesForType<std::string>(trackiness);
133 std::copy( strings.begin(), strings.end(), std::back_insert_iterator<std::vector<std::string> >( ints ) );
138 inline std::vector<std::string> ParameterSet::getParameterNamesForType<std::vector<PdtEntry> >(
bool trackiness)
const {
139 std::vector<std::string> ints = getParameterNamesForType<std::vector<int> >(trackiness);
140 std::vector<std::string>
strings = getParameterNamesForType<std::vector<std::string> >(trackiness);
141 std::copy( strings.begin(), strings.end(), std::back_insert_iterator<std::vector<std::string> >( ints ) );
PdtEntry getPdtEntry(Entry const &e, char const *name)
PdtEntry(int pdgId)
construct from PDG id
def setup(process, global_tag, zero_tesla=False)
std::string name_
particle name
std::vector< PdtEntry > getPdtEntryVector(Entry const &e, char const *name)
HepPDT::ParticleData ParticleData
const HepPDT::ParticleData * data_
particle data
PdtEntry()
default construct
char data[epos_bytes_allocation]
PdtEntry(const std::string &name)
construct from particle name