1 #ifndef Utilities_PdtEntry_h
2 #define Utilities_PdtEntry_h
26 const std::string &
name()
const;
50 inline PdtEntry ParameterSet::getParameter<PdtEntry>(std::string
const&
name)
const {
56 inline PdtEntry ParameterSet::getUntrackedParameter<PdtEntry>(std::string
const&
name)
const {
57 Entry const* e = getEntryPointerOrThrow_(
name);
62 inline PdtEntry ParameterSet::getUntrackedParameter<PdtEntry>(std::string
const&
name,
63 PdtEntry const& defaultValue)
const {
65 if (e == 0)
return defaultValue;
70 inline PdtEntry ParameterSet::getParameter<PdtEntry>(
char const*
name)
const {
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 {
85 if (e == 0)
return defaultValue;
90 inline std::vector<PdtEntry> ParameterSet::getParameter<std::vector<PdtEntry> >(std::string
const&
name)
const {
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 == 0)
return defaultValue;
110 inline std::vector<PdtEntry> ParameterSet::getParameter<std::vector<PdtEntry> >(
char const*
name)
const {
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 == 0)
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
std::string name_
particle name
std::vector< PdtEntry > getPdtEntryVector(Entry const &e, char const *name)
HepPDT::ParticleData ParticleData
void setup(const edm::EventSetup &)
fill data from Event Setup
const HepPDT::ParticleData * data_
particle data
const std::string & name() const
particle name
PdtEntry()
default construct
int pdgId() const
PDG id.
PdtEntry(const std::string &name)
construct from particle name
const HepPDT::ParticleData & data() const
particle data