CMS 3D CMS Logo

HcalDetId.cc
Go to the documentation of this file.
2 #include <ostream>
3 #include <iostream>
4 
6 
7 std::ostream& operator<<(std::ostream& s, const HcalDetId& id) {
8  switch (id.subdet()) {
9  case (HcalBarrel):
10  return s << "(HB " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
11  case (HcalEndcap):
12  return s << "(HE " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
13  case (HcalForward):
14  return s << "(HF " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
15  case (HcalOuter):
16  return s << "(HO " << id.ieta() << ',' << id.iphi() << ')';
17  case (HcalTriggerTower):
18  return s << "(HT " << id.ieta() << ',' << id.iphi() << ')';
19  default:
20  return s << std::hex << id.rawId() << std::dec;
21  }
22 }
static const HcalDetId Undefined
Definition: HcalDetId.h:273
std::ostream & operator<<(std::ostream &s, const HcalDetId &id)
Definition: HcalDetId.cc:7