CMS 3D CMS Logo

Classes | Functions
HcalCastorDetId.h File Reference
#include <ostream>
#include "DataFormats/DetId/interface/DetId.h"

Go to the source code of this file.

Classes

class  HcalCastorDetId
 

Functions

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

Function Documentation

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

Definition at line 78 of file HcalCastorDetId.cc.

References HcalCastorDetId::EM, HcalCastorDetId::HAD, and HcalCastorDetId::section().

Referenced by HcalCastorDetId::validDenseIndex().

78  {
79  s << "(CASTOR" << ((id.zside() == 1) ? ("+") : ("-"));
80 
81  switch (id.section()) {
82  case (HcalCastorDetId::EM):
83  s << " EM ";
84  break;
85  case (HcalCastorDetId::HAD):
86  s << " HAD ";
87  break;
88  default:
89  s << " UNKNOWN ";
90  }
91 
92  return s << id.sector() << ',' << id.module() << ',' << ')';
93 }