Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
MagneticField
Interpolation
src
MFGridFactory.cc
Go to the documentation of this file.
1
#include "
MagneticField/Interpolation/interface/MFGridFactory.h
"
2
#include "
binary_ifstream.h
"
3
#include "
DataFormats/GeometrySurface/interface/GloballyPositioned.h
"
4
5
#include "
RectangularCartesianMFGrid.h
"
6
#include "
RectangularCylindricalMFGrid.h
"
7
#include "
TrapezoidalCartesianMFGrid.h
"
8
#include "
TrapezoidalCylindricalMFGrid.h
"
9
#include "
SpecialCylindricalMFGrid.h
"
10
#include "
CylinderFromSectorMFGrid.h
"
11
12
#include <iostream>
13
14
using namespace
std;
15
16
MFGrid
*
MFGridFactory::build
(
const
string
&
name
,
const
GloballyPositioned<float>
& vol) {
17
binary_ifstream
inFile(name);
18
int
gridType;
19
inFile >> gridType;
20
21
MFGrid
*
result
;
22
switch
(gridType){
23
case
1:
24
result =
new
RectangularCartesianMFGrid
(inFile, vol);
25
break
;
26
case
2:
27
result =
new
TrapezoidalCartesianMFGrid
(inFile, vol);
28
break
;
29
case
3:
30
result =
new
RectangularCylindricalMFGrid
(inFile, vol);
31
break
;
32
case
4:
33
result =
new
TrapezoidalCylindricalMFGrid
(inFile, vol);
34
break
;
35
case
5:
36
result =
new
SpecialCylindricalMFGrid
(inFile, vol, gridType);
37
break
;
38
case
6:
39
result =
new
SpecialCylindricalMFGrid
(inFile, vol, gridType);
40
break
;
41
default
:
42
cout
<<
"ERROR Grid type unknown: "
<< gridType << endl;
43
// result = new GlobalGridWrapper(vol, name);
44
result = 0;
45
break
;
46
}
47
inFile.close();
48
return
result
;
49
}
50
51
MFGrid
*
MFGridFactory::build
(
const
string
& name,
52
const
GloballyPositioned<float>
& vol,
53
double
phiMin
,
double
phiMax
)
54
{
55
MFGrid
* sectorGrid =
build
(name,vol);
56
return
new
CylinderFromSectorMFGrid
( vol, phiMin, phiMax, sectorGrid);
57
}
CylinderFromSectorMFGrid.h
TrapezoidalCartesianMFGrid.h
SpecialCylindricalMFGrid.h
SpecialCylindricalMFGrid
Definition:
SpecialCylindricalMFGrid.h:17
RectangularCartesianMFGrid.h
jptDQMConfig_cff.phiMax
float phiMax
Definition:
jptDQMConfig_cff.py:7
mergeVDriftHistosByStation.name
string name
Definition:
mergeVDriftHistosByStation.py:77
query.result
tuple result
Definition:
query.py:137
GloballyPositioned.h
TrapezoidalCylindricalMFGrid
Definition:
TrapezoidalCylindricalMFGrid.h:11
TrapezoidalCylindricalMFGrid.h
MFGridFactory::build
static MFGrid * build(const std::string &name, const GloballyPositioned< float > &vol)
Build interpolator for a binary grid file.
newFWLiteAna.build
build
Definition:
newFWLiteAna.py:126
GloballyPositioned< float >
MFGrid
Definition:
MFGrid.h:29
MFGridFactory.h
binary_ifstream
Definition:
binary_ifstream.h:8
RectangularCylindricalMFGrid.h
TrapezoidalCartesianMFGrid
Definition:
TrapezoidalCartesianMFGrid.h:19
jptDQMConfig_cff.phiMin
int phiMin
Definition:
jptDQMConfig_cff.py:50
RectangularCartesianMFGrid
Definition:
RectangularCartesianMFGrid.h:9
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
CylinderFromSectorMFGrid
Definition:
CylinderFromSectorMFGrid.h:7
RectangularCylindricalMFGrid
Definition:
RectangularCylindricalMFGrid.h:9
binary_ifstream.h
Generated for CMSSW Reference Manual by
1.8.5