CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/DataFormats/SiStripCommon/src/SiStripNullKey.cc

Go to the documentation of this file.
00001 // Last commit: $Id: SiStripNullKey.cc,v 1.4 2008/02/06 14:32:54 bainbrid Exp $
00002 
00003 #include "DataFormats/SiStripCommon/interface/SiStripNullKey.h"
00004 #include "DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h"
00005 #include <iomanip>
00006 
00007 // -----------------------------------------------------------------------------
00008 // 
00009 SiStripNullKey::SiStripNullKey() : SiStripKey() {;}
00010 
00011 // -----------------------------------------------------------------------------
00012 // 
00013 bool SiStripNullKey::isEqual( const SiStripKey& input ) const {
00014   SiStripKey& temp = const_cast<SiStripKey&>(input);
00015   if ( &dynamic_cast<SiStripNullKey&>(temp) ) { return true; }
00016   else { return false; }
00017 }
00018 
00019 // -----------------------------------------------------------------------------
00020 // 
00021 bool SiStripNullKey::isConsistent( const SiStripKey& input ) const {
00022   return isEqual(input);
00023 }
00024 
00025 // -----------------------------------------------------------------------------
00026 //
00027 bool SiStripNullKey::isValid() const { 
00028   return false;
00029 }
00030 
00031 // -----------------------------------------------------------------------------
00032 //
00033 bool SiStripNullKey::isValid( const sistrip::Granularity& gran ) const {
00034   return false; 
00035 }
00036 
00037 // -----------------------------------------------------------------------------
00038 //
00039 bool SiStripNullKey::isInvalid() const { 
00040   return true;
00041 }
00042 
00043 // -----------------------------------------------------------------------------
00044 //
00045 bool SiStripNullKey::isInvalid( const sistrip::Granularity& gran ) const {
00046   return true;
00047 }
00048 
00049 // -----------------------------------------------------------------------------
00050 // 
00051 void SiStripNullKey::initFromValue() {;}
00052 
00053 // -----------------------------------------------------------------------------
00054 //
00055 void SiStripNullKey::initFromKey() {;}
00056 
00057 // -----------------------------------------------------------------------------
00058 // 
00059 void SiStripNullKey::initFromPath() {;}
00060 
00061 // -----------------------------------------------------------------------------
00062 // 
00063 void SiStripNullKey::initGranularity() {;}
00064 
00065 // -----------------------------------------------------------------------------
00066 //
00067 void SiStripNullKey::print( std::stringstream& ss ) const {
00068   ss << " [SiStripNullKey::print]" << std::endl
00069      << std::hex
00070      << " 32-bit key  : 0x" 
00071      << std::setfill('0') 
00072      << std::setw(8) << key() << std::endl
00073      << std::setfill(' ') 
00074      << std::dec
00075      << " Directory   : " << path() << std::endl
00076      << " Granularity : "
00077      << SiStripEnumsAndStrings::granularity( granularity() ) << std::endl
00078      << " Channel     : " << channel() << std::endl
00079      << " isValid    : " << isValid();
00080 }
00081 
00082 // -----------------------------------------------------------------------------
00083 //
00084 std::ostream& operator<< ( std::ostream& os, const SiStripNullKey& input ) {
00085   std::stringstream ss;
00086   input.print(ss);
00087   os << ss.str();
00088   return os;
00089 }