Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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 =
nullptr
;
45
break
;
46
}
47
inFile.close();
48
return
result
;
49
}
50
51
MFGrid
*
MFGridFactory::build
(
const
string
& name,
const
GloballyPositioned<float>
& vol,
double
phiMin
,
double
phiMax
) {
52
MFGrid
* sectorGrid =
build
(name, vol);
53
return
new
CylinderFromSectorMFGrid
(vol, phiMin, phiMax, sectorGrid);
54
}
CylinderFromSectorMFGrid.h
TrapezoidalCartesianMFGrid.h
SpecialCylindricalMFGrid.h
SpecialCylindricalMFGrid
Definition:
SpecialCylindricalMFGrid.h:16
RectangularCartesianMFGrid.h
mergeVDriftHistosByStation.name
string name
Definition:
mergeVDriftHistosByStation.py:78
mps_fire.result
tuple result
Definition:
mps_fire.py:311
GloballyPositioned.h
TrapezoidalCylindricalMFGrid
Definition:
TrapezoidalCylindricalMFGrid.h:10
TrapezoidalCylindricalMFGrid.h
MFGridFactory::build
static MFGrid * build(const std::string &name, const GloballyPositioned< float > &vol)
Build interpolator for a binary grid file.
L1TMuonDQMOffline_cfi.phiMax
float phiMax
Definition:
L1TMuonDQMOffline_cfi.py:17
newFWLiteAna.build
build
Definition:
newFWLiteAna.py:126
GloballyPositioned< float >
MFGrid
Definition:
MFGrid.h:27
MFGridFactory.h
binary_ifstream
Definition:
binary_ifstream.h:8
RectangularCylindricalMFGrid.h
TrapezoidalCartesianMFGrid
Definition:
TrapezoidalCartesianMFGrid.h:19
L1TMuonDQMOffline_cfi.phiMin
float phiMin
Definition:
L1TMuonDQMOffline_cfi.py:16
RectangularCartesianMFGrid
Definition:
RectangularCartesianMFGrid.h:9
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:144
CylinderFromSectorMFGrid
Definition:
CylinderFromSectorMFGrid.h:7
RectangularCylindricalMFGrid
Definition:
RectangularCylindricalMFGrid.h:9
binary_ifstream.h
Generated for CMSSW Reference Manual by
1.8.5