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 73 of file MESetBinningUtils.h.

Constructor & Destructor Documentation

◆ AxisSpecs() [1/2]

ecaldqm::binning::AxisSpecs::AxisSpecs ( )
inline

◆ AxisSpecs() [2/2]

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

Definition at line 80 of file MESetBinningUtils.h.

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

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

◆ ~AxisSpecs()

ecaldqm::binning::AxisSpecs::~AxisSpecs ( )
inline

Definition at line 123 of file MESetBinningUtils.h.

References edges, and labels.

123  {
124  delete[] edges;
125  delete[] labels;
126  }

Member Function Documentation

◆ operator=()

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

Definition at line 98 of file MESetBinningUtils.h.

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

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

Member Data Documentation

◆ edges

float* ecaldqm::binning::AxisSpecs::edges

◆ high

float ecaldqm::binning::AxisSpecs::high

◆ labels

std::string* ecaldqm::binning::AxisSpecs::labels

◆ low

float ecaldqm::binning::AxisSpecs::low

◆ nbins

int ecaldqm::binning::AxisSpecs::nbins

◆ title

std::string ecaldqm::binning::AxisSpecs::title