Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
Geometry
CommonTopologies
src
SurfaceDeformationFactory.cc
Go to the documentation of this file.
1
7
#include "
FWCore/Utilities/interface/Exception.h
"
8
9
#include "
Geometry/CommonTopologies/interface/SurfaceDeformationFactory.h
"
10
#include "
Geometry/CommonTopologies/interface/BowedSurfaceDeformation.h
"
11
#include "
Geometry/CommonTopologies/interface/TwoBowedSurfacesDeformation.h
"
12
13
// included by header:
14
// #include <vector>
15
16
SurfaceDeformation
*
SurfaceDeformationFactory::create
(
int
type
,
const
std::vector<double> ¶ms)
17
{
18
switch
(type) {
19
case
kBowedSurface
:
20
{
21
if
(params.size() <=
BowedSurfaceDeformation::maxParameterSize
() &&
22
params.size() >=
BowedSurfaceDeformation::minParameterSize
()) {
23
return
new
BowedSurfaceDeformation
(params);
24
}
else
{
25
break
;
26
}
27
}
28
case
kTwoBowedSurfaces
:
29
{
30
if
(params.size() <=
TwoBowedSurfacesDeformation::maxParameterSize
() &&
31
params.size() >=
TwoBowedSurfacesDeformation::minParameterSize
()) {
32
return
new
TwoBowedSurfacesDeformation
(params);
33
}
else
{
34
break
;
35
}
36
}
37
}
38
39
throw
cms::Exception
(
"BadInput"
) <<
"SurfaceDeformationFactory::create: "
40
<<
"Unknown SurfaceDeformation type "
<< type <<
" (need "
41
<<
kBowedSurface
<<
" or "
<<
kTwoBowedSurfaces
42
<<
") or params.size() ("
<< params.size()
43
<<
") does not match.\n"
;
44
45
return
0;
46
}
type
type
Definition:
HCALResponse.h:22
AlignmentParametersFactory::kBowedSurface
Definition:
AlignmentParametersFactory.h:26
TwoBowedSurfacesDeformation.h
SurfaceDeformation
Definition:
SurfaceDeformation.h:23
BowedSurfaceDeformation::minParameterSize
static unsigned int minParameterSize()
minimum size of vector that is accepted by constructor from vector
Definition:
BowedSurfaceDeformation.h:58
SurfaceDeformationFactory.h
TwoBowedSurfacesDeformation
Definition:
TwoBowedSurfacesDeformation.h:25
TwoBowedSurfacesDeformation::minParameterSize
static unsigned int minParameterSize()
minimum size of vector that is accepted by constructor from vector
Definition:
TwoBowedSurfacesDeformation.h:71
BowedSurfaceDeformation::maxParameterSize
static unsigned int maxParameterSize()
maximum size of vector that is accepted by constructor from vector
Definition:
BowedSurfaceDeformation.h:60
TwoBowedSurfacesDeformation::maxParameterSize
static unsigned int maxParameterSize()
maximum size of vector that is accepted by constructor from vector
Definition:
TwoBowedSurfacesDeformation.h:73
BowedSurfaceDeformation
Definition:
BowedSurfaceDeformation.h:23
Exception.h
edm::hlt::Exception
error
Definition:
HLTenums.h:24
BowedSurfaceDeformation.h
AlignmentParametersFactory::kTwoBowedSurfaces
Definition:
AlignmentParametersFactory.h:27
SurfaceDeformationFactory::create
SurfaceDeformation * create(int type, const std::vector< double > ¶ms)
Definition:
SurfaceDeformationFactory.cc:16
Generated for CMSSW Reference Manual by
1.8.5