Base utility class that identifies a position within a logical structure of the strip tracker. More...
#include <SiStripKey.h>
Public Member Functions | |
const uint16_t & | channel () const |
const sistrip::Granularity & | granularity () const |
virtual bool | isConsistent (const SiStripKey &) const |
virtual bool | isEqual (const SiStripKey &) const |
virtual bool | isInvalid (const sistrip::Granularity &) const |
virtual bool | isInvalid () const |
virtual bool | isValid () const |
virtual bool | isValid (const sistrip::Granularity &) const |
const uint32_t & | key () const |
const SiStripKey & | operator= (const SiStripKey &) |
const std::string & | path () const |
virtual void | print (std::stringstream &ss) const |
SiStripKey (const SiStripKey &) | |
SiStripKey (const std::string &directory_path) | |
SiStripKey (const uint32_t &key) | |
SiStripKey () | |
virtual void | terse (std::stringstream &ss) const |
virtual | ~SiStripKey () |
Protected Member Functions | |
void | channel (const uint16_t &) |
void | granularity (const sistrip::Granularity &) |
virtual void | initFromKey () |
virtual void | initFromPath () |
virtual void | initFromValue () |
virtual void | initGranularity () |
void | key (const uint32_t &) |
void | path (const std::string &) |
Private Attributes | |
uint16_t | channel_ |
sistrip::Granularity | granularity_ |
uint32_t | key_ |
std::string | path_ |
Base utility class that identifies a position within a logical structure of the strip tracker.
Definition at line 24 of file SiStripKey.h.
SiStripKey::SiStripKey | ( | const uint32_t & | key | ) |
Constructor using 32-bit "key".
Definition at line 10 of file SiStripKey.cc.
SiStripKey::SiStripKey | ( | const std::string & | directory_path | ) |
Constructor using directory path.
Definition at line 19 of file SiStripKey.cc.
SiStripKey::SiStripKey | ( | const SiStripKey & | input | ) |
Copy constructor.
Definition at line 28 of file SiStripKey.cc.
: key_( input.key() ), path_( input.path() ), granularity_( input.granularity() ), channel_( input.channel() ) {;}
SiStripKey::SiStripKey | ( | ) |
Default constructor.
Definition at line 48 of file SiStripKey.cc.
virtual SiStripKey::~SiStripKey | ( | ) | [inline, virtual] |
const uint16_t & SiStripKey::channel | ( | ) | const [inline] |
Returns channel for key granularity.
Definition at line 129 of file SiStripKey.h.
References channel_.
Referenced by CommissioningHistosUsingDb::deviceIsPresent(), SummaryGeneratorControlView::fill(), SiStripCommissioningSource::fillCablingHistos(), SiStripDetKey::initGranularity(), SiStripFecKey::initGranularity(), SiStripFedKey::initGranularity(), isEqual(), operator=(), print(), SiStripFecKey::print(), SiStripDetKey::print(), SiStripNullKey::print(), SiStripFedKey::print(), SiStripHistoTitle::SiStripHistoTitle(), OptoScanHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), and VpspScanHistosUsingDb::update().
{ return channel_; }
void SiStripKey::channel | ( | const uint16_t & | chan | ) | [inline, protected] |
const sistrip::Granularity & SiStripKey::granularity | ( | ) | const [inline] |
Returns granularity to which key is unambiguous.
Definition at line 128 of file SiStripKey.h.
References granularity_.
Referenced by CommissioningHistograms::extractHistograms(), SiStripDetKey::initGranularity(), SiStripFecKey::initGranularity(), SiStripFedKey::initGranularity(), isEqual(), operator=(), print(), SiStripFecKey::print(), SiStripDetKey::print(), SiStripNullKey::print(), SiStripFedKey::print(), SiStripDetKey::SiStripDetKey(), SiStripFecKey::SiStripFecKey(), SiStripFedKey::SiStripFedKey(), and SiStripHistoTitle::SiStripHistoTitle().
{ return granularity_; }
void SiStripKey::granularity | ( | const sistrip::Granularity & | gran | ) | [inline, protected] |
virtual void SiStripKey::initFromKey | ( | ) | [inline, protected, virtual] |
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 97 of file SiStripKey.h.
{;}
virtual void SiStripKey::initFromPath | ( | ) | [inline, protected, virtual] |
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 98 of file SiStripKey.h.
{;}
virtual void SiStripKey::initFromValue | ( | ) | [inline, protected, virtual] |
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 96 of file SiStripKey.h.
{;}
virtual void SiStripKey::initGranularity | ( | ) | [inline, protected, virtual] |
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 99 of file SiStripKey.h.
{;}
bool SiStripKey::isConsistent | ( | const SiStripKey & | input | ) | const [virtual] |
"Consistent" means identical and/or null (ie, "all") data.
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 69 of file SiStripKey.cc.
References isEqual().
{ return isEqual(input); }
bool SiStripKey::isEqual | ( | const SiStripKey & | input | ) | const [virtual] |
Identifies key objects with identical member data.
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 57 of file SiStripKey.cc.
References channel(), channel_, granularity(), granularity_, key(), key_, path(), and path_.
Referenced by isConsistent().
{ if ( !(&input) ) { return false; } if ( key_ == input.key() && path_ == input.path() && granularity_ == input.granularity() && channel_ == input.channel() ) { return true; } else { return false; } }
bool SiStripKey::isInvalid | ( | ) | const [virtual] |
Identifies all member data as being invalid.
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 90 of file SiStripKey.cc.
References channel_, granularity_, sistrip::invalid32_, sistrip::invalid_, key_, sistrip::null_, path_, and sistrip::UNDEFINED_GRAN.
Referenced by isInvalid().
{ return ( key_ == sistrip::invalid32_ || path_ == sistrip::null_ || granularity_ == sistrip::UNDEFINED_GRAN || channel_ == sistrip::invalid_ ); }
bool SiStripKey::isInvalid | ( | const sistrip::Granularity & | gran | ) | const [virtual] |
All member data to level of "Granularity" are invalid. If sistrip::Granularity is "undefined", returns true.
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 99 of file SiStripKey.cc.
References isInvalid().
{ return isInvalid(); }
bool SiStripKey::isValid | ( | void | ) | const [virtual] |
Identifies all member data as being "valid" or null ("all").
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 75 of file SiStripKey.cc.
References channel_, granularity_, sistrip::invalid32_, sistrip::invalid_, key_, sistrip::null_, path_, and sistrip::UNDEFINED_GRAN.
Referenced by isValid().
{ return ( key_ != sistrip::invalid32_ && path_ != sistrip::null_ && granularity_ != sistrip::UNDEFINED_GRAN && channel_ != sistrip::invalid_ ); }
bool SiStripKey::isValid | ( | const sistrip::Granularity & | gran | ) | const [virtual] |
All member data to level of "Granularity" are valid. If sistrip::Granularity is "undefined", returns false.
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 84 of file SiStripKey.cc.
References isValid().
{ return isValid(); }
void SiStripKey::key | ( | const uint32_t & | key | ) | [inline, protected] |
const uint32_t & SiStripKey::key | ( | ) | const [inline] |
Returns 32-bit key.
Definition at line 126 of file SiStripKey.h.
References key_.
Referenced by FedCablingAlgorithm::analyse(), FineDelayTask::book(), LatencyTask::book(), CommissioningHistosUsingDb::buildDetInfo(), SiStripFedCablingBuilderFromDb::buildFecCablingFromDetIds(), ViewTranslator::buildMaps(), CommissioningHistosUsingDb::detInfo(), CalibrationSummaryFactory::extract(), CommissioningHistograms::extractHistograms(), SiStripCommissioningSource::fillCablingHistos(), SiStripFedKey::initFromKey(), SiStripFecKey::initFromKey(), SiStripDetKey::initFromKey(), SiStripFecKey::initFromValue(), SiStripDetKey::isConsistent(), SiStripFedKey::isConsistent(), SiStripFecKey::isConsistent(), SiStripDetKey::isEqual(), SiStripFecKey::isEqual(), isEqual(), SiStripFedKey::isEqual(), key(), SiStripFedCablingFakeESSource::make(), ConsistentWithKey::operator()(), operator<(), operator=(), print(), SiStripFecKey::print(), SiStripDetKey::print(), SiStripNullKey::print(), SiStripFedKey::print(), SiStripConfigDb::printAnalysisDescriptions(), SiStripConfigDb::printDeviceDescriptions(), SiStripDetKey::SiStripDetKey(), SiStripFecKey::SiStripFecKey(), SiStripFedKey::SiStripFedKey(), SiStripHistoTitle::SiStripHistoTitle(), PedsOnlyAnalysis::summary(), PedsFullNoiseAnalysis::summary(), VpspScanAnalysis::summary(), PedestalsAnalysis::summary(), NoiseAnalysis::summary(), OptoScanAnalysis::summary(), FastFedCablingAnalysis::summary(), FastFedCablingHistosUsingDb::update(), NoiseHistosUsingDb::update(), OptoScanHistosUsingDb::update(), PedsFullNoiseHistosUsingDb::update(), PedestalsHistosUsingDb::update(), PedsOnlyHistosUsingDb::update(), LatencyHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), VpspScanHistosUsingDb::update(), and FineDelayHistosUsingDb::update().
{ return key_; }
const SiStripKey & SiStripKey::operator= | ( | const SiStripKey & | rhs | ) |
Assignment.
Definition at line 37 of file SiStripKey.cc.
References channel(), channel_, granularity(), granularity_, key(), key_, path(), and path_.
{ if ( this == &rhs ) { return *this; } key_ = rhs.key(); path_ = rhs.path(); granularity_ = rhs.granularity(); channel_ = rhs.channel(); return *this; }
void SiStripKey::path | ( | const std::string & | path | ) | [inline, protected] |
const std::string & SiStripKey::path | ( | ) | const [inline] |
Returns directory path.
Definition at line 127 of file SiStripKey.h.
References path_.
Referenced by CommissioningHistosUsingDb::addDcuDetIds(), SiStripTFile::addDevice(), FineDelayTask::book(), LatencyTask::book(), SPYHistograms::bookFEDHistograms(), CommissioningHistograms::copyCustomInformation(), SummaryGeneratorReadoutView::fill(), SummaryGeneratorControlView::fill(), SiStripFecKey::initFromPath(), SiStripFedKey::initFromPath(), SiStripDetKey::initFromPath(), isEqual(), operator=(), path(), print(), SiStripFecKey::print(), SiStripDetKey::print(), SiStripNullKey::print(), SiStripFedKey::print(), CommissioningHistograms::runNumber(), CommissioningHistograms::runType(), SiStripDetKey::SiStripDetKey(), SiStripFecKey::SiStripFecKey(), SiStripFedKey::SiStripFedKey(), and FastFedCablingAnalysis::summary().
{ return path_; }
void SiStripKey::print | ( | std::stringstream & | ss | ) | const [virtual] |
Print member data of the key
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 105 of file SiStripKey.cc.
References channel(), granularity(), key(), and path().
Referenced by operator<<().
{ ss << " [SiStripKey::print]" << std::endl << std::hex << " 32-bit key : 0x" << std::setfill('0') << std::setw(8) << key() << std::endl << std::setfill(' ') << std::dec << " Directory : " << path() << std::endl << " Granularity : " << SiStripEnumsAndStrings::granularity( granularity() ) << std::endl << " Channel : " << channel(); }
virtual void SiStripKey::terse | ( | std::stringstream & | ss | ) | const [inline, virtual] |
A terse summary of the key
Reimplemented in SiStripDetKey, SiStripFecKey, SiStripFedKey, and SiStripNullKey.
Definition at line 90 of file SiStripKey.h.
{;}
uint16_t SiStripKey::channel_ [private] |
Channel of key granularity.
Definition at line 120 of file SiStripKey.h.
Referenced by channel(), isEqual(), isInvalid(), isValid(), and operator=().
sistrip::Granularity SiStripKey::granularity_ [private] |
Granularity to which FED key is unambiguous.
Definition at line 117 of file SiStripKey.h.
Referenced by granularity(), isEqual(), isInvalid(), isValid(), and operator=().
uint32_t SiStripKey::key_ [private] |
32-bit key.
Definition at line 111 of file SiStripKey.h.
Referenced by isEqual(), isInvalid(), isValid(), key(), and operator=().
std::string SiStripKey::path_ [private] |
Directory path.
Definition at line 114 of file SiStripKey.h.
Referenced by isEqual(), isInvalid(), isValid(), operator=(), and path().