CMS 3D CMS Logo

SiStripDetVOff.h
Go to the documentation of this file.
1 #ifndef SiStripDetVOff_h
2 #define SiStripDetVOff_h
3 
5 
6 #include <vector>
7 #include <map>
8 #include <iostream>
9 #include <string>
10 #include <cstdint>
11 
12 class TrackerTopology;
13 
32 public:
33  typedef std::vector<uint32_t>::iterator vOffIterator;
34  typedef std::vector<uint32_t>::const_iterator constVoffIterator;
35  typedef std::vector<int>::const_iterator constVboolIterator;
36 
37  // Bitmasks used to retrieve LV and HV information
38  static const short LVmask = 0x1; // <--- 01
39  static const unsigned int LVonMask = 0xFFFFFFFE; // <--- the last 4 bits are 1110. All the other bits are 1.
40  static const short HVmask = 0x2; // <--- 10
41  static const unsigned int HVonMask = 0xFFFFFFFD; // <--- the last 4 bits are 1101. All the other bits are 1.
42  static const unsigned int allOnMask = 0x03; // <--- 2 bits are 11.
43  static const unsigned int eightBitMask = 0xFFFFFFFF;
44  static const short bitShift = 2;
45 
48  SiStripDetVOff(const SiStripDetVOff& toCopy) { toCopy.getVoff(v_Voff); }
49 
51  void getVoff(std::vector<uint32_t>& vOff_) const { vOff_ = v_Voff; }
52 
54  bool put(const uint32_t DetId, const int HVoff, const int LVoff);
55 
57  bool put(std::vector<uint32_t>& DetId, std::vector<int>& HVoff, std::vector<int>& LVoff);
58 
59  bool operator==(const SiStripDetVOff& d) const { return d.v_Voff == v_Voff; }
60 
61  void getDetIds(std::vector<uint32_t>& DetIds_) const;
62 
64  bool IsModuleVOff(const uint32_t DetID) const;
65 
66  bool IsModuleHVOff(const uint32_t DetID) const;
67 
68  bool IsModuleLVOff(const uint32_t DetID) const;
69 
70  void printDebug(std::stringstream& ss, const TrackerTopology*) const;
71  void printSummary(std::stringstream& ss, const TrackerTopology*) const;
72 
74  int getLVoffCounts() const;
76  int getHVoffCounts() const;
77 
79  void setBits(uint32_t& enDetId, const int HVoff, const int LVoff);
80 
81 private:
82  std::vector<uint32_t> v_Voff;
83 
85 };
86 
87 #endif
SiStripDetVOff::getLVoffCounts
int getLVoffCounts() const
Returns the total number of modules with LV off.
Definition: SiStripDetVOff.cc:117
TrackerTopology
Definition: TrackerTopology.h:16
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
SiStripDetVOff::setBits
void setBits(uint32_t &enDetId, const int HVoff, const int LVoff)
Changes the bits in the stored value according to on/off voltages.
Definition: SiStripDetVOff.cc:7
SiStripDetVOff::HVmask
static const short HVmask
Definition: SiStripDetVOff.h:40
SiStripDetVOff::IsModuleHVOff
bool IsModuleHVOff(const uint32_t DetID) const
Definition: SiStripDetVOff.cc:91
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
DetId
Definition: DetId.h:17
SiStripDetVOff::IsModuleVOff
bool IsModuleVOff(const uint32_t DetID) const
Returns true if either HV or LV are off.
Definition: SiStripDetVOff.cc:75
SiStripDetVOff::v_Voff
std::vector< uint32_t > v_Voff
Definition: SiStripDetVOff.h:82
SiStripDetVOff::getVoff
void getVoff(std::vector< uint32_t > &vOff_) const
Needed by the copy constructor.
Definition: SiStripDetVOff.h:51
SiStripDetVOff::vOffIterator
std::vector< uint32_t >::iterator vOffIterator
Definition: SiStripDetVOff.h:33
SiStripDetVOff::getDetIds
void getDetIds(std::vector< uint32_t > &DetIds_) const
Definition: SiStripDetVOff.cc:64
SiStripDetVOff::operator==
bool operator==(const SiStripDetVOff &d) const
Definition: SiStripDetVOff.h:59
SiStripDetVOff::printDebug
void printDebug(std::stringstream &ss, const TrackerTopology *) const
Definition: SiStripDetVOff.cc:99
SiStripDetVOff::getHVoffCounts
int getHVoffCounts() const
Returns the total number of modules with HV off.
Definition: SiStripDetVOff.cc:123
SiStripDetVOff::LVmask
static const short LVmask
Definition: SiStripDetVOff.h:38
Serializable.h
SiStripDetVOff::constVoffIterator
std::vector< uint32_t >::const_iterator constVoffIterator
Definition: SiStripDetVOff.h:34
SiStripDetVOff::put
bool put(const uint32_t DetId, const int HVoff, const int LVoff)
Insert information for a single detId.
Definition: SiStripDetVOff.cc:24
SiStripDetVOff
Definition: SiStripDetVOff.h:31
SiStripDetVOff::SiStripDetVOff
SiStripDetVOff(const SiStripDetVOff &toCopy)
Definition: SiStripDetVOff.h:48
SiStripDetVOff::constVboolIterator
std::vector< int >::const_iterator constVboolIterator
Definition: SiStripDetVOff.h:35
SiStripDetVOff::LVonMask
static const unsigned int LVonMask
Definition: SiStripDetVOff.h:39
SiStripDetVOff::SiStripDetVOff
SiStripDetVOff()
Definition: SiStripDetVOff.h:46
SiStripDetVOff::printSummary
void printSummary(std::stringstream &ss, const TrackerTopology *) const
Definition: SiStripDetVOff.cc:129
ztail.d
d
Definition: ztail.py:151
SiStripDetVOff::allOnMask
static const unsigned int allOnMask
Definition: SiStripDetVOff.h:42
SiStripDetVOff::eightBitMask
static const unsigned int eightBitMask
Definition: SiStripDetVOff.h:43
SiStripDetVOff::bitShift
static const short bitShift
Definition: SiStripDetVOff.h:44
SiStripDetVOff::HVonMask
static const unsigned int HVonMask
Definition: SiStripDetVOff.h:41
SiStripDetVOff::IsModuleLVOff
bool IsModuleLVOff(const uint32_t DetID) const
Definition: SiStripDetVOff.cc:83
SiStripDetVOff::~SiStripDetVOff
~SiStripDetVOff()
Definition: SiStripDetVOff.h:47