test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 188 of file HcalDetId.cc.

References HcalBarrel, HcalEndcap, HcalForward, HcalOuter, and HcalTriggerTower.

188  {
189  switch (id.subdet()) {
190  case(HcalBarrel) : return s << "(HB " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
191  case(HcalEndcap) : return s << "(HE " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
192  case(HcalForward) : return s << "(HF " << id.ieta() << ',' << id.iphi() << ',' << id.depth() << ')';
193  case(HcalOuter) : return s << "(HO " << id.ieta() << ',' << id.iphi() << ')';
194  case(HcalTriggerTower) : return s << "(HT " << id.ieta() << ',' << id.iphi() << ')';
195  default : return s << id.rawId();
196  }
197 }