CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::SummationSpecification ( )
inline

Definition at line 58 of file SummationSpecification.h.

58 {};
SummationSpecification::SummationSpecification ( edm::ParameterSet const &  config,
GeometryInterface geometryInterface 
)

Definition at line 20 of file SummationSpecification.cc.

References c, edm::ParameterSet::getParameter(), 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 }
const edm::EventSetup & c
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:34
std::vector< SummationStep > steps
GeometryInterface::Column parse_columns(std::string name, GeometryInterface &)
tuple config
parse the configuration file
step
Definition: StallMonitor.cc:94

Member Function Documentation

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

Definition at line 62 of file SummationSpecification.h.

References c, 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  }
const edm::EventSetup & c
std::vector< SummationStep > steps
GeometryInterface::Column SummationSpecification::parse_columns ( std::string  name,
GeometryInterface geometryInterface 
)
private

Definition at line 15 of file SummationSpecification.cc.

References GeometryInterface::intern().

Referenced by SummationSpecification().

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

Member Data Documentation

std::vector<SummationStep> SummationSpecification::steps