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 
12 class TrackerTopology;
13 
32 
33  public:
34 
35  struct data{
36  unsigned short firstStrip;
37  unsigned short range;
38  unsigned short flag;
39  };
40 
41  struct DetRegistry{
42  uint32_t detid;
43  uint32_t ibegin;
44  uint32_t iend;
45 
47 };
48 
50  public:
51  bool operator() (const DetRegistry& p,const uint32_t& i) const {return p.detid < i;}
52  };
53 
54  typedef std::vector<unsigned int> Container;
55  typedef std::vector<unsigned int>::const_iterator ContainerIterator;
56  typedef std::pair<ContainerIterator, ContainerIterator> Range;
57  typedef std::vector<DetRegistry> Registry;
58  typedef Registry::const_iterator RegistryIterator;
59  typedef Container InputVector;
60 
64  indexes=orig.indexes;
65  }
66  virtual ~SiStripBadStrip(){};
67 
68  bool put(const uint32_t& detID,const InputVector& vect){return put(detID,Range(vect.begin(),vect.end()));}
69  bool put(const uint32_t& detID,Range input);
70  const Range getRange(const uint32_t detID) const;
71  Range getRangeByPos(unsigned short pos) const;
72  void getDetIds(std::vector<uint32_t>& DetIds_) const;
73  void printSummary(std::stringstream & ss, const TrackerTopology* trackerTopo) const;
74  void printDebug(std::stringstream & ss, const TrackerTopology* trackerTopo) const;
75 
76  ContainerIterator getDataVectorBegin() const {return v_badstrips.begin();}
77  ContainerIterator getDataVectorEnd() const {return v_badstrips.end();}
78  RegistryIterator getRegistryVectorBegin() const {return indexes.begin();}
79  RegistryIterator getRegistryVectorEnd() const{return indexes.end();}
80 
81 
82  inline data decode (const unsigned int& value) const {
83  data a;
87  return a;
88  }
89 
90  inline unsigned int encode (const unsigned short& first, const unsigned short& NconsecutiveBadStrips, const unsigned short& flag=0) {
92  }
93 
94 protected:
95  Container v_badstrips;
96  Registry indexes;
97 
99 };
100 
101 #endif
unsigned short range
static const uint32_t FirstBadStripShift_
void getDetIds(std::vector< uint32_t > &DetIds_) const
Range getRangeByPos(unsigned short pos) const
std::vector< unsigned int >::const_iterator ContainerIterator
virtual ~SiStripBadStrip()
Registry::const_iterator RegistryIterator
void printDebug(std::stringstream &ss, const TrackerTopology *trackerTopo) const
static std::string const input
Definition: EdmProvDump.cc:45
ContainerIterator getDataVectorEnd() const
static const uint32_t RangeBadStripShift_
RegistryIterator getRegistryVectorEnd() const
SiStripBadStrip(const SiStripBadStrip &orig)
static const uint32_t FirstBadStripMask_
Definition: value.py:1
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)
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
data decode(const unsigned int &value) const
static const uint32_t FlagBadStripMask_
Container InputVector