4 bool SiStripConfObject::put<std::vector<int> >(
const std::string &
name,
const std::vector<int> & inputValue )
7 for(std::vector<int>::const_iterator
elem=inputValue.begin();
elem!=inputValue.end();++
elem) {
10 if(
parameters.insert(std::make_pair(
name, ss.str())).second )
return true;
15 bool SiStripConfObject::update<std::vector<int> >(
const std::string &
name,
const std::vector<int> & inputValue )
19 std::cout <<
"WARNING in SiStripConfObject::update: parameter " <<
name <<
" not found, "
20 <<
"so cannot be updated to the vector of int of size'" << inputValue.size() <<
"'." << std::endl;
24 for(std::vector<int>::const_iterator
elem=inputValue.begin();
elem!=inputValue.end();++
elem) {
27 it->second = ss.str();
33 std::vector<int> SiStripConfObject::get<std::vector<int> >(
const std::string &
name )
const
35 std::vector<int> returnValue;
41 while(ss >> elem) returnValue.push_back(elem);
44 std::cout <<
"WARNING: parameter " <<
name <<
" not found. Returning default value" << std::endl;
50 bool SiStripConfObject::put<std::vector<std::string> >(
const std::string &
name,
const std::vector<std::string> & inputValue )
53 for(std::vector<std::string>::const_iterator
elem=inputValue.begin();
elem!=inputValue.end();++
elem) {
56 if(
parameters.insert(std::make_pair(
name, ss.str())).second )
return true;
61 bool SiStripConfObject::update<std::vector<std::string> >(
const std::string &
name,
const std::vector<std::string> & inputValue )
65 std::cout <<
"WARNING in SiStripConfObject::update: parameter " <<
name <<
" not found, "
66 <<
"so cannot be updated to the vector of std::string of size'" << inputValue.size() <<
"'." << std::endl;
70 for(std::vector<std::string>::const_iterator
elem=inputValue.begin();
elem!=inputValue.end();++
elem) {
73 it->second = ss.str();
79 std::vector<std::string> SiStripConfObject::get<std::vector<std::string> >(
const std::string &
name )
const
81 std::vector<std::string> returnValue;
87 while(ss >> elem) returnValue.push_back(elem);
90 std::cout <<
"WARNING: parameter " <<
name <<
" not found. Returning default value" << std::endl;
98 parMap::const_iterator it =
parameters.begin();
100 ss <<
"parameter name = " << it->first <<
" value = " << it->second << std::endl;
void printSummary(std::stringstream &ss) const
Prints the full list of parameters.
void printDebug(std::stringstream &ss) const
Prints the full list of parameters.