1 #ifndef NPSTAT_NUHISTOAXIS_HH_ 2 #define NPSTAT_NUHISTOAXIS_HH_ 17 #include "Alignment/Geners/interface/ClassId.hh" 21 template <
typename Numeric,
class Axis>
class HistoND;
35 NUHistoAxis(
const std::vector<double>& binEdges,
const char*
label =
nullptr);
70 {
label_ = newlabel ? newlabel :
"";}
82 double fltBinNumber(
double x,
bool mapLeftEdgeTo0=
true)
const;
101 inline gs::ClassId
classId()
const {
return gs::ClassId(*
this);}
102 bool write(std::ostream&
of)
const;
105 static inline const char*
classname() {
return "npstat::NUHistoAxis";}
111 const char*
label =
nullptr);
120 template <
typename Numeric,
class Axis>
friend class HistoND;
124 const double x,
unsigned* binNum)
const 138 nBins_(0), uniform_(
false) {}
142 #endif // NPSTAT_NUHISTOAXIS_HH_ unsigned closestValidBin(double x) const
std::vector< double > binEdges_
double rightBinEdge(const int binNum) const
int binNumber(double x) const
unsigned overflowIndex(const double x, unsigned *binNum) const
void setLabel(const char *newlabel)
bool write(std::ostream &of) const
bool operator!=(const NUHistoAxis &) const
NUHistoAxis rebin(unsigned newBins) const
double leftBinEdge(const int binNum) const
double binCenter(const int binNum) const
gs::ClassId classId() const
static unsigned version()
Interval< double > interval() const
static NUHistoAxis * read(const gs::ClassId &id, std::istream &in)
bool isClose(const NUHistoAxis &, double tol) const
double fltBinNumber(double x, bool mapLeftEdgeTo0=true) const
Interval< double > binInterval(const int binNum) const
static const char * classname()
bool operator==(const NUHistoAxis &) const
double binWidth(const int binNum) const
const std::string & label() const