00001 // Last commit: $Id: SiStripNullKey.h,v 1.4 2008/02/06 14:32:48 bainbrid Exp $ 00002 00003 #ifndef DataFormats_SiStripCommon_SiStripNullKey_H 00004 #define DataFormats_SiStripCommon_SiStripNullKey_H 00005 00006 #include "DataFormats/SiStripCommon/interface/ConstantsForGranularity.h" 00007 #include "DataFormats/SiStripCommon/interface/SiStripKey.h" 00008 00009 class SiStripNullKey; 00010 00012 std::ostream& operator<< ( std::ostream&, const SiStripNullKey& ); 00013 00021 class SiStripNullKey : public SiStripKey { 00022 00023 public: 00024 00025 // ---------- Constructors ---------- 00026 00028 SiStripNullKey(); 00029 00030 // ---------- Utility methods ---------- 00031 00033 bool isEqual( const SiStripKey& ) const; 00034 00036 bool isConsistent( const SiStripKey& ) const; 00037 00039 bool isValid() const; 00040 00043 bool isValid( const sistrip::Granularity& ) const; 00044 00046 bool isInvalid() const; 00047 00050 bool isInvalid( const sistrip::Granularity& ) const; 00051 00052 // ---------- Print methods ---------- 00053 00055 virtual void print( std::stringstream& ss ) const; 00056 00058 virtual void terse( std::stringstream& ss ) const {;} 00059 00060 private: 00061 00062 // ---------- Private methods ---------- 00063 00064 void initFromValue(); 00065 void initFromKey(); 00066 void initFromPath(); 00067 void initGranularity(); 00068 00069 }; 00070 00071 #endif // DataFormats_SiStripCommon_SiStripNullKey_H 00072 00073 00074