test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
HcalCastorDetId.cc File Reference
#include "DataFormats/HcalDetId/interface/HcalCastorDetId.h"
#include "DataFormats/HcalDetId/interface/HcalGenericDetId.h"
#include "FWCore/Utilities/interface/Exception.h"

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 121 of file HcalCastorDetId.cc.

References HcalCastorDetId::EM, and HcalCastorDetId::HAD.

122 {
123  s << "(CASTOR" << ((id.zside()==1)?("+"):("-"));
124 
125  switch (id.section())
126  {
127  case(HcalCastorDetId::EM) : s << " EM "; break;
128  case(HcalCastorDetId::HAD) : s << " HAD "; break;
129  default : s <<" UNKNOWN ";
130  }
131 
132  return s << id.sector() << ',' << id.module() << ',' << ')';
133 }