CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
EcalBaseNumber Class Reference

#include <EcalBaseNumber.h>

Public Member Functions

void addLevel (const std::string &name, const int &copyNumber)
 
 EcalBaseNumber ()
 
 EcalBaseNumber (const EcalBaseNumber &aBaseNumber)
 
int getCapacity ()
 
int getCopyNumber (const std::string &levelName) const
 
int getCopyNumber (int level) const
 
std::string const & getLevelName (int level) const
 
int getLevels () const
 
void reset ()
 
void reverse ()
 
void setSize (const int &size)
 
 ~EcalBaseNumber ()
 

Protected Attributes

std::vector< int > _sortedCopyNumber
 
std::vector< std::string > _sortedName
 
int _theLevels
 

Detailed Description

Author
Paolo Meridiani, INFN Roma1

Definition at line 12 of file EcalBaseNumber.h.

Constructor & Destructor Documentation

◆ EcalBaseNumber() [1/2]

EcalBaseNumber::EcalBaseNumber ( )

Definition at line 4 of file EcalBaseNumber.cc.

4 : _theLevels(0) {}

◆ EcalBaseNumber() [2/2]

EcalBaseNumber::EcalBaseNumber ( const EcalBaseNumber aBaseNumber)

Definition at line 6 of file EcalBaseNumber.cc.

7  : _sortedName(aBaseNumber._sortedName),
9  _theLevels(aBaseNumber._theLevels) {}

◆ ~EcalBaseNumber()

EcalBaseNumber::~EcalBaseNumber ( )
inline

Definition at line 16 of file EcalBaseNumber.h.

16 {}

Member Function Documentation

◆ addLevel()

void EcalBaseNumber::addLevel ( const std::string &  name,
const int &  copyNumber 
)

◆ getCapacity()

int EcalBaseNumber::getCapacity ( )

◆ getCopyNumber() [1/2]

int EcalBaseNumber::getCopyNumber ( const std::string &  levelName) const

Definition at line 26 of file EcalBaseNumber.cc.

26  {
27  for (int iLevel = 0; iLevel < _theLevels; iLevel++) {
28  if (_sortedName[iLevel] == levelName) {
29  return _sortedCopyNumber[iLevel];
30  }
31  }
32  return 0;
33 }

References _sortedCopyNumber, _sortedName, _theLevels, and fwlog::levelName().

◆ getCopyNumber() [2/2]

int EcalBaseNumber::getCopyNumber ( int  level) const

◆ getLevelName()

std::string const & EcalBaseNumber::getLevelName ( int  level) const

◆ getLevels()

int EcalBaseNumber::getLevels ( ) const

◆ reset()

void EcalBaseNumber::reset ( void  )

Definition at line 39 of file EcalBaseNumber.cc.

39 { _theLevels = 0; }

References _theLevels.

Referenced by EcalDumpGeometry::dumpTouch(), EcalTBH4BeamSD::getBaseNumber(), and ECalSD::getBaseNumber().

◆ reverse()

void EcalBaseNumber::reverse ( )

◆ setSize()

void EcalBaseNumber::setSize ( const int &  size)

Member Data Documentation

◆ _sortedCopyNumber

std::vector<int> EcalBaseNumber::_sortedCopyNumber
protected

Definition at line 32 of file EcalBaseNumber.h.

Referenced by addLevel(), getCopyNumber(), reverse(), and setSize().

◆ _sortedName

std::vector<std::string> EcalBaseNumber::_sortedName
protected

Definition at line 31 of file EcalBaseNumber.h.

Referenced by addLevel(), getCapacity(), getCopyNumber(), getLevelName(), reverse(), and setSize().

◆ _theLevels

int EcalBaseNumber::_theLevels
protected

Definition at line 33 of file EcalBaseNumber.h.

Referenced by addLevel(), getCopyNumber(), getLevels(), and reset().

personalPlayback.level
level
Definition: personalPlayback.py:22
EcalBaseNumber::_sortedCopyNumber
std::vector< int > _sortedCopyNumber
Definition: EcalBaseNumber.h:32
EcalBaseNumber::_sortedName
std::vector< std::string > _sortedName
Definition: EcalBaseNumber.h:31
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
mps_fire.end
end
Definition: mps_fire.py:242
EcalBaseNumber::_theLevels
int _theLevels
Definition: EcalBaseNumber.h:33
fwlog::levelName
const char * levelName(LogLevel)
Definition: fwLog.cc:32
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443