CMS 3D CMS Logo

Functions
edm::pdtentry Namespace Reference

Functions

PdtEntry getPdtEntry (Entry const &e, char const *name)
 
std::vector< PdtEntrygetPdtEntryVector (Entry const &e, char const *name)
 

Function Documentation

◆ getPdtEntry()

PdtEntry edm::pdtentry::getPdtEntry ( Entry const &  e,
char const *  name 
)

Definition at line 49 of file PdtEntry.cc.

49  {
50  if (e.typeCode() == 'I')
51  return PdtEntry(e.getInt32());
52  else if (e.typeCode() == 'S')
53  return PdtEntry(e.getString());
54  else
55  throw Exception(errors::Configuration, "EntryError")
56  << "can not convert representation of " << name << " to value of type PdtEntry. "
57  << "Please, provide a parameter either of type int32 or string.";
58  }

References edm::errors::Configuration, MillePedeFileConverter_cfg::e, Exception, and Skims_PA_cff::name.

Referenced by edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

◆ getPdtEntryVector()

std::vector< PdtEntry > edm::pdtentry::getPdtEntryVector ( Entry const &  e,
char const *  name 
)

Definition at line 60 of file PdtEntry.cc.

60  {
61  std::vector<PdtEntry> ret;
62  if (e.typeCode() == 'i') {
63  std::vector<int> v(e.getVInt32());
64  for (std::vector<int>::const_iterator i = v.begin(); i != v.end(); ++i)
65  ret.push_back(PdtEntry(*i));
66  return ret;
67  } else if (e.typeCode() == 's') {
68  std::vector<std::string> v(e.getVString());
69  for (std::vector<std::string>::const_iterator i = v.begin(); i != v.end(); ++i)
70  ret.push_back(PdtEntry(*i));
71  return ret;
72  } else
73  throw Exception(errors::Configuration, "EntryError")
74  << "can not convert representation of " << name << " to value of type PdtEntry. "
75  << "Please, provide a parameter either of type int32 or string.";
76  }

References edm::errors::Configuration, MillePedeFileConverter_cfg::e, Exception, mps_fire::i, Skims_PA_cff::name, runTheMatrix::ret, and findQualityFiles::v.

Referenced by edm::ParameterSet::getParameter< std::vector< PdtEntry > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< PdtEntry > >().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
mps_fire.i
i
Definition: mps_fire.py:355
findQualityFiles.v
v
Definition: findQualityFiles.py:179
Exception
Definition: hltDiff.cc:246
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
PdtEntry
Definition: PdtEntry.h:19
edm::errors::Configuration
Definition: EDMException.h:36
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37