CMS 3D CMS Logo

SiStripBadStripReader.cc
Go to the documentation of this file.
9 
10 #include <iostream>
11 #include <cstdio>
12 #include <sys/time.h>
13 
15 public:
16  explicit SiStripBadStripReader(const edm::ParameterSet& iConfig)
17  : printdebug_(iConfig.getUntrackedParameter<uint32_t>("printDebug", 1)), badStripToken_(esConsumes()) {}
18 
19  ~SiStripBadStripReader() override;
20 
21  void analyze(const edm::Event&, const edm::EventSetup&) override;
22 
23 private:
24  uint32_t printdebug_;
26 };
27 
29 
31  const auto& badStrip = iSetup.getData(badStripToken_);
32  edm::LogInfo("SiStripBadStripReader") << "[SiStripBadStripReader::analyze] End Reading SiStripBadStrip" << std::endl;
33 
34  std::vector<uint32_t> detid;
35  badStrip.getDetIds(detid);
36 
37  if (printdebug_)
38  for (size_t id = 0; id < detid.size(); id++) {
39  SiStripBadStrip::Range range = badStrip.getRange(detid[id]);
40 
41  for (int it = 0; it < range.second - range.first; it++) {
42  unsigned int value = (*(range.first + it));
43  edm::LogInfo("SiStripBadStripReader") << "detid " << detid[id] << " \t"
44  << " firstBadStrip " << badStrip.decode(value).firstStrip << "\t "
45  << " NconsecutiveBadStrips " << badStrip.decode(value).range << "\t "
46  << " flag " << badStrip.decode(value).flag << "\t "
47  << " packed integer " << std::hex << value << std::dec
48  << "\t "
49  //<< badStrip.getBadStrips(range) << " \t"
50  << std::endl;
51  }
52  }
53 }
54 
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
MessageLogger.h
EDAnalyzer.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiStripBadStrip.h
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MakerMacros.h
SiStripBadStrip::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripBadStrip.h:53
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
SiStripBadStripReader
Definition: SiStripBadStripReader.cc:14
SiStripBadStripReader::SiStripBadStripReader
SiStripBadStripReader(const edm::ParameterSet &iConfig)
Definition: SiStripBadStripReader.cc:16
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripBadStripReader::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiStripBadStripReader.cc:30
Event.h
ModuleDef.h
value
Definition: value.py:1
edm::EventSetup
Definition: EventSetup.h:58
SiStripBadStripReader::badStripToken_
edm::ESGetToken< SiStripBadStrip, SiStripBadStripRcd > badStripToken_
Definition: SiStripBadStripReader.cc:25
edm::ESGetToken< SiStripBadStrip, SiStripBadStripRcd >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
SiStripBadStripReader::~SiStripBadStripReader
~SiStripBadStripReader() override
Definition: SiStripBadStripReader.cc:28
Frameworkfwd.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
EventSetup.h
SiStripBadStripReader::printdebug_
uint32_t printdebug_
Definition: SiStripBadStripReader.cc:24
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition: EDConsumerBase.h:206
ParameterSet.h
edm::Event
Definition: Event.h:73
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
SiStripBadStripRcd.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37