CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
16 {
18  _sortedCopyNumber[_theLevels] = copyNumber;
19  _theLevels++;
20 }
21 
23 {
24  return _theLevels;
25 }
26 
28 {
29  return _sortedCopyNumber[level];
30 }
31 
33 {
34  for ( int iLevel = 0; iLevel < _theLevels; iLevel++ ) {
35  if ( _sortedName[iLevel] == levelName ) { return _sortedCopyNumber[iLevel]; }
36  }
37  return 0;
38 }
39 
41 {
42  return _sortedName[level];
43 }
44 
46 {
47  return _sortedName.capacity();
48 }
49 
51 {
52  _theLevels = 0;
53 }
54 
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:34
tuple level
Definition: testEve_cfg.py:34
void setSize(const int &size)
int getLevels() const
tuple size
Write out results.