CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripBadStrip.h
Go to the documentation of this file.
1 #ifndef SiStripBadStrip_h
2 #define SiStripBadStrip_h
3 
4 #include<vector>
5 #include<map>
6 #include<iostream>
7 #include<boost/cstdint.hpp>
9 
28 
29  public:
30 
31  struct data{
32  unsigned short firstStrip;
33  unsigned short range;
34  unsigned short flag;
35  };
36 
37  struct DetRegistry{
38  uint32_t detid;
39  uint32_t ibegin;
40  uint32_t iend;
41  };
42 
44  public:
45  bool operator() (const DetRegistry& p,const uint32_t& i) const {return p.detid < i;}
46  };
47 
48  typedef std::vector<unsigned int> Container;
49  typedef std::vector<unsigned int>::const_iterator ContainerIterator;
50  typedef std::pair<ContainerIterator, ContainerIterator> Range;
51  typedef std::vector<DetRegistry> Registry;
52  typedef Registry::const_iterator RegistryIterator;
54 
58  indexes=orig.indexes;
59  }
60  virtual ~SiStripBadStrip(){};
61 
62  bool put(const uint32_t& detID,const InputVector& vect){return put(detID,Range(vect.begin(),vect.end()));}
63  bool put(const uint32_t& detID,Range input);
64  const Range getRange(const uint32_t detID) const;
65  Range getRangeByPos(unsigned short pos) const;
66  void getDetIds(std::vector<uint32_t>& DetIds_) const;
67  void printSummary(std::stringstream & ss) const;
68  void printDebug(std::stringstream & ss) const;
69 
74 
75 
76  inline data decode (const unsigned int& value) const {
77  data a;
81  return a;
82  }
83 
84  inline unsigned int encode (const unsigned short& first, const unsigned short& NconsecutiveBadStrips, const unsigned short& flag=0) {
86  }
87 
88 protected:
91 };
92 
93 #endif
unsigned short range
int i
Definition: DBlmapReader.cc:9
static const uint32_t FirstBadStripShift_
void getDetIds(std::vector< uint32_t > &DetIds_) const
void printSummary(std::stringstream &ss) const
Range getRangeByPos(unsigned short pos) const
std::vector< unsigned int >::const_iterator ContainerIterator
virtual ~SiStripBadStrip()
Registry::const_iterator RegistryIterator
static std::string const input
Definition: EdmProvDump.cc:44
ContainerIterator getDataVectorEnd() const
static const uint32_t RangeBadStripShift_
bool operator()(const DetRegistry &p, const uint32_t &i) const
RegistryIterator getRegistryVectorEnd() const
SiStripBadStrip(const SiStripBadStrip &orig)
static const uint32_t FirstBadStripMask_
bool first
Definition: L1TdeRCT.cc:79
void printDebug(std::stringstream &ss) const
static const uint32_t RangeBadStripMask_
ContainerIterator getDataVectorBegin() const
std::vector< DetRegistry > Registry
unsigned short firstStrip
Container v_badstrips
static const uint32_t FlagBadStripShift_
std::vector< unsigned int > Container
RegistryIterator getRegistryVectorBegin() const
const Range getRange(const uint32_t detID) const
double a
Definition: hdecay.h:121
std::pair< ContainerIterator, ContainerIterator > Range
bool put(const uint32_t &detID, const InputVector &vect)
unsigned int encode(const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0)
data decode(const unsigned int &value) const
static const uint32_t FlagBadStripMask_
Container InputVector