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

Constructor & Destructor Documentation

SiStripNullKey::SiStripNullKey ( )

Default constructor

Definition at line 8 of file SiStripNullKey.cc.

8 : SiStripKey() {;}

Member Function Documentation

void SiStripNullKey::initFromKey ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 53 of file SiStripNullKey.cc.

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

Reimplemented from SiStripKey.

Definition at line 57 of file SiStripNullKey.cc.

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

Reimplemented from SiStripKey.

Definition at line 49 of file SiStripNullKey.cc.

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

Reimplemented from SiStripKey.

Definition at line 61 of file SiStripNullKey.cc.

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

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

Reimplemented from SiStripKey.

Definition at line 19 of file SiStripNullKey.cc.

References isEqual().

19  {
20  return isEqual(input);
21 }
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 12 of file SiStripNullKey.cc.

Referenced by isConsistent().

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

Identifies all member data as being invalid.

Reimplemented from SiStripKey.

Definition at line 37 of file SiStripNullKey.cc.

37  {
38  return true;
39 }
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 43 of file SiStripNullKey.cc.

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

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

Reimplemented from SiStripKey.

Definition at line 25 of file SiStripNullKey.cc.

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

25  {
26  return false;
27 }
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 31 of file SiStripNullKey.cc.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

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

Print member data of the key

Reimplemented from SiStripKey.

Definition at line 65 of file SiStripNullKey.cc.

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

Referenced by operator<<().

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

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 57 of file SiStripNullKey.h.

57 {;}