test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimCalorimetry
HcalSimAlgos
src
HcalCoderFactory.cc
Go to the documentation of this file.
1
#include "
SimCalorimetry/HcalSimAlgos/interface/HcalCoderFactory.h
"
2
#include "
CalibFormats/HcalObjects/interface/HcalCoderDb.h
"
3
#include "
CalibFormats/HcalObjects/interface/HcalNominalCoder.h
"
4
5
6
7
HcalCoderFactory::HcalCoderFactory
(
CoderType
coderType)
8
: theCoderType(coderType), theDbService(0) { }
9
10
11
std::auto_ptr<HcalCoder>
HcalCoderFactory::coder
(
const
DetId
&
id
)
const
{
12
HcalCoder
*
result
= 0;
13
if
(
theCoderType
==
DB
||
theCoderType
==
UPGRADE
) {
14
assert
(
theDbService
!= 0);
15
HcalGenericDetId
hcalGenDetId(
id
);
16
const
HcalQIECoder
* qieCoder =
theDbService
->
getHcalCoder
(hcalGenDetId );
17
const
HcalQIEShape
* qieShape =
theDbService
->
getHcalShape
(hcalGenDetId);
18
result =
new
HcalCoderDb
(*qieCoder, *qieShape);
19
}
else
{
20
result =
new
HcalNominalCoder
();
21
}
22
return
std::auto_ptr<HcalCoder>(
result
);
23
}
24
HcalCoderFactory::theDbService
const HcalDbService * theDbService
Definition:
HcalCoderFactory.h:23
HcalCoderFactory::CoderType
CoderType
Definition:
HcalCoderFactory.h:11
assert
assert(m_qm.get())
mps_fire.result
tuple result
Definition:
mps_fire.py:84
HcalCoderFactory::HcalCoderFactory
HcalCoderFactory(CoderType coderType)
Definition:
HcalCoderFactory.cc:7
HcalCoderDb
Definition:
HcalCoderDb.h:15
HcalGenericDetId
Definition:
HcalGenericDetId.h:15
DetId
Definition:
DetId.h:18
HcalNominalCoder.h
HcalCoder
Definition:
HcalCoder.h:19
HcalQIEShape
Definition:
HcalQIEShape.h:17
HcalQIECoder
Definition:
HcalQIECoder.h:21
HcalDbService::getHcalCoder
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
Definition:
HcalDbService.cc:227
HcalCoderFactory::DB
Definition:
HcalCoderFactory.h:11
HcalCoderDb.h
HcalDbService::getHcalShape
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
Definition:
HcalDbService.cc:234
HcalCoderFactory::UPGRADE
Definition:
HcalCoderFactory.h:11
HcalCoderFactory::theCoderType
CoderType theCoderType
Definition:
HcalCoderFactory.h:22
HcalCoderFactory.h
HcalCoderFactory::coder
std::auto_ptr< HcalCoder > coder(const DetId &detId) const
user gets control of the pointer
Definition:
HcalCoderFactory.cc:11
HcalNominalCoder
Definition:
HcalNominalCoder.h:11
Generated for CMSSW Reference Manual by
1.8.5