CMS 3D CMS Logo

SiStripThresholdReader.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 using namespace cms;
6 
8  : printdebug_(iConfig.getUntrackedParameter<uint32_t>("printDebug", 3)) {}
9 
11 
13  edm::ESHandle<SiStripThreshold> SiStripThreshold_;
14  iSetup.get<SiStripThresholdRcd>().get(SiStripThreshold_);
15  edm::LogInfo("SiStripThresholdReader") << "[SiStripThresholdReader::analyze] End Reading SiStripThreshold"
16  << std::endl;
17 
18  std::vector<uint32_t> detid;
19  SiStripThreshold_->getDetIds(detid);
20  edm::LogInfo("Number of detids ") << detid.size() << std::endl;
21  if (printdebug_)
22  for (size_t id = 0; id < detid.size() && id < printdebug_; id++) {
23  SiStripThreshold::Range range = SiStripThreshold_->getRange(detid[id]);
24 
25  //int strip=0;
26  float old_clusTh = -1, old_lowTh = -1, old_highTh = -1, old_FirstStrip = -1;
27  for (int it = 0; it < 768; it++) {
28  SiStripThreshold::Data data = SiStripThreshold_->getData(it, range);
29  std::stringstream ss;
30  data.print(ss);
31  if (old_clusTh != data.getClusth() || old_lowTh != data.getLth() || old_highTh != data.getHth() ||
32  old_FirstStrip != data.getFirstStrip()) {
33  edm::LogInfo("SiStripThresholdReader")
34  << "detid: " << detid[id] << " \t"
35  << "strip: " << it << " \t" << ss.str() << "FirstStrip_and_Hth: " << data.FirstStrip_and_Hth << " \n"
36  << std::endl;
37  old_lowTh = data.getLth();
38  old_highTh = data.getHth();
39  old_clusTh = data.getClusth();
40  old_FirstStrip = data.getFirstStrip();
41  }
42  }
43  }
44 }
SiStripThresholdReader(const edm::ParameterSet &)
SiStripThreshold::Data getData(const uint16_t &strip, const Range &range) const
uint16_t getFirstStrip() const
Namespace of DDCMS conversion namespace.
void print(std::stringstream &ss) const
std::pair< ContainerIterator, ContainerIterator > Range
void getDetIds(std::vector< uint32_t > &DetIds_) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
T get() const
Definition: EventSetup.h:73
const Range getRange(const uint32_t &detID) const
void analyze(const edm::Event &, const edm::EventSetup &) override
float getClusth() const