CMS 3D CMS Logo

Classes | Functions
HcalZDCDetId.h File Reference
#include <ostream>
#include "DataFormats/DetId/interface/DetId.h"
#include "FWCore/Utilities/interface/Exception.h"

Go to the source code of this file.

Classes

class  HcalZDCDetId
 

Functions

std::ostream & operator<< (std::ostream &, const HcalZDCDetId &id)
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  ,
const HcalZDCDetId id 
)

Definition at line 3 of file HcalZDCDetId.cc.

References DetId::Calo, HcalZDCDetId::EM, HcalZDCDetId::HAD, HcalZDCDetId::LUM, HcalZDCDetId::RPD, alignCSCRings::s, hgcalPlots::section, and HcalZDCDetId::SubdetectorId.

3  {
4  s << "(Det " << id.det() << ":" << DetId::Calo << " subdet " << id.subdetId() << ":" << HcalZDCDetId::SubdetectorId
5  << " ZDC" << ((id.zside() == 1) ? ("+") : ("-"));
6  switch (id.section()) {
7  case (HcalZDCDetId::EM):
8  s << " EM ";
9  break;
10  case (HcalZDCDetId::HAD):
11  s << " HAD ";
12  break;
13  case (HcalZDCDetId::LUM):
14  s << " LUM ";
15  break;
16  case (HcalZDCDetId::RPD):
17  s << " RPD ";
18  break;
19  default:
20  s << " UNKNOWN ";
21  }
22  return s << id.channel() << "," << id.depth() << ')';
23 }
static constexpr int32_t SubdetectorId
Definition: HcalZDCDetId.h:35