CMS 3D CMS Logo

Classes | Functions
CaloGenericDetId.h File Reference
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include "DataFormats/EcalDetId/interface/ESDetId.h"
#include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
#include "DataFormats/HcalDetId/interface/HcalCastorDetId.h"
#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"

Go to the source code of this file.

Classes

class  CaloGenericDetId
 

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 84 of file CaloGenericDetId.cc.

References TauDecayModes::dec, Exception, electrons_cff::isEB, nano_mu_digi_cff::rawId, and alignCSCRings::s.

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