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 
14  edm::ESHandle<SiStripThreshold> SiStripThreshold_;
15  iSetup.get<SiStripThresholdRcd>().get(SiStripThreshold_);
16  edm::LogInfo("SiStripThresholdReader") << "[SiStripThresholdReader::analyze] End Reading SiStripThreshold" << 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  {
24  SiStripThreshold::Range range=SiStripThreshold_->getRange(detid[id]);
25 
26  //int strip=0;
27  float old_clusTh=-1,old_lowTh=-1, old_highTh=-1, old_FirstStrip=-1;
28  for(int it=0;it<768;it++){
29  SiStripThreshold::Data data=SiStripThreshold_->getData(it,range);
30  std::stringstream ss;
31  data.print(ss);
32  if (old_clusTh!=data.getClusth() || old_lowTh!=data.getLth() || old_highTh!=data.getHth() || old_FirstStrip!=data.getFirstStrip()){
33  edm::LogInfo("SiStripThresholdReader") << "detid: " << detid[id] << " \t"
34  << "strip: " << it << " \t"
35  << ss.str()
36  << "FirstStrip_and_Hth: " << data.FirstStrip_and_Hth << " \n"
37  << std::endl;
38  old_lowTh=data.getLth();
39  old_highTh=data.getHth();
40  old_clusTh=data.getClusth();
41  old_FirstStrip=data.getFirstStrip();
42  }
43  }
44  }
45 }
46 
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:82
T get() const
Definition: EventSetup.h:62
const Range getRange(const uint32_t &detID) const
void analyze(const edm::Event &, const edm::EventSetup &) override
float getClusth() const