CMS 3D CMS Logo

DebugInfo.cc
Go to the documentation of this file.
6 
7 #include <iostream>
8 
9 namespace spr {
10 
11  void debugEcalDets(unsigned int i, const DetId& det, bool flag) {
12  std::cout << "Cell [" << i << "] 0x";
13  if (det.subdetId() == EcalBarrel) {
14  EBDetId id = det;
15  std::cout << std::hex << det() << std::dec << " " << id;
16  } else if (det.subdetId() == EcalEndcap) {
17  EEDetId id = det;
18  std::cout << std::hex << det() << std::dec << " " << id;
19  } else {
20  std::cout << std::hex << det() << std::dec << " Unknown Type";
21  }
22  if (flag)
23  std::cout << std::endl;
24  }
25 
26  void debugEcalDets(unsigned int last, std::vector<DetId>& vdets) {
27  for (unsigned int i = last; i < vdets.size(); ++i) {
28  debugEcalDets(i, vdets[i], true);
29  }
30  }
31 
32  void debugEcalDets(unsigned int last, std::vector<DetId>& vdets, std::vector<CaloDirection>& dirs) {
33  for (unsigned int i = last; i < vdets.size(); ++i) {
34  debugEcalDets(i, vdets[i], false);
35  std::cout << " along " << dirs[i] << std::endl;
36  }
37  }
38 
39  void debugHcalDets(unsigned int last, std::vector<DetId>& vdets) {
40  for (unsigned int i = last; i < vdets.size(); ++i) {
41  HcalDetId id = vdets[i]();
42  std::cout << "Cell [" << i << "] 0x" << std::hex << vdets[i]() << std::dec << " " << id << std::endl;
43  }
44  }
45 } // namespace spr
mps_fire.i
i
Definition: mps_fire.py:355
spr
Definition: CaloConstants.h:6
heppy_check.dirs
dirs
Definition: heppy_check.py:26
EBDetId
Definition: EBDetId.h:17
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EBDetId.h
EEDetId.h
DebugInfo.h
spr::debugEcalDets
void debugEcalDets(unsigned int, const DetId &, bool)
Definition: DebugInfo.cc:11
EcalBarrel
Definition: EcalSubdetector.h:10
DetId
Definition: DetId.h:17
dqmdumpme.last
last
Definition: dqmdumpme.py:56
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
EEDetId
Definition: EEDetId.h:14
EcalSubdetector.h
EcalEndcap
Definition: EcalSubdetector.h:10
HcalDetId.h
HcalDetId
Definition: HcalDetId.h:12
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
spr::debugHcalDets
void debugHcalDets(unsigned int, std::vector< DetId > &)
Definition: DebugInfo.cc:39
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116