CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 // Last commit: $Id: SiStripNullKey.cc,v 1.5 2012/07/04 19:04:53 eulisse 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   if ( &dynamic_cast<const SiStripNullKey&>(input) ) { return true; }
00015   else { return false; }
00016 }
00017 
00018 // -----------------------------------------------------------------------------
00019 // 
00020 bool SiStripNullKey::isConsistent( const SiStripKey& input ) const {
00021   return isEqual(input);
00022 }
00023 
00024 // -----------------------------------------------------------------------------
00025 //
00026 bool SiStripNullKey::isValid() const { 
00027   return false;
00028 }
00029 
00030 // -----------------------------------------------------------------------------
00031 //
00032 bool SiStripNullKey::isValid( const sistrip::Granularity& gran ) const {
00033   return false; 
00034 }
00035 
00036 // -----------------------------------------------------------------------------
00037 //
00038 bool SiStripNullKey::isInvalid() const { 
00039   return true;
00040 }
00041 
00042 // -----------------------------------------------------------------------------
00043 //
00044 bool SiStripNullKey::isInvalid( const sistrip::Granularity& gran ) const {
00045   return true;
00046 }
00047 
00048 // -----------------------------------------------------------------------------
00049 // 
00050 void SiStripNullKey::initFromValue() {;}
00051 
00052 // -----------------------------------------------------------------------------
00053 //
00054 void SiStripNullKey::initFromKey() {;}
00055 
00056 // -----------------------------------------------------------------------------
00057 // 
00058 void SiStripNullKey::initFromPath() {;}
00059 
00060 // -----------------------------------------------------------------------------
00061 // 
00062 void SiStripNullKey::initGranularity() {;}
00063 
00064 // -----------------------------------------------------------------------------
00065 //
00066 void SiStripNullKey::print( std::stringstream& ss ) const {
00067   ss << " [SiStripNullKey::print]" << std::endl
00068      << std::hex
00069      << " 32-bit key  : 0x" 
00070      << std::setfill('0') 
00071      << std::setw(8) << key() << std::endl
00072      << std::setfill(' ') 
00073      << std::dec
00074      << " Directory   : " << path() << std::endl
00075      << " Granularity : "
00076      << SiStripEnumsAndStrings::granularity( granularity() ) << std::endl
00077      << " Channel     : " << channel() << std::endl
00078      << " isValid    : " << isValid();
00079 }
00080 
00081 // -----------------------------------------------------------------------------
00082 //
00083 std::ostream& operator<< ( std::ostream& os, const SiStripNullKey& input ) {
00084   std::stringstream ss;
00085   input.print(ss);
00086   os << ss.str();
00087   return os;
00088 }