18#include "BinSpecification.hh"
19#include "RBDSException.hh"
44 {
throw RBDSException(
"high end of binning <= low end -> must be >");}
53 edges(new
std::vector<double>(edgesIn)),
56 if (edges->size() < 2)
57 {
throw RBDSException(
"too few bin edges -> must be at least 2 edges to define 1 bin");}
58 n = (int)edges->size() - 1;
68 isLogSpaced(other.isLogSpaced),
69 edgesFileName(other.edgesFileName)
71 edges = other.edges ?
new std::vector<double>(*other.edges) : nullptr;
79 isLogSpaced(other.isLogSpaced),
80 edgesFileName(other.edgesFileName)
85 other.edges =
nullptr;
86 other.isLogSpaced =
false;
87 other.edgesFileName.clear();
90BinSpecification::~BinSpecification()
97 if (!edgesFileName.empty())
98 {
return edgesFileName;}
100 {
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.