File indexing completed on 2024-04-06 12:02:39
0001 #ifndef SiStripDetVOff_h
0002 #define SiStripDetVOff_h
0003
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005
0006 #include <vector>
0007 #include <map>
0008 #include <iostream>
0009 #include <string>
0010 #include <cstdint>
0011
0012 class TrackerTopology;
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 class SiStripDetVOff {
0032 public:
0033 typedef std::vector<uint32_t>::iterator vOffIterator;
0034 typedef std::vector<uint32_t>::const_iterator constVoffIterator;
0035 typedef std::vector<int>::const_iterator constVboolIterator;
0036
0037
0038 static const short LVmask = 0x1;
0039 static const unsigned int LVonMask = 0xFFFFFFFE;
0040 static const short HVmask = 0x2;
0041 static const unsigned int HVonMask = 0xFFFFFFFD;
0042 static const unsigned int allOnMask = 0x03;
0043 static const unsigned int eightBitMask = 0xFFFFFFFF;
0044 static const short bitShift = 2;
0045
0046 SiStripDetVOff() {}
0047 ~SiStripDetVOff() {}
0048 SiStripDetVOff(const SiStripDetVOff& toCopy) { toCopy.getVoff(v_Voff); }
0049
0050
0051 void getVoff(std::vector<uint32_t>& vOff_) const { vOff_ = v_Voff; }
0052
0053
0054 bool put(const uint32_t DetId, const int HVoff, const int LVoff);
0055
0056
0057 bool put(std::vector<uint32_t>& DetId, std::vector<int>& HVoff, std::vector<int>& LVoff);
0058
0059 bool operator==(const SiStripDetVOff& d) const { return d.v_Voff == v_Voff; }
0060
0061 void getDetIds(std::vector<uint32_t>& DetIds_) const;
0062
0063
0064 bool IsModuleVOff(const uint32_t DetID) const;
0065
0066 bool IsModuleHVOff(const uint32_t DetID) const;
0067
0068 bool IsModuleLVOff(const uint32_t DetID) const;
0069
0070 void printDebug(std::stringstream& ss, const TrackerTopology*) const;
0071 void printSummary(std::stringstream& ss, const TrackerTopology*) const;
0072
0073
0074 int getLVoffCounts() const;
0075
0076 int getHVoffCounts() const;
0077
0078
0079 void setBits(uint32_t& enDetId, const int HVoff, const int LVoff);
0080
0081 private:
0082 std::vector<uint32_t> v_Voff;
0083
0084 COND_SERIALIZABLE;
0085 };
0086
0087 #endif