CMS 3D CMS Logo

SiStripKey.cc
Go to the documentation of this file.
1 
5 #include <iomanip>
6 
7 // -----------------------------------------------------------------------------
8 //
9 SiStripKey::SiStripKey(const uint32_t& key)
10  : key_(key), path_(sistrip::null_), granularity_(sistrip::UNDEFINED_GRAN), channel_(sistrip::invalid_) {
11  ;
12 }
13 
14 // -----------------------------------------------------------------------------
15 //
17  : key_(sistrip::invalid32_), path_(path), granularity_(sistrip::UNDEFINED_GRAN), channel_(sistrip::invalid_) {
18  ;
19 }
20 
21 // -----------------------------------------------------------------------------
22 //
24  : key_(input.key()), path_(input.path()), granularity_(input.granularity()), channel_(input.channel()) {
25  ;
26 }
27 
28 // -----------------------------------------------------------------------------
29 //
31  if (this == &rhs) {
32  return *this;
33  }
34  key_ = rhs.key();
35  path_ = rhs.path();
36  granularity_ = rhs.granularity();
37  channel_ = rhs.channel();
38  return *this;
39 }
40 
41 // -----------------------------------------------------------------------------
42 //
44  : key_(sistrip::invalid32_),
46  granularity_(sistrip::UNDEFINED_GRAN),
47  channel_(sistrip::invalid_) {
48  ;
49 }
50 
51 // -----------------------------------------------------------------------------
52 //
53 bool SiStripKey::isEqual(const SiStripKey& input) const {
54  if (key_ == input.key() && path_ == input.path() && granularity_ == input.granularity() &&
55  channel_ == input.channel()) {
56  return true;
57  } else {
58  return false;
59  }
60 }
61 
62 // -----------------------------------------------------------------------------
63 //
64 bool SiStripKey::isConsistent(const SiStripKey& input) const { return isEqual(input); }
65 
66 // -----------------------------------------------------------------------------
67 //
68 bool SiStripKey::isValid() const {
71 }
72 
73 // -----------------------------------------------------------------------------
74 //
75 bool SiStripKey::isValid(const sistrip::Granularity& gran) const { return isValid(); }
76 
77 // -----------------------------------------------------------------------------
78 //
79 bool SiStripKey::isInvalid() const {
82 }
83 
84 // -----------------------------------------------------------------------------
85 //
86 bool SiStripKey::isInvalid(const sistrip::Granularity& gran) const { return isInvalid(); }
87 
88 // -----------------------------------------------------------------------------
89 //
90 void SiStripKey::print(std::stringstream& ss) const {
91  ss << " [SiStripKey::print]" << std::endl
92  << std::hex << " 32-bit key : 0x" << std::setfill('0') << std::setw(8) << key() << std::endl
93  << std::setfill(' ') << std::dec << " Directory : " << path() << std::endl
94  << " Granularity : " << SiStripEnumsAndStrings::granularity(granularity()) << std::endl
95  << " Channel : " << channel();
96 }
97 
98 // -----------------------------------------------------------------------------
99 //
100 std::ostream& operator<<(std::ostream& os, const SiStripKey& input) {
101  std::stringstream ss;
102  input.print(ss);
103  os << ss.str();
104  return os;
105 }
sistrip::Granularity
Granularity
Definition: ConstantsForGranularity.h:60
Constants.h
Generic constants.
sistrip::null_
static const char null_[]
Definition: Constants.h:22
SiStripKey::granularity_
sistrip::Granularity granularity_
Definition: SiStripKey.h:112
SiStripKey.h
input
static const std::string input
Definition: EdmProvDump.cc:48
SiStripKey::operator=
const SiStripKey & operator=(const SiStripKey &)
Definition: SiStripKey.cc:30
sistrip::invalid32_
static const uint32_t invalid32_
Definition: Constants.h:15
SiStripKey::path_
std::string path_
Definition: SiStripKey.h:109
SiStripKey::key
const uint32_t & key() const
Definition: SiStripKey.h:120
SiStripKey::SiStripKey
SiStripKey()
Definition: SiStripKey.cc:43
SiStripKey::isValid
virtual bool isValid() const
Definition: SiStripKey.cc:68
SiStripKey::key_
uint32_t key_
Definition: SiStripKey.h:106
SiStripKey::granularity
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:122
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripKey::print
virtual void print(std::stringstream &ss) const
Definition: SiStripKey.cc:90
SiStripKey::channel
const uint16_t & channel() const
Definition: SiStripKey.h:123
SiStripEnumsAndStrings::granularity
static std::string granularity(const sistrip::Granularity &)
Definition: SiStripEnumsAndStrings.cc:265
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripKey::channel_
uint16_t channel_
Definition: SiStripKey.h:115
SiStripKey::isConsistent
virtual bool isConsistent(const SiStripKey &) const
Definition: SiStripKey.cc:64
SiStripKey::path
const std::string & path() const
Definition: SiStripKey.h:121
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
SiStripKey::isEqual
virtual bool isEqual(const SiStripKey &) const
Definition: SiStripKey.cc:53
operator<<
std::ostream & operator<<(std::ostream &os, const SiStripKey &input)
Definition: SiStripKey.cc:100
SiStripEnumsAndStrings.h
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
sistrip
sistrip classes
Definition: SiStripQualityHelpers.h:14
path_
std::string & path_
Definition: PluginManager.cc:221
sistrip::UNDEFINED_GRAN
Definition: ConstantsForGranularity.h:61
crabWrapper.key
key
Definition: crabWrapper.py:19
SiStripKey
Base utility class that identifies a position within a logical structure of the strip tracker.
Definition: SiStripKey.h:23
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
SiStripKey::isInvalid
virtual bool isInvalid() const
Definition: SiStripKey.cc:79