CMS 3D CMS Logo

Functions
SiStripConfObject.cc File Reference
#include "CondFormats/SiStripObjects/interface/SiStripConfObject.h"
#include <string>

Go to the source code of this file.

Functions

template<>
std::string SiStripConfObject::get< std::string > (const std::string &name) const
 
template<>
std::vector< int > SiStripConfObject::get< std::vector< int > > (const std::string &name) const
 
template<>
std::vector< std::string > SiStripConfObject::get< std::vector< std::string > > (const std::string &name) const
 
template<>
bool SiStripConfObject::put< std::vector< int > > (const std::string &name, const std::vector< int > &inputValue)
 
template<>
bool SiStripConfObject::put< std::vector< std::string > > (const std::string &name, const std::vector< std::string > &inputValue)
 
template<>
bool SiStripConfObject::update< std::vector< int > > (const std::string &name, const std::vector< int > &inputValue)
 
template<>
bool SiStripConfObject::update< std::vector< std::string > > (const std::string &name, const std::vector< std::string > &inputValue)
 

Function Documentation

template<>
std::string SiStripConfObject::get< std::string > ( const std::string &  name) const

Definition at line 5 of file SiStripConfObject.cc.

References gather_cfg::cout, Skims_PA_cff::name, contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

5  {
6  std::string returnValue;
7  parMap::const_iterator it = parameters.find(name);
8  std::stringstream ss;
9  if (it != parameters.end()) {
10  ss << it->second;
11  ss >> returnValue;
12  } else {
13  std::cout << "WARNING: parameter " << name << " not found. Returning default value" << std::endl;
14  }
15  return returnValue;
16 }
template<>
std::vector<int> SiStripConfObject::get< std::vector< int > > ( const std::string &  name) const

Definition at line 47 of file SiStripConfObject.cc.

References gather_cfg::cout, HTMLExport::elem(), Skims_PA_cff::name, and contentValuesCheck::ss.

47  {
48  std::vector<int> returnValue;
49  parMap::const_iterator it = parameters.find(name);
50  std::stringstream ss;
51  if (it != parameters.end()) {
52  ss << it->second;
53  int elem;
54  while (ss >> elem)
55  returnValue.push_back(elem);
56  } else {
57  std::cout << "WARNING: parameter " << name << " not found. Returning default value" << std::endl;
58  }
59  return returnValue;
60 }
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:19
template<>
std::vector<std::string> SiStripConfObject::get< std::vector< std::string > > ( const std::string &  name) const

Definition at line 93 of file SiStripConfObject.cc.

References gather_cfg::cout, HTMLExport::elem(), Skims_PA_cff::name, contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

93  {
94  std::vector<std::string> returnValue;
95  parMap::const_iterator it = parameters.find(name);
96  std::stringstream ss;
97  if (it != parameters.end()) {
98  ss << it->second;
100  while (ss >> elem)
101  returnValue.push_back(elem);
102  } else {
103  std::cout << "WARNING: parameter " << name << " not found. Returning default value" << std::endl;
104  }
105  return returnValue;
106 }
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:19
template<>
bool SiStripConfObject::put< std::vector< int > > ( const std::string &  name,
const std::vector< int > &  inputValue 
)

Definition at line 19 of file SiStripConfObject.cc.

References HTMLExport::elem(), Skims_PA_cff::name, and contentValuesCheck::ss.

19  {
20  std::stringstream ss;
21  for (std::vector<int>::const_iterator elem = inputValue.begin(); elem != inputValue.end(); ++elem) {
22  ss << *elem << " ";
23  }
24  if (parameters.insert(std::make_pair(name, ss.str())).second)
25  return true;
26  return false;
27 }
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:19
template<>
bool SiStripConfObject::put< std::vector< std::string > > ( const std::string &  name,
const std::vector< std::string > &  inputValue 
)

Definition at line 63 of file SiStripConfObject.cc.

References HTMLExport::elem(), Skims_PA_cff::name, and contentValuesCheck::ss.

64  {
65  std::stringstream ss;
66  for (std::vector<std::string>::const_iterator elem = inputValue.begin(); elem != inputValue.end(); ++elem) {
67  ss << *elem << " ";
68  }
69  if (parameters.insert(std::make_pair(name, ss.str())).second)
70  return true;
71  return false;
72 }
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:19
template<>
bool SiStripConfObject::update< std::vector< int > > ( const std::string &  name,
const std::vector< int > &  inputValue 
)

Definition at line 30 of file SiStripConfObject.cc.

References gather_cfg::cout, HTMLExport::elem(), Skims_PA_cff::name, and contentValuesCheck::ss.

30  {
31  parMap::iterator it = parameters.find(name);
32  if (it == parameters.end()) {
33  std::cout << "WARNING in SiStripConfObject::update: parameter " << name << " not found, "
34  << "so cannot be updated to the vector of int of size'" << inputValue.size() << "'." << std::endl;
35  return false;
36  } else {
37  std::stringstream ss;
38  for (std::vector<int>::const_iterator elem = inputValue.begin(); elem != inputValue.end(); ++elem) {
39  ss << *elem << " ";
40  }
41  it->second = ss.str();
42  return true;
43  }
44 }
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:19
template<>
bool SiStripConfObject::update< std::vector< std::string > > ( const std::string &  name,
const std::vector< std::string > &  inputValue 
)

Definition at line 75 of file SiStripConfObject.cc.

References gather_cfg::cout, HTMLExport::elem(), Skims_PA_cff::name, and contentValuesCheck::ss.

76  {
77  parMap::iterator it = parameters.find(name);
78  if (it == parameters.end()) {
79  std::cout << "WARNING in SiStripConfObject::update: parameter " << name << " not found, "
80  << "so cannot be updated to the vector of std::string of size'" << inputValue.size() << "'." << std::endl;
81  return false;
82  } else {
83  std::stringstream ss;
84  for (std::vector<std::string>::const_iterator elem = inputValue.begin(); elem != inputValue.end(); ++elem) {
85  ss << *elem << " ";
86  }
87  it->second = ss.str();
88  return true;
89  }
90 }
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:19