CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
SiStripKey Class Reference

Base utility class that identifies a position within a logical structure of the strip tracker. More...

#include <SiStripKey.h>

Inheritance diagram for SiStripKey:
SiStripDetKey SiStripFecKey SiStripFedKey SiStripNullKey

Public Member Functions

const uint16_t & channel () const
 
const sistrip::Granularitygranularity () const
 
virtual bool isConsistent (const SiStripKey &) const
 
virtual bool isEqual (const SiStripKey &) const
 
virtual bool isInvalid () const
 
virtual bool isInvalid (const sistrip::Granularity &) const
 
virtual bool isValid () const
 
virtual bool isValid (const sistrip::Granularity &) const
 
const uint32_t & key () const
 
const SiStripKeyoperator= (const SiStripKey &)
 
const std::string & path () const
 
virtual void print (std::stringstream &ss) const
 
 SiStripKey (const uint32_t &key)
 
 SiStripKey (const std::string &directory_path)
 
 SiStripKey (const SiStripKey &)
 
 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_
 

Detailed Description

Base utility class that identifies a position within a logical structure of the strip tracker.

Author
R.Bainbridge

Definition at line 23 of file SiStripKey.h.

Constructor & Destructor Documentation

SiStripKey::SiStripKey ( const uint32_t &  key)

Constructor using 32-bit "key".

Definition at line 9 of file SiStripKey.cc.

11  ;
12 }
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
const uint32_t & key() const
Definition: SiStripKey.h:120
std::string path_
Definition: SiStripKey.h:109
uint32_t key_
Definition: SiStripKey.h:106
static const uint16_t invalid_
Definition: Constants.h:16
uint16_t channel_
Definition: SiStripKey.h:115
static const char null_[]
Definition: Constants.h:22
SiStripKey::SiStripKey ( const std::string &  directory_path)

Constructor using directory path.

Definition at line 16 of file SiStripKey.cc.

18  ;
19 }
static const uint32_t invalid32_
Definition: Constants.h:15
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
std::string path_
Definition: SiStripKey.h:109
const std::string & path() const
Definition: SiStripKey.h:121
uint32_t key_
Definition: SiStripKey.h:106
static const uint16_t invalid_
Definition: Constants.h:16
uint16_t channel_
Definition: SiStripKey.h:115
SiStripKey::SiStripKey ( const SiStripKey input)

Copy constructor.

Definition at line 23 of file SiStripKey.cc.

24  : key_(input.key()), path_(input.path()), granularity_(input.granularity()), channel_(input.channel()) {
25  ;
26 }
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
const uint32_t & key() const
Definition: SiStripKey.h:120
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:122
std::string path_
Definition: SiStripKey.h:109
const std::string & path() const
Definition: SiStripKey.h:121
uint32_t key_
Definition: SiStripKey.h:106
const uint16_t & channel() const
Definition: SiStripKey.h:123
uint16_t channel_
Definition: SiStripKey.h:115
SiStripKey::SiStripKey ( )

Default constructor.

Definition at line 43 of file SiStripKey.cc.

48  ;
49 }
static const uint32_t invalid32_
Definition: Constants.h:15
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
std::string path_
Definition: SiStripKey.h:109
uint32_t key_
Definition: SiStripKey.h:106
static const uint16_t invalid_
Definition: Constants.h:16
uint16_t channel_
Definition: SiStripKey.h:115
static const char null_[]
Definition: Constants.h:22
virtual SiStripKey::~SiStripKey ( )
inlinevirtual

Virtual destructor.

Definition at line 43 of file SiStripKey.h.

43 { ; }

Member Function Documentation

const uint16_t & SiStripKey::channel ( ) const
inline
void SiStripKey::channel ( const uint16_t &  chan)
inlineprotected

Definition at line 128 of file SiStripKey.h.

References officialStyle::chan, and channel_.

128 { channel_ = chan; }
tuple chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, &quot;NDC&quot;) lumi.SetBorderSize( 0 ) lumi...
uint16_t channel_
Definition: SiStripKey.h:115
const sistrip::Granularity & SiStripKey::granularity ( ) const
inline
void SiStripKey::granularity ( const sistrip::Granularity gran)
inlineprotected

Definition at line 127 of file SiStripKey.h.

References granularity_.

127 { granularity_ = gran; }
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
virtual void SiStripKey::initFromKey ( )
inlineprotectedvirtual

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 93 of file SiStripKey.h.

93 { ; }
virtual void SiStripKey::initFromPath ( )
inlineprotectedvirtual

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 94 of file SiStripKey.h.

