CMS 3D CMS Logo

SiStripSummaryReader.cc
Go to the documentation of this file.
2 
4 
5 #include <iostream>
6 #include <string>
7 #include <sstream>
8 #include <cstdio>
9 #include <sys/time.h>
10 
12  : printdebug_(iConfig.getUntrackedParameter<uint32_t>("printDebug", 1)), summaryToken_(esConsumes()) {}
13 
15 
17  const auto& summary = iSetup.getData(summaryToken_);
18  edm::LogInfo("SiStripSummaryReader") << "[SiStripSummaryReader::analyze] End Reading SiStripSummary" << std::endl;
19 
20  std::vector<uint32_t> detid = summary.getDetIds();
21 
22  std::vector<std::string> userDB = summary.getUserDBContent();
23  std::stringstream ss;
24  for (size_t i = 0; i < userDB.size(); ++i)
25  ss << userDB[i] << " \n";
26 
27  if (printdebug_)
28  for (size_t id = 0; id < detid.size(); id++) {
29  ss << "\n\tdetid " << detid[id];
30  SiStripSummary::Range range = summary.getRange(detid[id]);
31 
32  size_t c = 0;
33  for (SiStripSummary::ContainerIterator it = range.first; it != range.second; ++it) {
34  ss << "\n\t\t " << userDB[c++] << " " << *it;
35  }
36  }
37  edm::LogInfo("SiStripSummaryReader") << ss.str();
38 }
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
mps_fire.i
i
Definition: mps_fire.py:428
SiStripSummaryReader.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiStripSummaryReader::SiStripSummaryReader
SiStripSummaryReader(const edm::ParameterSet &)
Definition: SiStripSummaryReader.cc:11
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripSummary::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripSummary.h:83
SiStripSummaryReader::~SiStripSummaryReader
~SiStripSummaryReader() override
Definition: SiStripSummaryReader.cc:14
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripSummary::ContainerIterator
std::vector< float >::const_iterator ContainerIterator
Definition: SiStripSummary.h:82
SiStripSummary.h
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
edm::EventSetup
Definition: EventSetup.h:58
SiStripSummaryReader::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiStripSummaryReader.cc:16
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
SiStripSummaryReader::printdebug_
uint32_t printdebug_
Definition: SiStripSummaryReader.h:28
SiStripSummaryReader::summaryToken_
edm::ESGetToken< SiStripSummary, SiStripSummaryRcd > summaryToken_
Definition: SiStripSummaryReader.h:29
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37