![]() |
![]() |
#include <DataFormats/SiStripCommon/interface/SiStripDetKey.h>
Public Member Functions | |
const uint16_t & | apvPairNumber () const |
Returns APV pair number. | |
const uint16_t & | apvWithinPair () const |
Returns APV position within pair. | |
bool | isConsistent (const SiStripKey &) const |
"Consistent" means identical and/or null (ie, "all") data. | |
bool | isEqual (const SiStripKey &) const |
Identifies key objects with identical member data. | |
bool | isInvalid (const sistrip::Granularity &) const |
All member data to level of "Granularity" are invalid. | |
bool | isInvalid () const |
Identifies all member data as being invalid. | |
bool | isValid (const sistrip::Granularity &) const |
All member data to level of "Granularity" are valid. | |
bool | isValid () const |
Identifies all member data as being "valid" or null ("all"). | |
virtual void | print (std::stringstream &ss) const |
Print member data of the key. | |
SiStripDetKey () | |
Default constructor. | |
SiStripDetKey (const SiStripKey &) | |
Copy constructor using base class. | |
SiStripDetKey (const SiStripDetKey &) | |
Copy constructor. | |
SiStripDetKey (const std::string &directory_path) | |
Constructor using directory path. | |
SiStripDetKey (const uint32_t &det_key) | |
Constructor using 32-bit "DET key". | |
SiStripDetKey (const SiStripDetId &det_id) | |
Constructor using SiStripDetId. | |
SiStripDetKey (const DetId &det_id, const uint16_t &apv_pair_number=0, const uint16_t &apv_within_pair=0) | |
Constructor using DetId, APV pair and APV pos within pair. | |
virtual void | terse (std::stringstream &ss) const |
A terse summary of the key. | |
Private Member Functions | |
void | initFromKey () |
void | initFromPath () |
void | initFromValue () |
void | initGranularity () |
Private Attributes | |
uint16_t | apvPairNumber_ |
APV pair number [0,1-3,invalid]. | |
uint16_t | apvWithinPair_ |
APV position within pair [0,1-2,invalid]. | |
Static Private Attributes | |
static const uint16_t | tempMask_ = 0x00F |
static const uint16_t | tempOffset_ = 0 |
Definition at line 34 of file SiStripDetKey.h.
SiStripDetKey::SiStripDetKey | ( | const DetId & | det_id, | |
const uint16_t & | apv_pair_number = 0 , |
|||
const uint16_t & | apv_within_pair = 0 | |||
) |
Constructor using DetId, APV pair and APV pos within pair.
Definition at line 10 of file SiStripDetKey.cc.
References initFromKey(), initFromPath(), initFromValue(), and initGranularity().
00012 : 00013 SiStripKey(), 00014 apvPairNumber_(apv_pair_number), 00015 apvWithinPair_(apv_within_pair) 00016 { 00017 // order is important! 00018 initFromValue(); 00019 initFromKey(); 00020 initFromPath(); 00021 initGranularity(); 00022 }
SiStripDetKey::SiStripDetKey | ( | const SiStripDetId & | det_id | ) |
Constructor using SiStripDetId.
Definition at line 26 of file SiStripDetKey.cc.
References initFromKey(), initFromPath(), initFromValue(), and initGranularity().
00026 : 00027 SiStripKey(), 00028 apvPairNumber_(sistrip::invalid_), 00029 apvWithinPair_(sistrip::invalid_) 00030 { 00031 // order is important! 00032 initFromValue(); 00033 initFromKey(); 00034 initFromPath(); 00035 initGranularity(); 00036 }
SiStripDetKey::SiStripDetKey | ( | const uint32_t & | det_key | ) |
Constructor using 32-bit "DET key".
Definition at line 40 of file SiStripDetKey.cc.
References initFromKey(), initFromPath(), initFromValue(), and initGranularity().
00040 : 00041 SiStripKey(det_key), 00042 apvPairNumber_(sistrip::invalid_), 00043 apvWithinPair_(sistrip::invalid_) 00044 { 00045 // order is important! 00046 initFromKey(); 00047 initFromValue(); 00048 initFromPath(); 00049 initGranularity(); 00050 }
SiStripDetKey::SiStripDetKey | ( | const std::string & | directory_path | ) |
Constructor using directory path.
Definition at line 54 of file SiStripDetKey.cc.
References initFromKey(), initFromPath(), initFromValue(), and initGranularity().
00054 : 00055 SiStripKey(path), 00056 apvPairNumber_(sistrip::invalid_), 00057 apvWithinPair_(sistrip::invalid_) 00058 { 00059 // order is important! 00060 initFromPath(); 00061 initFromValue(); 00062 initFromKey(); 00063 initGranularity(); 00064 }
SiStripDetKey::SiStripDetKey | ( | const SiStripDetKey & | input | ) |
Copy constructor.
Definition at line 68 of file SiStripDetKey.cc.
References SiStripKey::granularity(), SiStripKey::key(), and SiStripKey::path().
00068 : 00069 SiStripKey(), 00070 apvPairNumber_(input.apvPairNumber()), 00071 apvWithinPair_(input.apvWithinPair()) 00072 { 00073 key(input.key()); 00074 path(input.path()); 00075 granularity(input.granularity()); 00076 }
SiStripDetKey::SiStripDetKey | ( | const SiStripKey & | input | ) |
Copy constructor using base class.
Definition at line 80 of file SiStripDetKey.cc.
References apvPairNumber(), apvPairNumber_, apvWithinPair(), apvWithinPair_, SiStripKey::granularity(), SiStripKey::key(), SiStripKey::path(), and pyDBSRunClass::temp.
00080 : 00081 SiStripKey(), 00082 apvPairNumber_(sistrip::invalid_), 00083 apvWithinPair_(sistrip::invalid_) 00084 { 00085 SiStripKey& temp = const_cast<SiStripKey&>(input); 00086 SiStripDetKey& det_key = dynamic_cast<SiStripDetKey&>(temp); 00087 if ( (&det_key) ) { 00088 key(det_key.key()); 00089 path(det_key.path()); 00090 granularity(det_key.granularity()); 00091 apvPairNumber_ = det_key.apvPairNumber(); 00092 apvWithinPair_ = det_key.apvWithinPair(); 00093 } 00094 }
SiStripDetKey::SiStripDetKey | ( | ) |
Default constructor.
Definition at line 98 of file SiStripDetKey.cc.
00098 : 00099 SiStripKey(), 00100 apvPairNumber_(sistrip::invalid_), 00101 apvWithinPair_(sistrip::invalid_) 00102 {;}
const uint16_t & SiStripDetKey::apvPairNumber | ( | ) | const [inline] |
Returns APV pair number.
Definition at line 134 of file SiStripDetKey.h.
References apvPairNumber_.
Referenced by SiStripDetKey().
00134 { return apvPairNumber_; }
const uint16_t & SiStripDetKey::apvWithinPair | ( | ) | const [inline] |
Returns APV position within pair.
Definition at line 135 of file SiStripDetKey.h.
References apvWithinPair_.
Referenced by SiStripDetKey().
00135 { return apvWithinPair_; }
void SiStripDetKey::initFromKey | ( | ) | [private, virtual] |
Reimplemented from SiStripKey.
Definition at line 148 of file SiStripDetKey.cc.
Referenced by SiStripDetKey().
void SiStripDetKey::initFromPath | ( | ) | [private, virtual] |
Reimplemented from SiStripKey.
Definition at line 152 of file SiStripDetKey.cc.
Referenced by SiStripDetKey().
void SiStripDetKey::initFromValue | ( | ) | [private, virtual] |
Reimplemented from SiStripKey.
Definition at line 144 of file SiStripDetKey.cc.
Referenced by SiStripDetKey().
void SiStripDetKey::initGranularity | ( | ) | [private, virtual] |
Reimplemented from SiStripKey.
Definition at line 156 of file SiStripDetKey.cc.
Referenced by SiStripDetKey().
bool SiStripDetKey::isConsistent | ( | const SiStripKey & | input | ) | const [virtual] |
"Consistent" means identical and/or null (ie, "all") data.
Reimplemented from SiStripKey.
Definition at line 114 of file SiStripDetKey.cc.
References isEqual().
00114 { 00115 return isEqual(input); 00116 }
bool SiStripDetKey::isEqual | ( | const SiStripKey & | input | ) | const [virtual] |
Identifies key objects with identical member data.
Reimplemented from SiStripKey.
Definition at line 106 of file SiStripDetKey.cc.
References pyDBSRunClass::temp.
Referenced by isConsistent().
00106 { 00107 SiStripKey& temp = const_cast<SiStripKey&>(input); 00108 if ( &dynamic_cast<SiStripDetKey&>(temp) ) { return true; } 00109 else { return false; } 00110 }
bool SiStripDetKey::isInvalid | ( | const sistrip::Granularity & | gran | ) | const [virtual] |
All member data to level of "Granularity" are invalid.
If sistrip::Granularity is "undefined", returns true.
Reimplemented from SiStripKey.
Definition at line 138 of file SiStripDetKey.cc.
bool SiStripDetKey::isInvalid | ( | ) | const [virtual] |
Identifies all member data as being invalid.
Reimplemented from SiStripKey.
Definition at line 132 of file SiStripDetKey.cc.
bool SiStripDetKey::isValid | ( | const sistrip::Granularity & | gran | ) | const [virtual] |
All member data to level of "Granularity" are valid.
If sistrip::Granularity is "undefined", returns false.
Reimplemented from SiStripKey.
Definition at line 126 of file SiStripDetKey.cc.
Identifies all member data as being "valid" or null ("all").
Reimplemented from SiStripKey.
Definition at line 120 of file SiStripDetKey.cc.
Referenced by print().
void SiStripDetKey::print | ( | std::stringstream & | ss | ) | const [virtual] |
Print member data of the key.
Reimplemented from SiStripKey.
Definition at line 160 of file SiStripDetKey.cc.
References SiStripKey::channel(), lat::endl(), SiStripKey::granularity(), SiStripEnumsAndStrings::granularity(), isValid(), SiStripKey::key(), and SiStripKey::path().
Referenced by operator<<().
00160 { 00161 ss << " [SiStripDetKey::print]" << std::endl 00162 << std::hex 00163 << " 32-bit key : 0x" 00164 << std::setfill('0') 00165 << std::setw(8) << key() << std::endl 00166 << std::setfill(' ') 00167 << std::dec 00168 << " Directory : " << path() << std::endl 00169 << " Granularity : " 00170 << SiStripEnumsAndStrings::granularity( granularity() ) << std::endl 00171 << " Channel : " << channel() << std::endl 00172 << " isValid : " << isValid(); 00173 }
virtual void SiStripDetKey::terse | ( | std::stringstream & | ss | ) | const [inline, virtual] |
A terse summary of the key.
Reimplemented from SiStripKey.
Definition at line 105 of file SiStripDetKey.h.
uint16_t SiStripDetKey::apvPairNumber_ [private] |
APV pair number [0,1-3,invalid].
Definition at line 119 of file SiStripDetKey.h.
Referenced by apvPairNumber(), and SiStripDetKey().
uint16_t SiStripDetKey::apvWithinPair_ [private] |
APV position within pair [0,1-2,invalid].
Definition at line 122 of file SiStripDetKey.h.
Referenced by apvWithinPair(), and SiStripDetKey().
const uint16_t SiStripDetKey::tempMask_ = 0x00F [static, private] |
Definition at line 128 of file SiStripDetKey.h.
const uint16_t SiStripDetKey::tempOffset_ = 0 [static, private] |
Definition at line 125 of file SiStripDetKey.h.