Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
SimCalorimetry
CastorSim
src
CastorCoderFactory.cc
Go to the documentation of this file.
1
#include "
SimCalorimetry/CastorSim/src/CastorCoderFactory.h
"
2
#include "
CalibFormats/CastorObjects/interface/CastorCoderDb.h
"
3
#include "
CalibFormats/CastorObjects/interface/CastorNominalCoder.h
"
4
5
6
7
CastorCoderFactory::CastorCoderFactory
(
CoderType
coderType)
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
CastorNominalCoder.h
CastorCoderFactory::coder
std::auto_ptr< CastorCoder > coder(const DetId &detId) const
user gets control of the pointer
Definition:
CastorCoderFactory.cc:14
CastorCoderFactory::theDbService
const CastorDbService * theDbService
Definition:
CastorCoderFactory.h:23
CastorCoderFactory::CoderType
CoderType
Definition:
CastorCoderFactory.h:11
CastorNominalCoder
Definition:
CastorNominalCoder.h:11
CastorCoderDb.h
CastorQIECoder
Definition:
CastorQIECoder.h:22
CastorCoderFactory.h
CastorCoderDb
Definition:
CastorCoderDb.h:16
CastorQIEShape
Definition:
CastorQIEShape.h:14
CastorCoder
Definition:
CastorCoder.h:13
query.result
tuple result
Definition:
query.py:137
CastorDbService::getCastorShape
const CastorQIEShape * getCastorShape() const
Definition:
CastorDbService.cc:171
HcalGenericDetId
Definition:
HcalGenericDetId.h:15
DetId
Definition:
DetId.h:18
CastorCoderFactory::CastorCoderFactory
CastorCoderFactory(CoderType coderType)
Definition:
CastorCoderFactory.cc:7
CastorCoderFactory::DB
Definition:
CastorCoderFactory.h:11
CastorCoderFactory::theCoderType
CoderType theCoderType
Definition:
CastorCoderFactory.h:22
CastorDbService::getCastorCoder
const CastorQIECoder * getCastorCoder(const HcalGenericDetId &fId) const
Definition:
CastorDbService.cc:164
Generated for CMSSW Reference Manual by
1.8.5