CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
SiStripNullKey Class Reference

Concrete implementation of abstract base, signifying null values or an "unknown" position or view. More...

#include <SiStripNullKey.h>

Inheritance diagram for SiStripNullKey:
SiStripKey

Public Member Functions

bool isConsistent (const SiStripKey &) const override
 
bool isEqual (const SiStripKey &) const override
 
bool isInvalid () const override
 
bool isInvalid (const sistrip::Granularity &) const override
 
bool isValid () const override
 
bool isValid (const sistrip::Granularity &) const override
 
void print (std::stringstream &ss) const override
 
 SiStripNullKey ()
 
void terse (std::stringstream &ss) const override
 
- Public Member Functions inherited from SiStripKey
const uint16_t & channel () const
 
const sistrip::Granularitygranularity () const
 
const uint32_t & key () const
 
const SiStripKeyoperator= (const SiStripKey &)
 
const std::string & path () const
 
 SiStripKey ()
 
 SiStripKey (const SiStripKey &)
 
 SiStripKey (const std::string &directory_path)
 
 SiStripKey (const uint32_t &key)
 
virtual ~SiStripKey ()
 

Private Member Functions

void initFromKey () override
 
void initFromPath () override
 
void initFromValue () override
 
void initGranularity () override
 

Additional Inherited Members

- Protected Member Functions inherited from SiStripKey
void channel (const uint16_t &)
 
void granularity (const sistrip::Granularity &)
 
void key (const uint32_t &)
 
void path (const std::string &)
 

Detailed Description

Concrete implementation of abstract base, signifying null values or an "unknown" position or view.

Author
R.Bainbridge

Definition at line 20 of file SiStripNullKey.h.

Constructor & Destructor Documentation

◆ SiStripNullKey()

SiStripNullKey::SiStripNullKey ( )

Default constructor

Definition at line 8 of file SiStripNullKey.cc.

8 : SiStripKey() { ; }

Member Function Documentation

◆ initFromKey()

void SiStripNullKey::initFromKey ( )
overrideprivatevirtual

Reimplemented from SiStripKey.

Definition at line 46 of file SiStripNullKey.cc.

46 { ; }

◆ initFromPath()

void SiStripNullKey::initFromPath ( )
overrideprivatevirtual

Reimplemented from SiStripKey.

Definition at line 50 of file SiStripNullKey.cc.

50 { ; }

◆ initFromValue()

void SiStripNullKey::initFromValue ( )
overrideprivatevirtual

Reimplemented from SiStripKey.

Definition at line 42 of file SiStripNullKey.cc.

42 { ; }

◆ initGranularity()

void SiStripNullKey::initGranularity ( )
overrideprivatevirtual

Reimplemented from SiStripKey.

Definition at line 54 of file SiStripNullKey.cc.

54 { ; }

◆ isConsistent()

bool SiStripNullKey::isConsistent ( const SiStripKey input) const
overridevirtual

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

Reimplemented from SiStripKey.

Definition at line 22 of file SiStripNullKey.cc.

22 { return isEqual(input); }

References input, and isEqual().

◆ isEqual()

bool SiStripNullKey::isEqual ( const SiStripKey input) const
overridevirtual

Identifies key objects with identical member data.

Reimplemented from SiStripKey.

Definition at line 12 of file SiStripNullKey.cc.

12  {
13  if (&dynamic_cast<const SiStripNullKey&>(input)) {
14  return true;
15  } else {
16  return false;
17  }
18 }

References input.

Referenced by isConsistent().

◆ isInvalid() [1/2]

bool SiStripNullKey::isInvalid ( ) const
overridevirtual

Identifies all member data as being invalid.

Reimplemented from SiStripKey.

Definition at line 34 of file SiStripNullKey.cc.

34 { return true; }

◆ isInvalid() [2/2]

bool SiStripNullKey::isInvalid ( const sistrip::Granularity gran) const
overridevirtual

All member data to level of "Granularity" are invalid. If sistrip::Granularity is "undefined", returns true.

Reimplemented from SiStripKey.

Definition at line 38 of file SiStripNullKey.cc.

38 { return true; }

◆ isValid() [1/2]

bool SiStripNullKey::isValid ( void  ) const
overridevirtual

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

Reimplemented from SiStripKey.

Definition at line 26 of file SiStripNullKey.cc.

26 { return false; }

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

◆ isValid() [2/2]

bool SiStripNullKey::isValid ( const sistrip::Granularity gran) const
overridevirtual

All member data to level of "Granularity" are valid. If sistrip::Granularity is "undefined", returns false.

Reimplemented from SiStripKey.

Definition at line 30 of file SiStripNullKey.cc.

30 { return false; }

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

◆ print()

void SiStripNullKey::print ( std::stringstream &  ss) const
overridevirtual

Print member data of the key

Reimplemented from SiStripKey.

Definition at line 58 of file SiStripNullKey.cc.

58  {
59  ss << " [SiStripNullKey::print]" << std::endl
60  << std::hex << " 32-bit key : 0x" << std::setfill('0') << std::setw(8) << key() << std::endl
61  << std::setfill(' ') << std::dec << " Directory : " << path() << std::endl
62  << " Granularity : " << SiStripEnumsAndStrings::granularity(granularity()) << std::endl
63  << " Channel : " << channel() << std::endl
64  << " isValid : " << isValid();
65 }

References SiStripKey::channel(), TauDecayModes::dec, SiStripEnumsAndStrings::granularity(), SiStripKey::granularity(), isValid(), SiStripKey::key(), SiStripKey::path(), and contentValuesCheck::ss.

◆ terse()

void SiStripNullKey::terse ( std::stringstream &  ss) const
inlineoverridevirtual

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 55 of file SiStripNullKey.h.

55 { ; }
input
static const std::string input
Definition: EdmProvDump.cc:48
SiStripKey::key
const uint32_t & key() const
Definition: SiStripKey.h:120
SiStripKey::SiStripKey
SiStripKey()
Definition: SiStripKey.cc:43
SiStripKey::granularity
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:122
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripKey::channel
const uint16_t & channel() const
Definition: SiStripKey.h:123
SiStripEnumsAndStrings::granularity
static std::string granularity(const sistrip::Granularity &)
Definition: SiStripEnumsAndStrings.cc:265
SiStripKey::path
const std::string & path() const
Definition: SiStripKey.h:121
SiStripNullKey::isEqual
bool isEqual(const SiStripKey &) const override
Definition: SiStripNullKey.cc:12
SiStripNullKey::isValid
bool isValid() const override
Definition: SiStripNullKey.cc:26
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142