CMS 3D CMS Logo

HcalCoderFactory Class Reference

#include <SimCalorimetry/HcalSimAlgos/interface/HcalCoderFactory.h>

List of all members.

Public Types

enum  CoderType { DB, NOMINAL }

Public Member Functions

std::auto_ptr< HcalCodercoder (const DetId &detId) const
 user gets control of the pointer
 HcalCoderFactory (CoderType coderType)
void setDbService (const HcalDbService *service)

Private Attributes

CoderType theCoderType
const HcalDbServicetheDbService


Detailed Description

Definition at line 8 of file HcalCoderFactory.h.


Member Enumeration Documentation

enum HcalCoderFactory::CoderType

Enumerator:
DB 
NOMINAL 

Definition at line 11 of file HcalCoderFactory.h.

00011 {DB, NOMINAL};


Constructor & Destructor Documentation

HcalCoderFactory::HcalCoderFactory ( CoderType  coderType  ) 

Definition at line 7 of file HcalCoderFactory.cc.

00008 : theCoderType(coderType),
00009   theDbService(0)
00010 {
00011 }


Member Function Documentation

std::auto_ptr< HcalCoder > HcalCoderFactory::coder ( const DetId detId  )  const

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;}


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:23:30 2009 for CMSSW by  doxygen 1.5.4