CMS 3D CMS Logo

MFGridFactory.cc
Go to the documentation of this file.
4 
11 
12 #include <iostream>
13 
14 using namespace std;
15 
16 MFGrid* MFGridFactory::build(const string& name, const GloballyPositioned<float>& vol) {
18  return build(inFile, vol);
19 }
20 
22  int gridType;
23  inFile >> gridType;
24 
25  MFGrid* result;
26  switch (gridType) {
27  case 1:
29  break;
30  case 2:
32  break;
33  case 3:
35  break;
36  case 4:
38  break;
39  case 5:
40  result = new SpecialCylindricalMFGrid(inFile, vol, gridType);
41  break;
42  case 6:
43  result = new SpecialCylindricalMFGrid(inFile, vol, gridType);
44  break;
45  default:
46  cout << "ERROR Grid type unknown: " << gridType << endl;
47  // result = new GlobalGridWrapper(vol, name);
48  result = nullptr;
49  break;
50  }
51  return result;
52 }
53 
54 MFGrid* MFGridFactory::build(const string& name, const GloballyPositioned<float>& vol, double phiMin, double phiMax) {
55  MFGrid* sectorGrid = build(name, vol);
56  return new CylinderFromSectorMFGrid(vol, phiMin, phiMax, sectorGrid);
57 }
static MFGrid * build(const std::string &name, const GloballyPositioned< float > &vol)
Build interpolator for a binary grid file.
Definition: MFGrid.h:27