CMS 3D CMS Logo

Classes | Functions
HcalDetId.h File Reference
#include <iosfwd>
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
#include "FWCore/Utilities/interface/Exception.h"

Go to the source code of this file.

Classes

class  HcalDetId
 

Functions

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

Function Documentation

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

Definition at line 7 of file HcalDetId.cc.

References TauDecayModes::dec, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, and HcalTriggerTower.

Referenced by HcalDetId::unpackId().

7  {
8  switch (id.subdet()) {
9  case(HcalBarrel) : return s << "(HB " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
10  case(HcalEndcap) : return s << "(HE " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
11  case(HcalForward) : return s << "(HF " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
12  case(HcalOuter) : return s << "(HO " << id.ieta() << ',' << id.iphi() << ')';
13  case(HcalTriggerTower) : return s << "(HT " << id.ieta() << ',' << id.iphi() << ')';
14  default : return s << std::hex << id.rawId() << std::dec;
15  }
16 }