CMS 3D CMS Logo

EcalBaseNumber.cc
Go to the documentation of this file.
2 
3 EcalBaseNumber::EcalBaseNumber() : _theLevels(0) {}
4 
6  : _sortedName(aBaseNumber._sortedName),
7  _sortedCopyNumber(aBaseNumber._sortedCopyNumber),
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 
personalPlayback.level
level
Definition: personalPlayback.py:22
EcalBaseNumber::_sortedCopyNumber
std::vector< int > _sortedCopyNumber
Definition: EcalBaseNumber.h:31
EcalBaseNumber::getCopyNumber
int getCopyNumber(int level) const
Definition: EcalBaseNumber.cc:23
EcalBaseNumber::getLevelName
std::string const & getLevelName(int level) const
Definition: EcalBaseNumber.cc:34
EcalBaseNumber::getCapacity
int getCapacity()
Definition: EcalBaseNumber.cc:36
EcalBaseNumber::addLevel
void addLevel(const std::string &name, const int &copyNumber)
Definition: EcalBaseNumber.cc:15
EcalBaseNumber::_sortedName
std::vector< std::string > _sortedName
Definition: EcalBaseNumber.h:30
EcalBaseNumber
Definition: EcalBaseNumber.h:12
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalBaseNumber::reset
void reset()
Definition: EcalBaseNumber.cc:38
EcalBaseNumber::_theLevels
int _theLevels
Definition: EcalBaseNumber.h:32
EcalBaseNumber.h
fwlog::levelName
const char * levelName(LogLevel)
Definition: fwLog.cc:32
EcalBaseNumber::getLevels
int getLevels() const
Definition: EcalBaseNumber.cc:21
EcalBaseNumber::EcalBaseNumber
EcalBaseNumber()
Definition: EcalBaseNumber.cc:3
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EcalBaseNumber::setSize
void setSize(const int &size)
Definition: EcalBaseNumber.cc:10
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443