CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions
SummationSpecification Struct Reference

#include <SummationSpecification.h>

Public Member Functions

template<class stream , class GI >
void dump (stream &out, GI &gi)
 
 SummationSpecification ()
 
 SummationSpecification (edm::ParameterSet const &, GeometryInterface &)
 

Public Attributes

std::vector< SummationStepsteps
 

Private Member Functions

GeometryInterface::Column parse_columns (std::string name, GeometryInterface &)
 

Detailed Description

Definition at line 56 of file SummationSpecification.h.

Constructor & Destructor Documentation

◆ SummationSpecification() [1/2]

SummationSpecification::SummationSpecification ( )
inline

Definition at line 58 of file SummationSpecification.h.

58 {};

◆ SummationSpecification() [2/2]

SummationSpecification::SummationSpecification ( edm::ParameterSet const &  config,
GeometryInterface geometryInterface 
)

Definition at line 20 of file SummationSpecification.cc.

References c, createfilelist::int, parse_columns(), alignCSCRings::s, steps, and AlCaHLTBitMon_QueryRunRegistry::string.

20  {
21  auto spec = config.getParameter<edm::VParameterSet>("spec");
22 
23  for (const auto& step : spec) {
24  auto s = SummationStep();
25  s.type = SummationStep::Type(step.getParameter<int>("type"));
26  s.stage = SummationStep::Stage(step.getParameter<int>("stage"));
27 
28  s.nbins = int(step.getParameter<int>("nbins"));
29  s.xmin = int(step.getParameter<int>("xmin"));
30  s.xmax = int(step.getParameter<int>("xmax"));
31 
32  for (const auto& c : step.getParameter<std::vector<std::string>>("columns")) {
33  s.columns.push_back(parse_columns(c, geometryInterface));
34  }
35  s.arg = step.getParameter<std::string>("arg");
36  steps.push_back(s);
37  }
38 }
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:34
Definition: config.py:1
std::vector< SummationStep > steps
GeometryInterface::Column parse_columns(std::string name, GeometryInterface &)
step
Definition: StallMonitor.cc:98

Member Function Documentation

◆ dump()

template<class stream , class GI >
void SummationSpecification::dump ( stream &  out,
GI &  gi 
)
inline

Definition at line 62 of file SummationSpecification.h.

References c, MillePedeFileConverter_cfg::out, alignCSCRings::s, and steps.

62  {
63  for (auto& s : steps) {
64  out << "Step: type " << s.type << " stage " << s.stage << " col ";
65  for (auto c : s.columns)
66  out << gi.pretty(c) << " ";
67  out << " arg " << s.arg << "\n";
68  }
69  }
std::vector< SummationStep > steps

◆ parse_columns()

GeometryInterface::Column SummationSpecification::parse_columns ( std::string  name,
GeometryInterface geometryInterface 
)
private

Definition at line 15 of file SummationSpecification.cc.

References GeometryInterface::intern(), and Skims_PA_cff::name.

Referenced by SummationSpecification().

16  {
17  return geometryInterface.intern(name);
18 }
ID intern(std::string const &id)

Member Data Documentation

◆ steps

std::vector<SummationStep> SummationSpecification::steps

Definition at line 57 of file SummationSpecification.h.

Referenced by dump(), and SummationSpecification().