CMS 3D CMS Logo

Functions
HcalZDCDetId.cc File Reference
#include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
#include "FWCore/Utilities/interface/Exception.h"

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 107 of file HcalZDCDetId.cc.

References HcalZDCDetId::EM, HcalZDCDetId::HAD, HcalZDCDetId::LUM, HcalZDCDetId::RPD, and HcalZDCDetId::section().

107  {
108  s << "(ZDC" << ((id.zside() == 1) ? ("+") : ("-"));
109  switch (id.section()) {
110  case (HcalZDCDetId::EM):
111  s << " EM ";
112  break;
113  case (HcalZDCDetId::HAD):
114  s << " HAD ";
115  break;
116  case (HcalZDCDetId::LUM):
117  s << " LUM ";
118  break;
119  case (HcalZDCDetId::RPD):
120  s << " RPD ";
121  break;
122  default:
123  s << " UNKNOWN ";
124  }
125  return s << id.channel() << "," << id.depth() << ')';
126 }