test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
CaloGenericDetId.cc File Reference
#include "Geometry/CaloGeometry/interface/CaloGenericDetId.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <iostream>

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 124 of file CaloGenericDetId.cc.

References TauDecayModes::dec, and Exception.

125 {
126  if (id.isHcal()) {
127  edm::LogError("CaloGenericDetIdError") << "No support for HB/HE/HO/HF in CaloGenericDetId";
128  throw cms::Exception("No support");
129  }
130  else if(id.isCaloTower()) {
131  edm::LogError("CaloGenericDetIdError") << "No support for CaloTower in CaloGenericDetId";
132  throw cms::Exception("No support");
133  }
134 
135  return ( id.isEB() ? s<<EBDetId( id ) :
136  ( id.isEE() ? s<<EEDetId( id ) :
137  ( id.isES() ? s<<ESDetId( id ) :
138  ( id.isZDC() ? s<<HcalZDCDetId( id ) :
139  s<<"UnknownId="<<std::hex<<id.rawId()<<std::dec ) ) ) );
140 }