File indexing completed on 2024-04-06 12:08:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "DQM/SiPixelPhase1Common/interface/SummationSpecification.h"
0011
0012 #include <set>
0013 #include <cassert>
0014
0015 GeometryInterface::Column SummationSpecification::parse_columns(std::string name,
0016 GeometryInterface& geometryInterface) {
0017 return geometryInterface.intern(name);
0018 }
0019
0020 SummationSpecification::SummationSpecification(const edm::ParameterSet& config, GeometryInterface& geometryInterface) {
0021 auto spec = config.getParameter<edm::VParameterSet>("spec");
0022
0023 for (const auto& step : spec) {
0024 auto s = SummationStep();
0025 s.type = SummationStep::Type(step.getParameter<int>("type"));
0026 s.stage = SummationStep::Stage(step.getParameter<int>("stage"));
0027
0028 s.nbins = int(step.getParameter<int>("nbins"));
0029 s.xmin = int(step.getParameter<int>("xmin"));
0030 s.xmax = int(step.getParameter<int>("xmax"));
0031
0032 for (const auto& c : step.getParameter<std::vector<std::string>>("columns")) {
0033 s.columns.push_back(parse_columns(c, geometryInterface));
0034 }
0035 s.arg = step.getParameter<std::string>("arg");
0036 steps.push_back(s);
0037 }
0038 }