Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:00

0001 #include "CondFormats/CSCObjects/interface/CSCDBL1TPParametersExtended.h"
0002 
0003 #include <algorithm>
0004 
0005 CSCDBL1TPParametersExtended::CSCDBL1TPParametersExtended() {
0006   paramsInt_.resize(paramNamesInt_.size());
0007   paramsBool_.resize(paramNamesBool_.size());
0008 }
0009 
0010 CSCDBL1TPParametersExtended::~CSCDBL1TPParametersExtended() {}
0011 
0012 int CSCDBL1TPParametersExtended::getValueInt(const std::string& s) const {
0013   const int index = std::find(paramNamesInt_.begin(), paramNamesInt_.end(), s) - paramNamesInt_.begin();
0014   return paramsInt_[index];
0015 }
0016 
0017 bool CSCDBL1TPParametersExtended::getValueBool(const std::string& s) const {
0018   const int index = std::find(paramNamesBool_.begin(), paramNamesBool_.end(), s) - paramNamesBool_.begin();
0019   return paramsBool_[index];
0020 }
0021 
0022 void CSCDBL1TPParametersExtended::setValue(const std::string& s, int v) {
0023   const int index = std::find(paramNamesInt_.begin(), paramNamesInt_.end(), s) - paramNamesInt_.begin();
0024   paramsInt_[index] = v;
0025 }
0026 
0027 void CSCDBL1TPParametersExtended::setValue(const std::string& s, bool v) {
0028   const int index = std::find(paramNamesBool_.begin(), paramNamesBool_.end(), s) - paramNamesBool_.begin();
0029   paramsBool_[index] = v;
0030 }