CMS 3D CMS Logo

Functions
HcalDetId.cc File Reference
#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <ostream>
#include <iostream>

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 253 of file HcalDetId.cc.

References TauDecayModes::dec, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalTriggerTower, and HcalDetId::subdet().

253  {
254  switch (id.subdet()) {
255  case(HcalBarrel) : return s << "(HB " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
256  case(HcalEndcap) : return s << "(HE " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
257  case(HcalForward) : return s << "(HF " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
258  case(HcalOuter) : return s << "(HO " << id.ieta() << ',' << id.iphi() << ')';
259  case(HcalTriggerTower) : return s << "(HT " << id.ieta() << ',' << id.iphi() << ')';
260  default : return s << std::hex << id.rawId() << std::dec;
261  }
262 }