CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
ecaldqm::binning::AxisSpecs Struct Reference

#include <MESetBinningUtils.h>

Public Member Functions

 AxisSpecs ()
 
 AxisSpecs (AxisSpecs const &_specs)
 
AxisSpecsoperator= (AxisSpecs const &_rhs)
 
 ~AxisSpecs ()
 

Public Attributes

float * edges
 
float high
 
std::string * labels
 
float low
 
int nbins
 
std::string title
 

Detailed Description

Definition at line 72 of file MESetBinningUtils.h.

Constructor & Destructor Documentation

ecaldqm::binning::AxisSpecs::AxisSpecs ( )
inline
ecaldqm::binning::AxisSpecs::AxisSpecs ( AxisSpecs const &  _specs)
inline

Definition at line 79 of file MESetBinningUtils.h.

References edges, mps_fire::i, labels, pileupCalc::nbins, and AlCaHLTBitMon_QueryRunRegistry::string.

80  : nbins(_specs.nbins),
81  low(_specs.low),
82  high(_specs.high),
83  edges(nullptr),
84  labels(nullptr),
85  title(_specs.title) {
86  if (_specs.edges) {
87  edges = new float[nbins + 1];
88  for (int i(0); i <= nbins; i++)
89  edges[i] = _specs.edges[i];
90  }
91  if (_specs.labels) {
92  labels = new std::string[nbins];
93  for (int i(0); i < nbins; i++)
94  labels[i] = _specs.labels[i];
95  }
96  }
ecaldqm::binning::AxisSpecs::~AxisSpecs ( )
inline

Member Function Documentation

AxisSpecs& ecaldqm::binning::AxisSpecs::operator= ( AxisSpecs const &  _rhs)
inline

Definition at line 97 of file MESetBinningUtils.h.

References edges, high, mps_fire::i, tablePrinter::labels, labels, low, nbins, pileupCalc::nbins, AlCaHLTBitMon_QueryRunRegistry::string, and title.

97  {
98  if (edges) {
99  delete[] edges;
100  edges = nullptr;
101  }
102  if (labels) {
103  delete[] labels;
104  labels = nullptr;
105  }
106  nbins = _rhs.nbins;
107  low = _rhs.low;
108  high = _rhs.high;
109  title = _rhs.title;
110  if (_rhs.edges) {
111  edges = new float[nbins + 1];
112  for (int i(0); i <= nbins; i++)
113  edges[i] = _rhs.edges[i];
114  }
115  if (_rhs.labels) {
116  labels = new std::string[nbins];
117  for (int i(0); i < nbins; i++)
118  labels[i] = _rhs.labels[i];
119  }
120  return *this;
121  }

Member Data Documentation

float* ecaldqm::binning::AxisSpecs::edges
float ecaldqm::binning::AxisSpecs::high
std::string* ecaldqm::binning::AxisSpecs::labels
float ecaldqm::binning::AxisSpecs::low
int ecaldqm::binning::AxisSpecs::nbins
std::string ecaldqm::binning::AxisSpecs::title