CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 88 of file CaloGenericDetId.cc.

References TauDecayModes::dec, and Exception.

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 }
Log< level::Error, false > LogError