Represent the binning of a Spectrum's x-axis. More...
#include <Binning.h>
Public Member Functions | |
int | NBins () const |
double | Min () const |
double | Max () const |
int | FindBin (float x) const |
bool | IsSimple () const |
const std::vector< double > & | Edges () const |
const std::vector< std::string > & | Labels () const |
void | SaveTo (TDirectory *dir) const |
int | ID () const |
bool | operator== (const Binning &rhs) const |
bool | operator< (const Binning &rhs) const |
Static Public Member Functions | |
static Binning | Simple (int n, double lo, double hi, const std::vector< std::string > &labels={}) |
static Binning | LogUniform (int n, double lo, double hi) |
static Binning | Custom (const std::vector< double > &edges) |
static Binning | FromTAxis (const TAxis *ax) |
static std::unique_ptr< Binning > | LoadFrom (TDirectory *dir) |
static int | MaxID () |
Protected Member Functions | |
Binning () | |
Static Protected Member Functions | |
static Binning | SimpleHelper (int n, double lo, double hi, const std::vector< std::string > &labels={}) |
static Binning | CustomHelper (const std::vector< double > &edges) |
static std::map< Binning, int > & | IDMap () |
Protected Attributes | |
std::vector< double > | fEdges |
std::vector< std::string > | fLabels |
int | fNBins |
double | fMin |
double | fMax |
bool | fIsSimple |
int | fID |
Static Protected Attributes | |
static int | fgNextID = 0 |
The next ID that hasn't yet been assigned. More... | |
Represent the binning of a Spectrum's x-axis.
May be "Simple" (equally spaced) or "Custom" (arbitrary binning)
|
protected |
Definition at line 13 of file Binning.cxx.
|
static |
Definition at line 83 of file Binning.cxx.
|
staticprotected |
Definition at line 68 of file Binning.cxx.
|
inline |
int ana::Binning::FindBin | ( | float | x | ) | const |
Definition at line 100 of file Binning.cxx.
|
static |
Definition at line 122 of file Binning.cxx.
|
staticprotected |
Definition at line 290 of file Binning.cxx.
|
inline |
|
static |
Definition at line 229 of file Binning.cxx.
|
static |
Definition at line 56 of file Binning.cxx.
|
inlinestatic |
Definition at line 43 of file Binning.h.
bool ana::Binning::operator< | ( | const Binning & | rhs | ) | const |
Definition at line 278 of file Binning.cxx.
bool ana::Binning::operator== | ( | const Binning & | rhs | ) | const |
Definition at line 264 of file Binning.cxx.
void ana::Binning::SaveTo | ( | TDirectory * | dir | ) | const |
Definition at line 197 of file Binning.cxx.
|
static |
Definition at line 38 of file Binning.cxx.
|
staticprotected |
Definition at line 19 of file Binning.cxx.
|
staticprotected |