19#include "BinSpecification.hh"
20#include "RBDSException.hh"
45 {
throw RBDSException(
"high end of binning <= low end -> must be >");}
54 edges(new std::vector<double>(edgesIn)),
57 if (edges->size() < 2)
58 {
throw RBDSException(
"too few bin edges -> must be at least 2 edges to define 1 bin");}
59 n = (int)edges->size() - 1;
69 isLogSpaced(other.isLogSpaced),
70 edgesFileName(other.edgesFileName)
72 edges = other.edges ?
new std::vector<double>(*other.edges) : nullptr;
80 isLogSpaced(other.isLogSpaced),
81 edgesFileName(other.edgesFileName)
86 other.edges =
nullptr;
87 other.isLogSpaced =
false;
88 other.edgesFileName.clear();
91BinSpecification::~BinSpecification()
98 if (!edgesFileName.empty())
99 {
return edgesFileName;}
101 {
return std::to_string(low) +
":" + std::to_string(high);}
Binning specification for a single dimension.
std::string GetBinString() const
Return the filename or the binning.
BinSpecification()
Default constructor.
General exception with possible name of object and message.