CMS 3D CMS Logo

SiStripBadStrip.h
Go to the documentation of this file.
1 #ifndef SiStripBadStrip_h
2 #define SiStripBadStrip_h
3 
5 
6 #include<vector>
7 #include<map>
8 #include<iostream>
9 #include<boost/cstdint.hpp>
11 
30 
31  public:
32 
33  struct data{
34  unsigned short firstStrip;
35  unsigned short range;
36  unsigned short flag;
37  };
38 
39  struct DetRegistry{
40  uint32_t detid;
41  uint32_t ibegin;
42  uint32_t iend;
43 
45 };
46 
48  public:
49  bool operator() (const DetRegistry& p,const uint32_t& i) const {return p.detid < i;}
50  };
51 
52  typedef std::vector<unsigned int> Container;
53  typedef std::vector<unsigned int>::const_iterator ContainerIterator;
54  typedef std::pair<ContainerIterator, ContainerIterator> Range;
55  typedef std::vector<DetRegistry> Registry;
56  typedef Registry::const_iterator RegistryIterator;
57  typedef Container InputVector;
58 
62  indexes=orig.indexes;
63  }
64  virtual ~SiStripBadStrip(){};
65 
66  bool put(const uint32_t& detID,const InputVector& vect){return put(detID,Range(vect.begin(),vect.end()));}
67  bool put(const uint32_t& detID,Range input);
68  const Range getRange(const uint32_t detID) const;
69  Range getRangeByPos(unsigned short pos) const;
70  void getDetIds(std::vector<uint32_t>& DetIds_) const;
71  void printSummary(std::stringstream & ss) const;
72  void printDebug(std::stringstream & ss) const;
73 
74  ContainerIterator getDataVectorBegin() const {return v_badstrips.begin();}
75  ContainerIterator getDataVectorEnd() const {return v_badstrips.end();}
76  RegistryIterator getRegistryVectorBegin() const {return indexes.begin();}
77  RegistryIterator getRegistryVectorEnd() const{return indexes.end();}
78 
79 
80  inline data decode (const unsigned int& value) const {
81  data a;
85  return a;
86  }
87 
88  inline unsigned int encode (const unsigned short& first, const unsigned short& NconsecutiveBadStrips, const unsigned short& flag=0) {
90  }
91 
92 protected:
93  Container v_badstrips;
94  Registry indexes;
95 
97 };
98 
99 #endif
unsigned short range
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_
RegistryIterator getRegistryVectorEnd() const
SiStripBadStrip(const SiStripBadStrip &orig)
static const uint32_t FirstBadStripMask_
Definition: value.py:1
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_
#define COND_SERIALIZABLE
Definition: Serializable.h:38
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