CMS 3D CMS Logo

SiStripDetVOffReader.cc
Go to the documentation of this file.
2 
4 
5 #include <iostream>
6 #include <cstdio>
7 #include <sys/time.h>
8 
10  : printdebug_(iConfig.getUntrackedParameter<bool>("printDebug", true)), detVOffToken_(esConsumes()) {}
11 
13 
15  const auto& detVOff = iSetup.getData(detVOffToken_);
16  edm::LogInfo("SiStripDetVOffReader") << "[SiStripDetVOffReader::analyze] End Reading SiStripDetVOff" << std::endl;
17 
18  // put here a vector of DetIds to compare
19  // Here we just take the vector with all modules that have HV OFF
20 
21  // replace this code, with Your own detids
22  std::vector<uint32_t> detid;
23  detVOff.getDetIds(detid);
24  //
25 
26  if (printdebug_) {
27  for (uint32_t id = 0; id <= detid.size(); id++) {
28  bool hvflag = detVOff.IsModuleHVOff(detid[id]);
29  bool lvflag = detVOff.IsModuleLVOff(detid[id]);
30  bool vflag = detVOff.IsModuleVOff(detid[id]);
31  if (hvflag == true) {
32  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " HV\t OFF\n";
33  } else {
34  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " HV\t ON\n";
35  }
36  if (lvflag == true) {
37  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " LV\t OFF\n";
38  } else {
39  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " LV\t ON\n";
40  }
41  if (vflag == true) {
42  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " V\t OFF\n";
43  } else {
44  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " V\t ON\n";
45  }
46  }
47  }
48 }
SiStripDetVOffReader::printdebug_
bool printdebug_
Definition: SiStripDetVOffReader.h:35
electrons_cff.bool
bool
Definition: electrons_cff.py:393
SiStripDetVOffReader::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiStripDetVOffReader.cc:14
SiStripDetVOffReader::detVOffToken_
edm::ESGetToken< SiStripDetVOff, SiStripDetVOffRcd > detVOffToken_
Definition: SiStripDetVOffReader.h:36
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiStripDetVOffReader::~SiStripDetVOffReader
~SiStripDetVOffReader() override
Definition: SiStripDetVOffReader.cc:12
funct::true
true
Definition: Factorize.h:173
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripDetVOffReader.h
edm::EventSetup
Definition: EventSetup.h:57
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:120
SiStripDetVOffReader::SiStripDetVOffReader
SiStripDetVOffReader(const edm::ParameterSet &)
Definition: SiStripDetVOffReader.cc:9
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
SiStripDetVOff.h
edm::Event
Definition: Event.h:73
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37