CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
SiStripDetVOffReader.cc
Go to the documentation of this file.
3 
5 
6 #include <iostream>
7 #include <cstdio>
8 #include <sys/time.h>
9 
11  : printdebug_(iConfig.getUntrackedParameter<bool>("printDebug", true)) {}
12 
14 
16  edm::ESHandle<SiStripDetVOff> SiStripDetVOff_;
17  iSetup.get<SiStripDetVOffRcd>().get(SiStripDetVOff_);
18  edm::LogInfo("SiStripDetVOffReader") << "[SiStripDetVOffReader::analyze] End Reading SiStripDetVOff" << std::endl;
19 
20  // put here a vector of DetIds to compare
21  // Here we just take the vector with all modules that have HV OFF
22 
23  // replace this code, with Your own detids
24  std::vector<uint32_t> detid;
25  SiStripDetVOff_->getDetIds(detid);
26  //
27 
28  if (printdebug_) {
29  for (uint32_t id = 0; id <= detid.size(); id++) {
30  bool hvflag = SiStripDetVOff_->IsModuleHVOff(detid[id]);
31  bool lvflag = SiStripDetVOff_->IsModuleLVOff(detid[id]);
32  bool vflag = SiStripDetVOff_->IsModuleVOff(detid[id]);
33  if (hvflag == true) {
34  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " HV\t OFF\n";
35  } else {
36  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " HV\t ON\n";
37  }
38  if (lvflag == true) {
39  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " LV\t OFF\n";
40  } else {
41  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " LV\t ON\n";
42  }
43  if (vflag == true) {
44  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " V\t OFF\n";
45  } else {
46  edm::LogInfo("SiStripDetVOffReader") << "detid: " << detid[id] << " V\t ON\n";
47  }
48  }
49  }
50 }
SiStripDetVOffReader::printdebug_
bool printdebug_
Definition: SiStripDetVOffReader.h:33
electrons_cff.bool
bool
Definition: electrons_cff.py:372
SiStripDetVOffReader::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiStripDetVOffReader.cc:15
edm::LogInfo
Definition: MessageLogger.h:254
SiStripDetVOff::IsModuleHVOff
bool IsModuleHVOff(const uint32_t DetID) const
Definition: SiStripDetVOff.cc:91
SiStripDetVOffReader::~SiStripDetVOffReader
~SiStripDetVOffReader() override
Definition: SiStripDetVOffReader.cc:13
SiStripDetVOff::IsModuleVOff
bool IsModuleVOff(const uint32_t DetID) const
Returns true if either HV or LV are off.
Definition: SiStripDetVOff.cc:75
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
edm::ESHandle< SiStripDetVOff >
SiStripDetVOff::getDetIds
void getDetIds(std::vector< uint32_t > &DetIds_) const
Definition: SiStripDetVOff.cc:64
funct::true
true
Definition: Factorize.h:173
edm::ParameterSet
Definition: ParameterSet.h:36
SiStripCondDataRecords.h
SiStripDetVOffReader.h
SiStripDetVOffRcd
Definition: SiStripCondDataRecords.h:34
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
SiStripDetVOffReader::SiStripDetVOffReader
SiStripDetVOffReader(const edm::ParameterSet &)
Definition: SiStripDetVOffReader.cc:10
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
SiStripDetVOff.h
edm::Event
Definition: Event.h:73
SiStripDetVOff::IsModuleLVOff
bool IsModuleLVOff(const uint32_t DetID) const
Definition: SiStripDetVOff.cc:83
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37