94 { ; }
virtual void SiStripKey::initFromValue ( )
inlineprotectedvirtual

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 92 of file SiStripKey.h.

92 { ; }
virtual void SiStripKey::initGranularity ( )
inlineprotectedvirtual

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 95 of file SiStripKey.h.

95 { ; }
bool SiStripKey::isConsistent ( const SiStripKey input) const
virtual

"Consistent" means identical and/or null (ie, "all") data.

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 64 of file SiStripKey.cc.

References isEqual().

64 { return isEqual(input); }
virtual bool isEqual(const SiStripKey &) const
Definition: SiStripKey.cc:53
bool SiStripKey::isEqual ( const SiStripKey input) const
virtual

Identifies key objects with identical member data.

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 53 of file SiStripKey.cc.

References channel(), channel_, granularity(), granularity_, key(), key_, path(), and path_.

Referenced by isConsistent().

53  {
54  if (key_ == input.key() && path_ == input.path() && granularity_ == input.granularity() &&
55  channel_ == input.channel()) {
56  return true;
57  } else {
58  return false;
59  }
60 }
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
const uint32_t & key() const
Definition: SiStripKey.h:120
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:122
std::string path_
Definition: SiStripKey.h:109
const std::string & path() const
Definition: SiStripKey.h:121
uint32_t key_
Definition: SiStripKey.h:106
const uint16_t & channel() const
Definition: SiStripKey.h:123
uint16_t channel_
Definition: SiStripKey.h:115
bool SiStripKey::isInvalid ( ) const
virtual

Identifies all member data as being invalid.

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 79 of file SiStripKey.cc.

References channel_, granularity_, sistrip::invalid32_, sistrip::invalid_, key_, sistrip::null_, path_, and sistrip::UNDEFINED_GRAN.

Referenced by isInvalid().

79  {
82 }
static const uint32_t invalid32_
Definition: Constants.h:15
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
std::string path_
Definition: SiStripKey.h:109
uint32_t key_
Definition: SiStripKey.h:106
static const uint16_t invalid_
Definition: Constants.h:16
uint16_t channel_
Definition: SiStripKey.h:115
static const char null_[]
Definition: Constants.h:22
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 SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 86 of file SiStripKey.cc.

References isInvalid().

86 { return isInvalid(); }
virtual bool isInvalid() const
Definition: SiStripKey.cc:79
bool SiStripKey::isValid ( void  ) const
virtual

Identifies all member data as being "valid" or null ("all").

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 68 of file SiStripKey.cc.

References channel_, granularity_, sistrip::invalid32_, sistrip::invalid_, key_, sistrip::null_, path_, and sistrip::UNDEFINED_GRAN.

Referenced by ntupleDataFormat._Object::_checkIsValid(), isValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

68  {
71 }
static const uint32_t invalid32_
Definition: Constants.h:15
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
std::string path_
Definition: SiStripKey.h:109
uint32_t key_
Definition: SiStripKey.h:106
static const uint16_t invalid_
Definition: Constants.h:16
uint16_t channel_
Definition: SiStripKey.h:115
static const char null_[]
Definition: Constants.h:22
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 SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 75 of file SiStripKey.cc.

References isValid().

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

75 { return isValid(); }
virtual bool isValid() const
Definition: SiStripKey.cc:68
const uint32_t & SiStripKey::key ( ) const
inline

Returns 32-bit key.

Definition at line 120 of file SiStripKey.h.

References key_.

Referenced by FedCablingAlgorithm::analyse(), FineDelayTask::book(), LatencyTask::book(), CommissioningHistosUsingDb::buildDetInfo(), SiStripFedCablingBuilderFromDb::buildFecCablingFromDetIds(), ViewTranslator::buildMaps(), CommissioningHistosUsingDb::detInfo(), CalibrationScanSummaryFactory::extract(), CalibrationSummaryFactory::extract(), CommissioningHistograms::extractHistograms(), SiStripCommissioningSource::fillCablingHistos(), SiStripDetKey::initFromKey(), SiStripFecKey::initFromKey(), SiStripFedKey::initFromKey(), SiStripFecKey::initFromValue(), SiStripDetKey::isConsistent(), SiStripFecKey::isConsistent(), SiStripFedKey::isConsistent(), isEqual(), SiStripDetKey::isEqual(), SiStripFecKey::isEqual(), SiStripFedKey::isEqual(), key(), SiStripFedCablingFakeESSource::make(), ConsistentWithKey::operator()(), operator<(), operator=(), SiStripNullKey::print(), print(), SiStripDetKey::print(), SiStripFecKey::print(), SiStripFedKey::print(), SiStripConfigDb::printAnalysisDescriptions(), SiStripConfigDb::printDeviceDescriptions(), SiStripDetKey::SiStripDetKey(), SiStripFecKey::SiStripFecKey(), SiStripFedKey::SiStripFedKey(), SiStripHistoTitle::SiStripHistoTitle(), PedsOnlyAnalysis::summary(), VpspScanAnalysis::summary(), NoiseAnalysis::summary(), PedestalsAnalysis::summary(), OptoScanAnalysis::summary(), DaqScopeModeAnalysis::summary(), FastFedCablingAnalysis::summary(), PedsFullNoiseAnalysis::summary(), DaqScopeModeHistosUsingDb::update(), OptoScanHistosUsingDb::update(), PedsOnlyHistosUsingDb::update(), ApvTimingHistosUsingDb::update(), VpspScanHistosUsingDb::update(), PedsFullNoiseHistosUsingDb::update(), PedestalsHistosUsingDb::update(), NoiseHistosUsingDb::update(), LatencyHistosUsingDb::update(), FastFedCablingHistosUsingDb::update(), CalibrationHistosUsingDb::update(), and FineDelayHistosUsingDb::update().

