CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
bool isEqual (const SiStripKey &) const
 
bool isInvalid () const
 
bool isInvalid (const sistrip::Granularity &) const
 
bool isValid () const
 
bool isValid (const sistrip::Granularity &) const
 
virtual void print (std::stringstream &ss) const
 
 SiStripNullKey ()
 
virtual void terse (std::stringstream &ss) const
 
- 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 (const uint32_t &key)
 
 SiStripKey (const std::string &directory_path)
 
 SiStripKey (const SiStripKey &)
 
 SiStripKey ()
 
virtual ~SiStripKey ()
 

Private Member Functions

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

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 21 of file SiStripNullKey.h.

Constructor & Destructor Documentation

SiStripNullKey::SiStripNullKey ( )

Default constructor

Definition at line 9 of file SiStripNullKey.cc.

9 : SiStripKey() {;}

Member Function Documentation

void SiStripNullKey::initFromKey ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 54 of file SiStripNullKey.cc.

54 {;}
void SiStripNullKey::initFromPath ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 58 of file SiStripNullKey.cc.

58 {;}
void SiStripNullKey::initFromValue ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 50 of file SiStripNullKey.cc.

50 {;}
void SiStripNullKey::initGranularity ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 62 of file SiStripNullKey.cc.

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

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

Reimplemented from SiStripKey.

Definition at line 20 of file SiStripNullKey.cc.

References isEqual().

20  {
21  return isEqual(input);
22 }
bool isEqual(const SiStripKey &) const
bool SiStripNullKey::isEqual ( const SiStripKey input) const
virtual

Identifies key objects with identical member data.

Reimplemented from SiStripKey.

Definition at line 13 of file SiStripNullKey.cc.

Referenced by isConsistent().

13  {
14  if ( &dynamic_cast<const SiStripNullKey&>(input) ) { return true; }
15  else { return false; }
16 }
bool SiStripNullKey::isInvalid ( ) const
virtual

Identifies all member data as being invalid.

Reimplemented from SiStripKey.

Definition at line 38 of file SiStripNullKey.cc.

38  {
39  return true;
40 }
bool SiStripNullKey::isInvalid ( const sistrip::Granularity gran) const
virtual

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

Reimplemented from SiStripKey.

Definition at line 44 of file SiStripNullKey.cc.

44  {
45  return true;
46 }
bool SiStripNullKey::isValid ( void  ) const
virtual

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

Reimplemented from SiStripKey.

Definition at line 26 of file SiStripNullKey.cc.

Referenced by print().

26  {
27  return false;
28 }
bool SiStripNullKey::isValid ( const sistrip::Granularity gran) const
virtual

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

Reimplemented from SiStripKey.

Definition at line 32 of file SiStripNullKey.cc.

32  {
33  return false;
34 }
void SiStripNullKey::print ( std::stringstream &  ss) const
virtual

Print member data of the key

Reimplemented from SiStripKey.

Definition at line 66 of file SiStripNullKey.cc.

References SiStripKey::channel(), SiStripEnumsAndStrings::granularity(), SiStripKey::granularity(), isValid(), SiStripKey::key(), and SiStripKey::path().

Referenced by operator<<().

66  {
67  ss << " [SiStripNullKey::print]" << std::endl
68  << std::hex
69  << " 32-bit key : 0x"
70  << std::setfill('0')
71  << std::setw(8) << key() << std::endl
72  << std::setfill(' ')
73  << std::dec
74  << " Directory : " << path() << std::endl
75  << " Granularity : "
77  << " Channel : " << channel() << std::endl
78  << " isValid : " << isValid();
79 }
static std::string granularity(const sistrip::Granularity &)
const uint32_t & key() const
Definition: SiStripKey.h:126
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:128
const std::string & path() const
Definition: SiStripKey.h:127
bool isValid() const
const uint16_t & channel() const
Definition: SiStripKey.h:129
virtual void SiStripNullKey::terse ( std::stringstream &  ss) const
inlinevirtual

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 58 of file SiStripNullKey.h.

58 {;}