Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74

#include "DataFormats/SiStripCommon/interface/SiStripNullKey.h"
#include "DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h"
#include <iomanip>

// -----------------------------------------------------------------------------
//
SiStripNullKey::SiStripNullKey() : SiStripKey() { ; }

// -----------------------------------------------------------------------------
//
bool SiStripNullKey::isEqual(const SiStripKey& input) const {
  if (&dynamic_cast<const SiStripNullKey&>(input)) {
    return true;
  } else {
    return false;
  }
}

// -----------------------------------------------------------------------------
//
bool SiStripNullKey::isConsistent(const SiStripKey& input) const { return isEqual(input); }

// -----------------------------------------------------------------------------
//
bool SiStripNullKey::isValid() const { return false; }

// -----------------------------------------------------------------------------
//
bool SiStripNullKey::isValid(const sistrip::Granularity& gran) const { return false; }

// -----------------------------------------------------------------------------
//
bool SiStripNullKey::isInvalid() const { return true; }

// -----------------------------------------------------------------------------
//
bool SiStripNullKey::isInvalid(const sistrip::Granularity& gran) const { return true; }

// -----------------------------------------------------------------------------
//
void SiStripNullKey::initFromValue() { ; }

// -----------------------------------------------------------------------------
//
void SiStripNullKey::initFromKey() { ; }

// -----------------------------------------------------------------------------
//
void SiStripNullKey::initFromPath() { ; }

// -----------------------------------------------------------------------------
//
void SiStripNullKey::initGranularity() { ; }

// -----------------------------------------------------------------------------
//
void SiStripNullKey::print(std::stringstream& ss) const {
  ss << " [SiStripNullKey::print]" << std::endl
     << std::hex << " 32-bit key  : 0x" << std::setfill('0') << std::setw(8) << key() << std::endl
     << std::setfill(' ') << std::dec << " Directory   : " << path() << std::endl
     << " Granularity : " << SiStripEnumsAndStrings::granularity(granularity()) << std::endl
     << " Channel     : " << channel() << std::endl
     << " isValid    : " << isValid();
}

// -----------------------------------------------------------------------------
//
std::ostream& operator<<(std::ostream& os, const SiStripNullKey& input) {
  std::stringstream ss;
  input.print(ss);
  os << ss.str();
  return os;
}