CMS 3D CMS Logo

EcalBaseNumber.cc
Go to the documentation of this file.
2 #include <algorithm>
3 
4 EcalBaseNumber::EcalBaseNumber() : _theLevels(0) {}
5 
7  : _sortedName(aBaseNumber._sortedName),
8  _sortedCopyNumber(aBaseNumber._sortedCopyNumber),
9  _theLevels(aBaseNumber._theLevels) {}
10 
11 void EcalBaseNumber::setSize(const int& size) {
12  _sortedName.resize(size);
13  _sortedCopyNumber.resize(size);
14 }
15 
16 void EcalBaseNumber::addLevel(const std::string& name, const int& copyNumber) {
18  _sortedCopyNumber[_theLevels] = copyNumber;
19  _theLevels++;
20 }
21 
22 int EcalBaseNumber::getLevels() const { return _theLevels; }
23 
25 
27  for (int iLevel = 0; iLevel < _theLevels; iLevel++) {
28  if (_sortedName[iLevel] == levelName) {
29  return _sortedCopyNumber[iLevel];
30  }
31  }
32  return 0;
33 }
34 
36 
37 int EcalBaseNumber::getCapacity() { return _sortedName.capacity(); }
38 
40 
44 }
personalPlayback.level
level
Definition: personalPlayback.py:22
EcalBaseNumber::_sortedCopyNumber
std::vector< int > _sortedCopyNumber
Definition: EcalBaseNumber.h:32
EcalBaseNumber::getCopyNumber
int getCopyNumber(int level) const
Definition: EcalBaseNumber.cc:24
EcalBaseNumber::getLevelName
std::string const & getLevelName(int level) const
Definition: EcalBaseNumber.cc:35
EcalBaseNumber::getCapacity
int getCapacity()
Definition: EcalBaseNumber.cc:37
EcalBaseNumber::addLevel
void addLevel(const std::string &name, const int &copyNumber)
Definition: EcalBaseNumber.cc:16
EcalBaseNumber::_sortedName
std::vector< std::string > _sortedName
Definition: EcalBaseNumber.h:31
EcalBaseNumber
Definition: EcalBaseNumber.h:12
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
mps_fire.end
end
Definition: mps_fire.py:242
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalBaseNumber::reset
void reset()
Definition: EcalBaseNumber.cc:39
EcalBaseNumber::_theLevels
int _theLevels
Definition: EcalBaseNumber.h:33
EcalBaseNumber.h
fwlog::levelName
const char * levelName(LogLevel)
Definition: fwLog.cc:32
EcalBaseNumber::getLevels
int getLevels() const
Definition: EcalBaseNumber.cc:22
EcalBaseNumber::EcalBaseNumber
EcalBaseNumber()
Definition: EcalBaseNumber.cc:4
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EcalBaseNumber::setSize
void setSize(const int &size)
Definition: EcalBaseNumber.cc:11
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
EcalBaseNumber::reverse
void reverse()
Definition: EcalBaseNumber.cc:41