CMS 3D CMS Logo

SummationSpecification.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiPixelPhase1Common
4 // Class: SummationSpecification
5 //
6 // SummationSpecification does not need much impl, mostly the constructor.
7 //
8 // Original Author: Marcel Schneider
9 
11 
12 #include <set>
13 #include <cassert>
14 
17  return geometryInterface.intern(name);
18 }
19 
20 
22  auto spec = config.getParameter<edm::VParameterSet>("spec");
23 
24  for (auto step : spec) {
25  auto s = SummationStep();
26  s.type = SummationStep::Type(step.getParameter<int>("type"));
27  s.stage = SummationStep::Stage(step.getParameter<int>("stage"));
28 
29  s.nbins = int(step.getParameter<int>("nbins"));
30  s.xmin = int(step.getParameter<int>("xmin"));
31  s.xmax = int(step.getParameter<int>("xmax"));
32 
33 
34  for (auto c : step.getParameter<std::vector<std::string>>("columns")) {
35  s.columns.push_back(parse_columns(c, geometryInterface));
36  }
37  s.arg = step.getParameter<std::string>("arg");
38  steps.push_back(s);
39  }
40 }
41 
42 
T getParameter(std::string const &) const
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
Definition: config.py:1
std::vector< SummationStep > steps
GeometryInterface::Column parse_columns(std::string name, GeometryInterface &)
step
ID intern(std::string const &id)