CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripApvGainReader.cc
Go to the documentation of this file.
3 
5 
6 #include <iostream>
7 #include <stdio.h>
8 #include <sys/time.h>
9 
10 
11 using namespace cms;
12 
14  printdebug_(iConfig.getUntrackedParameter<uint32_t>("printDebug",1)){}
15 
17 
19 
20  edm::ESHandle<SiStripApvGain> SiStripApvGain_;
21  iSetup.get<SiStripApvGainRcd>().get(SiStripApvGain_);
22  edm::LogInfo("SiStripApvGainReader") << "[SiStripApvGainReader::analyze] End Reading SiStripApvGain" << std::endl;
23 
24  std::vector<uint32_t> detid;
25  SiStripApvGain_->getDetIds(detid);
26  edm::LogInfo("Number of detids ") << detid.size() << std::endl;
27 
28  if (printdebug_)
29  for (size_t id=0;id<detid.size() && id<printdebug_;id++)
30  {
31  SiStripApvGain::Range range=SiStripApvGain_->getRange(detid[id]);
32 
33  int apv=0;
34  for(int it=0;it<range.second-range.first;it++){
35  edm::LogInfo("SiStripApvGainReader") << "detid " << detid[id] << " \t"
36  << " apv " << apv++ << " \t"
37  << SiStripApvGain_->getApvGain(it,range) << " \t"
38  << std::endl;
39  }
40  }
41 }
std::pair< ContainerIterator, ContainerIterator > Range
void analyze(const edm::Event &, const edm::EventSetup &)
const T & get() const
Definition: EventSetup.h:55
SiStripApvGainReader(const edm::ParameterSet &)