CMS 3D CMS Logo

SiStripPedestals.h
Go to the documentation of this file.
1 #ifndef SiStripPedestals_h
2 #define SiStripPedestals_h
3 
5 
6 #include <vector>
7 #include <map>
8 #include <iostream>
9 
10 // #include "CondFormats/SiStripObjects/interface/SiStripBaseObject.h"
12 #include <cstdint>
13 
26 // class SiStripPedestals : public SiStripBaseObject
28 public:
29  /*
30  struct DecodingStructure{
31  unsigned int lth :6;
32  unsigned int hth :6;
33  unsigned int ped :10;
34  };*/
35 
36  struct DetRegistry {
37  uint32_t detid;
38  uint32_t ibegin;
39  uint32_t iend;
40 
42  };
43 
45  public:
46  bool operator()(const DetRegistry& p, const uint32_t& i) const { return p.detid < i; }
47  };
48 
49  typedef std::vector<char> Container;
50  typedef std::vector<char>::const_iterator ContainerIterator;
51  typedef std::pair<ContainerIterator, ContainerIterator> Range;
52  typedef std::vector<DetRegistry> Registry;
53  typedef Registry::const_iterator RegistryIterator;
54  typedef std::vector<uint16_t> InputVector;
55 
58 
59  //bool put(const uint32_t& detID,Range input);
60  bool put(const uint32_t& detID, InputVector& input);
61  const Range getRange(const uint32_t& detID) const;
62  void getDetIds(std::vector<uint32_t>& DetIds_) const;
63 
64  ContainerIterator getDataVectorBegin() const { return v_pedestals.begin(); }
66  RegistryIterator getRegistryVectorBegin() const { return indexes.begin(); }
67  RegistryIterator getRegistryVectorEnd() const { return indexes.end(); }
68 
69  void setData(float ped, InputVector& vped);
70  float getPed(const uint16_t& strip, const Range& range) const;
71  void allPeds(std::vector<int>& pefs, const Range& range) const;
72 
74  void printSummary(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
76  void printDebug(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
77 
78 private:
79  void encode(InputVector& Vi, std::vector<unsigned char>& Vo_CHAR);
80  uint16_t decode(const uint16_t& strip, const Range& range) const;
81  inline uint16_t get10bits(const uint8_t*& ptr, int8_t skip) const;
82 
83  Container v_pedestals; //@@@ blob streaming doesn't work with uint16_t and with SiStripData::Data
85 
87 };
88 
89 #endif
SiStripPedestals::DetRegistry::iend
uint32_t iend
Definition: SiStripPedestals.h:39
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
mps_fire.i
i
Definition: mps_fire.py:428
SiStripDetSummary.h
input
static const std::string input
Definition: EdmProvDump.cc:48
SiStripPedestals::Container
std::vector< char > Container
Definition: SiStripPedestals.h:49
SiStripPedestals::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripPedestals.h:51
SiStripPedestals::put
bool put(const uint32_t &detID, InputVector &input)
Definition: SiStripPedestals.cc:5
SiStripPedestals::getDetIds
void getDetIds(std::vector< uint32_t > &DetIds_) const
Definition: SiStripPedestals.cc:38
TrackerTopology
Definition: TrackerTopology.h:16
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SiStripPedestals::setData
void setData(float ped, InputVector &vped)
Definition: SiStripPedestals.cc:47
SiStripPedestals::RegistryIterator
Registry::const_iterator RegistryIterator
Definition: SiStripPedestals.h:53
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
SiStripPedestals::~SiStripPedestals
~SiStripPedestals()
Definition: SiStripPedestals.h:57
SiStripPedestals::ContainerIterator
std::vector< char >::const_iterator ContainerIterator
Definition: SiStripPedestals.h:50
SiStripPedestals::DetRegistry::detid
uint32_t detid
Definition: SiStripPedestals.h:37
SiStripPedestals::v_pedestals
Container v_pedestals
Definition: SiStripPedestals.h:83
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
optionsL1T.skip
skip
Definition: optionsL1T.py:30
SiStripPedestals::DetRegistry::ibegin
uint32_t ibegin
Definition: SiStripPedestals.h:38
SiStripPedestals::allPeds
void allPeds(std::vector< int > &pefs, const Range &range) const
Definition: SiStripPedestals.cc:143
SiStripPedestals::getDataVectorBegin
ContainerIterator getDataVectorBegin() const
Definition: SiStripPedestals.h:64
SiStripPedestals::getRange
const Range getRange(const uint32_t &detID) const
Definition: SiStripPedestals.cc:28
SiStripPedestals::indexes
Registry indexes
Definition: SiStripPedestals.h:84
SiStripPedestals::getDataVectorEnd
ContainerIterator getDataVectorEnd() const
Definition: SiStripPedestals.h:65
SiStripPedestals::Registry
std::vector< DetRegistry > Registry
Definition: SiStripPedestals.h:52
Serializable.h
SiStripPedestals::getRegistryVectorBegin
RegistryIterator getRegistryVectorBegin() const
Definition: SiStripPedestals.h:66
SiStripPedestals::encode
void encode(InputVector &Vi, std::vector< unsigned char > &Vo_CHAR)
Definition: SiStripPedestals.cc:59
SiStripPedestals::get10bits
uint16_t get10bits(const uint8_t *&ptr, int8_t skip) const
Definition: SiStripPedestals.cc:135
SiStripPedestals::SiStripPedestals
SiStripPedestals()
Definition: SiStripPedestals.h:56
SiStripPedestals::printDebug
void printDebug(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints all pedestals.
Definition: SiStripPedestals.cc:185
SiStripPedestals::decode
uint16_t decode(const uint16_t &strip, const Range &range) const
Definition: SiStripPedestals.cc:101
SiStripPedestals::DetRegistry
Definition: SiStripPedestals.h:36
SiStripPedestals::StrictWeakOrdering::operator()
bool operator()(const DetRegistry &p, const uint32_t &i) const
Definition: SiStripPedestals.h:46
SiStripPedestals::StrictWeakOrdering
Definition: SiStripPedestals.h:44
SiStripPedestals::InputVector
std::vector< uint16_t > InputVector
Definition: SiStripPedestals.h:54
SiStripPedestals
Definition: SiStripPedestals.h:27
SiStripPedestals::getPed
float getPed(const uint16_t &strip, const Range &range) const
Definition: SiStripPedestals.cc:51
SiStripPedestals::getRegistryVectorEnd
RegistryIterator getRegistryVectorEnd() const
Definition: SiStripPedestals.h:67
SiStripPedestals::printSummary
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints mean pedestal value divided for subdet, layer and mono/stereo.
Definition: SiStripPedestals.cc:171