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 45 of file PdtEntry.cc.

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

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

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

◆ getPdtEntryVector()

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

Definition at line 56 of file PdtEntry.cc.

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 > >().

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