CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Definition at line 54 of file PdtEntry.cc.

References edm::errors::Configuration, edm::hlt::Exception, edm::Entry::getInt32(), edm::Entry::getString(), and edm::Entry::typeCode().

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

54  {
55  if (e.typeCode() == 'I')
56  return PdtEntry(e.getInt32());
57  else if(e.typeCode() == 'S')
58  return PdtEntry(e.getString());
59  else
60  throw Exception(errors::Configuration, "EntryError")
61  << "can not convert representation of " << name
62  << " to value of type PdtEntry. "
63  << "Please, provide a parameter either of type int32 or string.";
64  }
std::vector< PdtEntry > edm::pdtentry::getPdtEntryVector ( Entry const &  e,
char const *  name 
)

Definition at line 66 of file PdtEntry.cc.

References edm::errors::Configuration, edm::hlt::Exception, edm::Entry::getVInt32(), edm::Entry::getVString(), i, run_regression::ret, edm::Entry::typeCode(), and findQualityFiles::v.

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

66  {
67  std::vector<PdtEntry> ret;
68  if (e.typeCode() == 'i') {
69  std::vector<int> v(e.getVInt32());
70  for(std::vector<int>::const_iterator i = v.begin(); i != v.end(); ++ i)
71  ret.push_back(PdtEntry(*i));
72  return ret;
73  }
74  else if(e.typeCode() == 's') {
75  std::vector<std::string> v(e.getVString());
76  for(std::vector<std::string>::const_iterator i = v.begin(); i != v.end(); ++i)
77  ret.push_back(PdtEntry(*i));
78  return ret;
79  }
80  else
81  throw Exception(errors::Configuration, "EntryError")
82  << "can not convert representation of " << name
83  << " to value of type PdtEntry. "
84  << "Please, provide a parameter either of type int32 or string.";
85  }
int i
Definition: DBlmapReader.cc:9