CMS 3D CMS Logo

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

◆ operator<<()

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

Definition at line 88 of file CaloGenericDetId.cc.

88  {
89  if (id.isHcal()) {
90  edm::LogError("CaloGenericDetIdError") << "No support for HB/HE/HO/HF in CaloGenericDetId";
91  throw cms::Exception("No support");
92  } else if (id.isCaloTower()) {
93  edm::LogError("CaloGenericDetIdError") << "No support for CaloTower in CaloGenericDetId";
94  throw cms::Exception("No support");
95  }
96 
97  return (id.isEB()
98  ? s << EBDetId(id)
99  : (id.isEE() ? s << EEDetId(id)
100  : (id.isES() ? s << ESDetId(id)
101  : (id.isZDC() ? s << HcalZDCDetId(id)
102  : s << "UnknownId=" << std::hex << id.rawId() << std::dec))));
103 }

References TauDecayModes::dec, Exception, and alignCSCRings::s.

EBDetId
Definition: EBDetId.h:17
ESDetId
Definition: ESDetId.h:15
HcalZDCDetId
Definition: HcalZDCDetId.h:16
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EEDetId
Definition: EEDetId.h:14
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
Exception
Definition: hltDiff.cc:245
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143