CMS 3D CMS Logo

EcalBaseNumber.cc
Go to the documentation of this file.
2 
3 EcalBaseNumber::EcalBaseNumber() : _theLevels(0) {}
4 
6  : _sortedName(aBaseNumber._sortedName),
8  _theLevels(aBaseNumber._theLevels) {}
9 
10 void EcalBaseNumber::setSize(const int& size) {
11  _sortedName.resize(size);
12  _sortedCopyNumber.resize(size);
13 }
14 
15 void EcalBaseNumber::addLevel(const std::string& name, const int& copyNumber) {
17  _sortedCopyNumber[_theLevels] = copyNumber;
18  _theLevels++;
19 }
20 
21 int EcalBaseNumber::getLevels() const { return _theLevels; }
22 
24 
26  for (int iLevel = 0; iLevel < _theLevels; iLevel++) {
27  if (_sortedName[iLevel] == levelName) {
28  return _sortedCopyNumber[iLevel];
29  }
30  }
31  return 0;
32 }
33 
35 
36 int EcalBaseNumber::getCapacity() { return _sortedName.capacity(); }
37 
size
Write out results.
std::string const & getLevelName(int level) const
std::vector< int > _sortedCopyNumber
std::vector< std::string > _sortedName
int getCopyNumber(int level) const
void addLevel(const std::string &name, const int &copyNumber)
const char * levelName(LogLevel)
Definition: fwLog.cc:32
void setSize(const int &size)
int getLevels() const