#include <EcalBaseNumber.h>
Public Member Functions | |
void | addLevel (const std::string &name, const int ©Number) |
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 | setSize (const int &size) |
~EcalBaseNumber () | |
Protected Attributes | |
std::vector< int > | _sortedCopyNumber |
std::vector< std::string > | _sortedName |
int | _theLevels |
Definition at line 13 of file EcalBaseNumber.h.
EcalBaseNumber::EcalBaseNumber | ( | ) |
Definition at line 3 of file EcalBaseNumber.cc.
:_theLevels(0) { }
EcalBaseNumber::EcalBaseNumber | ( | const EcalBaseNumber & | aBaseNumber | ) |
Definition at line 5 of file EcalBaseNumber.cc.
: _sortedName(aBaseNumber._sortedName), _sortedCopyNumber(aBaseNumber._sortedCopyNumber), _theLevels(aBaseNumber._theLevels) { }
EcalBaseNumber::~EcalBaseNumber | ( | ) | [inline] |
Definition at line 18 of file EcalBaseNumber.h.
{}
void EcalBaseNumber::addLevel | ( | const std::string & | name, |
const int & | copyNumber | ||
) |
Definition at line 15 of file EcalBaseNumber.cc.
References _sortedCopyNumber, _sortedName, _theLevels, and mergeVDriftHistosByStation::name.
Referenced by ECalSD::getBaseNumber(), EcalTBH4BeamSD::getBaseNumber(), and EcalTBHodoscopeGeometryLoaderFromDDD::getDetIdForDDDNode().
{ _sortedName[_theLevels] = name; _sortedCopyNumber[_theLevels] = copyNumber; _theLevels++; }
int EcalBaseNumber::getCapacity | ( | ) |
Definition at line 45 of file EcalBaseNumber.cc.
References _sortedName.
Referenced by ECalSD::getBaseNumber(), and EcalTBH4BeamSD::getBaseNumber().
{ return _sortedName.capacity(); }
int EcalBaseNumber::getCopyNumber | ( | int | level | ) | const |
Definition at line 27 of file EcalBaseNumber.cc.
References _sortedCopyNumber, and testEve_cfg::level.
Referenced by EcalBarrelNumberingScheme::getUnitID(), EcalPreshowerNumberingScheme::getUnitID(), EcalEndcapNumberingScheme::getUnitID(), HcalTB04XtalNumberingScheme::getUnitID(), EcalHodoscopeNumberingScheme::getUnitID(), and ESTBNumberingScheme::getUnitID().
{ return _sortedCopyNumber[level]; }
int EcalBaseNumber::getCopyNumber | ( | const std::string & | levelName | ) | const |
Definition at line 32 of file EcalBaseNumber.cc.
References _sortedCopyNumber, _sortedName, and _theLevels.
{ for ( int iLevel = 0; iLevel < _theLevels; iLevel++ ) { if ( _sortedName[iLevel] == levelName ) { return _sortedCopyNumber[iLevel]; } } return 0; }
std::string const & EcalBaseNumber::getLevelName | ( | int | level | ) | const |
Definition at line 40 of file EcalBaseNumber.cc.
References _sortedName, and testEve_cfg::level.
Referenced by EcalBarrelNumberingScheme::getUnitID(), EcalPreshowerNumberingScheme::getUnitID(), EcalEndcapNumberingScheme::getUnitID(), EcalHodoscopeNumberingScheme::getUnitID(), and ESTBNumberingScheme::getUnitID().
{ return _sortedName[level]; }
int EcalBaseNumber::getLevels | ( | ) | const |
Definition at line 22 of file EcalBaseNumber.cc.
References _theLevels.
Referenced by EcalBarrelNumberingScheme::getUnitID(), EcalPreshowerNumberingScheme::getUnitID(), EcalEndcapNumberingScheme::getUnitID(), HcalTB04XtalNumberingScheme::getUnitID(), EcalHodoscopeNumberingScheme::getUnitID(), and ESTBNumberingScheme::getUnitID().
{ return _theLevels; }
void EcalBaseNumber::reset | ( | void | ) |
Definition at line 50 of file EcalBaseNumber.cc.
References _theLevels.
Referenced by ECalSD::getBaseNumber(), and EcalTBH4BeamSD::getBaseNumber().
{ _theLevels = 0; }
void EcalBaseNumber::setSize | ( | const int & | size | ) |
Definition at line 10 of file EcalBaseNumber.cc.
References _sortedCopyNumber, and _sortedName.
Referenced by ECalSD::getBaseNumber(), and EcalTBH4BeamSD::getBaseNumber().
{ _sortedName.resize(size); _sortedCopyNumber.resize(size); }
std::vector<int> EcalBaseNumber::_sortedCopyNumber [protected] |
Definition at line 33 of file EcalBaseNumber.h.
Referenced by addLevel(), getCopyNumber(), and setSize().
std::vector<std::string> EcalBaseNumber::_sortedName [protected] |
Definition at line 32 of file EcalBaseNumber.h.
Referenced by addLevel(), getCapacity(), getCopyNumber(), getLevelName(), and setSize().
int EcalBaseNumber::_theLevels [protected] |
Definition at line 34 of file EcalBaseNumber.h.
Referenced by addLevel(), getCopyNumber(), getLevels(), and reset().