Main Page
Namespaces
Classes
Package Documentation
CVS Directory
WorkBook
Offline Guide
Release schedule
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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),
9
theDbService(0)
10
{
11
}
12
13
14
std::auto_ptr<HcalCoder>
HcalCoderFactory::coder
(
const
DetId
&
id
)
const
{
15
HcalCoder
*
result
= 0;
16
if
(
theCoderType
==
DB
) {
17
assert(
theDbService
!= 0);
18
HcalGenericDetId
hcalGenDetId(
id
);
19
const
HcalQIECoder
* qieCoder =
theDbService
->
getHcalCoder
(hcalGenDetId );
20
const
HcalQIEShape
* qieShape =
theDbService
->
getHcalShape
();
21
result =
new
HcalCoderDb
(*qieCoder, *qieShape);
22
}
23
24
else
{
25
result =
new
HcalNominalCoder
();
26
}
27
return
std::auto_ptr<HcalCoder>(
result
);
28
}
29
HcalCoderFactory::theDbService
const HcalDbService * theDbService
Definition:
HcalCoderFactory.h:23
HcalCoderFactory::CoderType
CoderType
Definition:
HcalCoderFactory.h:11
HcalCoderFactory::HcalCoderFactory
HcalCoderFactory(CoderType coderType)
Definition:
HcalCoderFactory.cc:7
query.result
tuple result
Definition:
query.py:137
HcalCoderDb
Definition:
HcalCoderDb.h:19
HcalGenericDetId
Definition:
HcalGenericDetId.h:16
DetId
Definition:
DetId.h:20
HcalNominalCoder.h
HcalCoder
Definition:
HcalCoder.h:19
HcalQIEShape
Definition:
HcalQIEShape.h:17
HcalQIECoder
Definition:
HcalQIECoder.h:19
HcalDbService::getHcalCoder
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
Definition:
HcalDbService.cc:201
HcalCoderFactory::DB
Definition:
HcalCoderFactory.h:11
HcalCoderDb.h
HcalCoderFactory::theCoderType
CoderType theCoderType
Definition:
HcalCoderFactory.h:22
HcalCoderFactory.h
HcalDbService::getHcalShape
const HcalQIEShape * getHcalShape() const
Definition:
HcalDbService.cc:208
HcalCoderFactory::coder
std::auto_ptr< HcalCoder > coder(const DetId &detId) const
user gets control of the pointer
Definition:
HcalCoderFactory.cc:14
HcalNominalCoder
Definition:
HcalNominalCoder.h:13
Generated for CMSSW Reference Manual by
1.8.5