#include <SimCalorimetry/HcalSimAlgos/interface/HcalCoderFactory.h>
Public Types | |
enum | CoderType { DB, NOMINAL } |
Public Member Functions | |
std::auto_ptr< HcalCoder > | coder (const DetId &detId) const |
user gets control of the pointer | |
HcalCoderFactory (CoderType coderType) | |
void | setDbService (const HcalDbService *service) |
Private Attributes | |
CoderType | theCoderType |
const HcalDbService * | theDbService |
Definition at line 8 of file HcalCoderFactory.h.
HcalCoderFactory::HcalCoderFactory | ( | CoderType | coderType | ) |
Definition at line 7 of file HcalCoderFactory.cc.
00008 : theCoderType(coderType), 00009 theDbService(0) 00010 { 00011 }
user gets control of the pointer
Definition at line 14 of file HcalCoderFactory.cc.
References DB, HcalDbService::getHcalCoder(), HcalDbService::getHcalShape(), HLT_VtxMuL3::result, theCoderType, and theDbService.
Referenced by HcalElectronicsSim::convert().
00014 { 00015 HcalCoder * result = 0; 00016 if(theCoderType == DB) { 00017 assert(theDbService != 0); 00018 HcalGenericDetId hcalGenDetId(id); 00019 const HcalQIECoder * qieCoder = theDbService->getHcalCoder(hcalGenDetId ); 00020 const HcalQIEShape * qieShape = theDbService->getHcalShape(); 00021 result = new HcalCoderDb(*qieCoder, *qieShape); 00022 } 00023 00024 else { 00025 result = new HcalNominalCoder(); 00026 } 00027 return std::auto_ptr<HcalCoder>(result); 00028 }
void HcalCoderFactory::setDbService | ( | const HcalDbService * | service | ) | [inline] |
Definition at line 15 of file HcalCoderFactory.h.
References theDbService.
Referenced by HcalDigiProducer::produce(), and HcalTBDigiProducer::produce().
00015 {theDbService = service;}
CoderType HcalCoderFactory::theCoderType [private] |
const HcalDbService* HcalCoderFactory::theDbService [private] |