CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DebugInfo.cc
Go to the documentation of this file.
7 
8 #include <iostream>
9 
10 namespace spr {
11 
12  std::ostringstream debugEcalDet(unsigned int i, const DetId& det) {
13  std::ostringstream st1;
14  st1 << "Cell [" << i << "] 0x";
15  if (det.subdetId() == EcalBarrel) {
16  EBDetId id(det);
17  st1 << std::hex << det() << std::dec << " " << id;
18  } else if (det.subdetId() == EcalEndcap) {
19  EEDetId id(det);
20  st1 << std::hex << det() << std::dec << " " << id;
21  } else {
22  st1 << std::hex << det() << std::dec << " Unknown Type";
23  }
24  return st1;
25  }
26 
27  void debugEcalDets(unsigned int last, std::vector<DetId>& vdets) {
28  for (unsigned int i = last; i < vdets.size(); ++i) {
29  edm::LogVerbatim("IsoTrack") << spr::debugEcalDet(i, vdets[i]).str();
30  }
31  }
32 
33  void debugEcalDets(unsigned int last, std::vector<DetId>& vdets, std::vector<CaloDirection>& dirs) {
34  for (unsigned int i = last; i < vdets.size(); ++i) {
35  edm::LogVerbatim("IsoTrack") << spr::debugEcalDet(i, vdets[i]).str() << " 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  edm::LogVerbatim("IsoTrack") << "Cell [" << i << "] 0x" << std::hex << vdets[i]() << std::dec << " " << id;
43  }
44  }
45 } // namespace spr
Log< level::Info, true > LogVerbatim
uint16_t *__restrict__ id
void debugHcalDets(unsigned int, std::vector< DetId > &)
Definition: DebugInfo.cc:39
void debugEcalDets(unsigned int, std::vector< DetId > &)
Definition: DebugInfo.cc:27
std::ostringstream debugEcalDet(unsigned int, const DetId &)
Definition: DebugInfo.cc:12
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Definition: DetId.h:17
tuple last
Definition: dqmdumpme.py:56