#include <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.
: theCoderType(coderType), theDbService(0) { }
user gets control of the pointer
Definition at line 14 of file HcalCoderFactory.cc.
References DB, HcalDbService::getHcalCoder(), HcalDbService::getHcalShape(), query::result, theCoderType, and theDbService.
Referenced by HcalElectronicsSim::convert().
{ HcalCoder * result = 0; if(theCoderType == DB) { assert(theDbService != 0); HcalGenericDetId hcalGenDetId(id); const HcalQIECoder * qieCoder = theDbService->getHcalCoder(hcalGenDetId ); const HcalQIEShape * qieShape = theDbService->getHcalShape(); result = new HcalCoderDb(*qieCoder, *qieShape); } else { result = new HcalNominalCoder(); } return std::auto_ptr<HcalCoder>(result); }
void HcalCoderFactory::setDbService | ( | const HcalDbService * | service | ) | [inline] |
Definition at line 15 of file HcalCoderFactory.h.
References theDbService.
Referenced by HcalDigitizer::produce(), and HcalTBDigiProducer::produce().
{theDbService = service;}
CoderType HcalCoderFactory::theCoderType [private] |
Definition at line 22 of file HcalCoderFactory.h.
Referenced by coder().
const HcalDbService* HcalCoderFactory::theDbService [private] |
Definition at line 23 of file HcalCoderFactory.h.
Referenced by coder(), and setDbService().