CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CastorCoderFactory.cc
Go to the documentation of this file.
4 
5 
6 
8 : theCoderType(coderType),
9  theDbService(0)
10 {
11 }
12 
13 
14 std::auto_ptr<CastorCoder> CastorCoderFactory::coder(const DetId & id) const {
15  CastorCoder * result = 0;
16  if(theCoderType == DB) {
17  assert(theDbService != 0);
18  HcalGenericDetId hcalGenDetId(id);
19  const CastorQIECoder * qieCoder = theDbService->getCastorCoder(hcalGenDetId );
20  const CastorQIEShape * qieShape = theDbService->getCastorShape();
21  result = new CastorCoderDb(*qieCoder, *qieShape);
22  }
23 
24  else {
25  result = new CastorNominalCoder();
26  }
27  return std::auto_ptr<CastorCoder>(result);
28 }
29 
std::auto_ptr< CastorCoder > coder(const DetId &detId) const
user gets control of the pointer
const CastorDbService * theDbService
assert(m_qm.get())
tuple result
Definition: query.py:137
const CastorQIEShape * getCastorShape() const
Definition: DetId.h:18
CastorCoderFactory(CoderType coderType)
const CastorQIECoder * getCastorCoder(const HcalGenericDetId &fId) const