CMS 3D CMS Logo

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

References dtNoiseDBValidation_cfg::cerr, TauDecayModes::dec, edm::hlt::Exception, and DetId::Hcal.

129 {
130  if (id.det() == DetId::Hcal) {
131  std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl;
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.isCaloTower() ? s<<CaloTowerDetId( id ) :
139  ( id.isZDC() ? s<<HcalZDCDetId( id ) :
140  s<<"UnknownId="<<std::hex<<id.rawId()<<std::dec ) ) ) ) ) ;
141 }