CMS 3D CMS Logo

SiStripSummaryReader.cc
Go to the documentation of this file.
3 
5 
6 #include <iostream>
7 #include <string>
8 #include <sstream>
9 #include <stdio.h>
10 #include <sys/time.h>
11 
13  printdebug_(iConfig.getUntrackedParameter<uint32_t>("printDebug",1)){}
14 
16 
18 
19  edm::ESHandle<SiStripSummary> SiStripSummary_;
20  iSetup.get<SiStripSummaryRcd>().get(SiStripSummary_);
21  edm::LogInfo("SiStripSummaryReader") << "[SiStripSummaryReader::analyze] End Reading SiStripSummary" << std::endl;
22 
23  std::vector<uint32_t> detid=SiStripSummary_->getDetIds();
24 
25 
26  std::vector<std::string> userDB=SiStripSummary_->getUserDBContent();
27  std::stringstream ss;
28  for(size_t i=0;i<userDB.size();++i)
29  ss<< userDB[i] << " \n";
30 
31 
32  if (printdebug_)
33  for (size_t id=0;id<detid.size();id++)
34  {
35  ss<< "\n\tdetid " << detid[id];
36  SiStripSummary::Range range=SiStripSummary_->getRange(detid[id]);
37 
38  size_t c=0;
39  for(SiStripSummary::ContainerIterator it =range.first;it!=range.second;++it){
40  ss << "\n\t\t " << userDB[c++] << " " << *it;
41  }
42  }
43  edm::LogInfo("SiStripSummaryReader") << ss.str();
44 }
std::vector< uint32_t > getDetIds() const
const Range getRange(const uint32_t &detID) const
std::pair< ContainerIterator, ContainerIterator > Range
SiStripSummaryReader(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< std::string > getUserDBContent() const
const T & get() const
Definition: EventSetup.h:55
std::vector< float >::const_iterator ContainerIterator