CMS 3D CMS Logo

mySiStripNoises.h
Go to the documentation of this file.
1 #ifndef mySiStripNoises_h
2 #define mySiStripNoises_h
3 
5 
6 #include <vector>
7 #include <map>
8 #include <cstdint>
9 //#include<iostream>
10 
11 //typedef float SiStripNoise;
12 //typedef bool SiStripDisable;
13 
15 public:
18 
19  struct DetRegistry {
20  uint32_t detid;
21  uint32_t ibegin;
22  uint32_t iend;
23 
25  };
27  public:
28  bool operator()(const DetRegistry& p, const uint32_t& i) const { return p.detid < i; }
29  };
30  typedef std::vector<unsigned char> SiStripNoiseVector;
31  typedef SiStripNoiseVector::const_iterator ContainerIterator;
32  typedef std::pair<ContainerIterator, ContainerIterator> Range;
33  typedef std::vector<DetRegistry> Registry;
34  typedef Registry::const_iterator RegistryIterator;
35  typedef const std::vector<short> InputVector;
36 
37  bool put(const uint32_t detID, InputVector& input);
38  const Range getRange(const uint32_t& detID) const;
39  void getDetIds(std::vector<uint32_t>& DetIds) const;
40  float getNoise(const uint16_t& strip, const Range& range) const;
41  void setData(float noise_, std::vector<short>& vped);
42  // private:
43  //SiStripNoiseVector v_noises;
44  //Registry indexes;
45  void encode(InputVector& Vi, std::vector<unsigned char>& Vo_CHAR);
46  uint16_t decode(const uint16_t& strip, const Range& range) const;
47  std::vector<unsigned char> v_noises;
48  std::vector<DetRegistry> indexes;
49 
51 };
52 
53 #endif
static const char noise_[]
SiStripNoiseVector::const_iterator ContainerIterator
const Range getRange(const uint32_t &detID) const
Registry::const_iterator RegistryIterator
std::vector< DetRegistry > Registry
static std::string const input
Definition: EdmProvDump.cc:50
bool put(const uint32_t detID, InputVector &input)
bool operator()(const DetRegistry &p, const uint32_t &i) const
std::pair< ContainerIterator, ContainerIterator > Range
uint16_t decode(const uint16_t &strip, const Range &range) const
std::vector< DetRegistry > indexes
const std::vector< short > InputVector
std::vector< unsigned char > SiStripNoiseVector
#define COND_SERIALIZABLE
Definition: Serializable.h:39
void getDetIds(std::vector< uint32_t > &DetIds) const
void setData(float noise_, std::vector< short > &vped)
float getNoise(const uint16_t &strip, const Range &range) const
std::vector< unsigned char > v_noises
void encode(InputVector &Vi, std::vector< unsigned char > &Vo_CHAR)