120 { return key_; }
uint32_t key_
Definition: SiStripKey.h:106
void SiStripKey::key ( const uint32_t &  key)
inlineprotected

Definition at line 125 of file SiStripKey.h.

References key(), and key_.

125 { key_ = key; }
const uint32_t & key() const
Definition: SiStripKey.h:120
uint32_t key_
Definition: SiStripKey.h:106
const SiStripKey & SiStripKey::operator= ( const SiStripKey rhs)

Assignment.

Definition at line 30 of file SiStripKey.cc.

References channel(), channel_, granularity(), granularity_, key(), key_, path(), and path_.

30  {
31  if (this == &rhs) {
32  return *this;
33  }
34  key_ = rhs.key();
35  path_ = rhs.path();
36  granularity_ = rhs.granularity();
37  channel_ = rhs.channel();
38  return *this;
39 }
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
const uint32_t & key() const
Definition: SiStripKey.h:120
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:122
std::string path_
Definition: SiStripKey.h:109
const std::string & path() const
Definition: SiStripKey.h:121
uint32_t key_
Definition: SiStripKey.h:106
const uint16_t & channel() const
Definition: SiStripKey.h:123
uint16_t channel_
Definition: SiStripKey.h:115
const std::string & SiStripKey::path ( ) const
inline
void SiStripKey::path ( const std::string &  path)
inlineprotected

Definition at line 126 of file SiStripKey.h.

References path(), and path_.

126 { path_ = path; }
std::string path_
Definition: SiStripKey.h:109
const std::string & path() const
Definition: SiStripKey.h:121
void SiStripKey::print ( std::stringstream &  ss) const
virtual

Print member data of the key

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 90 of file SiStripKey.cc.

References channel(), TauDecayModes::dec, SiStripEnumsAndStrings::granularity(), granularity(), key(), and path().

Referenced by operator<<().

90  {
91  ss << " [SiStripKey::print]" << std::endl
92  << std::hex << " 32-bit key : 0x" << std::setfill('0') << std::setw(8) << key() << std::endl
93  << std::setfill(' ') << std::dec << " Directory : " << path() << std::endl
94  << " Granularity : " << SiStripEnumsAndStrings::granularity(granularity()) << std::endl
95  << " Channel : " << channel();
96 }
static std::string granularity(const sistrip::Granularity &)
const uint32_t & key() const
Definition: SiStripKey.h:120
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:122
const std::string & path() const
Definition: SiStripKey.h:121
const uint16_t & channel() const
Definition: SiStripKey.h:123
virtual void SiStripKey::terse ( std::stringstream &  ss) const
inlinevirtual

A terse summary of the key

Reimplemented in SiStripFedKey, SiStripFecKey, SiStripDetKey, and SiStripNullKey.

Definition at line 87 of file SiStripKey.h.

87 { ; }

Member Data Documentation

uint16_t SiStripKey::channel_
private

Channel of key granularity.

Definition at line 115 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 112 of file SiStripKey.h.

Referenced by granularity(), isEqual(), isInvalid(), isValid(), and operator=().

uint32_t SiStripKey::key_
private

32-bit key.

Definition at line 106 of file SiStripKey.h.

Referenced by isEqual(), isInvalid(), isValid(), key(), and operator=().

std::string SiStripKey::path_
private

Directory path.

Definition at line 109 of file SiStripKey.h.

Referenced by isEqual(), isInvalid(), isValid(), operator=(), and path().