Belle II Software light-2406-ragdoll
|
Class for handling LookUp tables. More...
#include <ParticleWeightingAxis.h>
Public Member Functions | |
ParticleWeightingAxis () | |
Constructor. | |
std::string | getName () const |
Returns name of an axis. | |
void | setName (const std::string &name) |
Sets name of an axis. | |
int | addBin (ParticleWeightingBinLimits *bin) |
Check if bin exists and creates it if not. | |
int | findBin (ParticleWeightingBinLimits *bin) const |
Returns id of bin with given bin limits Returns out-of-range binID if can't find. | |
int | findBin (double value) const |
Returns id of bin containing value. | |
void | printAxis () const |
Prints axis information to the B2INFO stream. | |
Private Member Functions | |
bool | isOverlappingBin (ParticleWeightingBinLimits *bin) |
Return TRUE if bin exists or overlaps with existing. | |
Private Attributes | |
BinMap | m_unnamedAxis |
Named axis with bins. | |
std::string | m_axisName |
Axis name. | |
const int | m_outOfRangeBinID = -1 |
ID of out-of-range bin. | |
Class for handling LookUp tables.
Definition at line 26 of file ParticleWeightingAxis.h.
|
inline |
int addBin | ( | ParticleWeightingBinLimits * | bin | ) |
Check if bin exists and creates it if not.
Returns bin ID Issues fatal error in case of overlapping bins.
bin | bin limits |
Definition at line 46 of file ParticleWeightingAxis.cc.
int findBin | ( | double | value | ) | const |
Returns id of bin containing value.
value | value |
Definition at line 73 of file ParticleWeightingAxis.cc.
int findBin | ( | ParticleWeightingBinLimits * | bin | ) | const |
Returns id of bin with given bin limits Returns out-of-range binID if can't find.
bin | bin limits |
Definition at line 62 of file ParticleWeightingAxis.cc.
|
inline |
Returns name of an axis.
Definition at line 51 of file ParticleWeightingAxis.h.
|
private |
Return TRUE if bin exists or overlaps with existing.
bin | - tested bin |
Checking if lower border is within some bin existing binning: | | new binning: | |
Checking if upper border is within some bin existing binning: | | new binning: | |
Checking if new bin covers existing bin completely existing binning: | | new binning: | |
Definition at line 14 of file ParticleWeightingAxis.cc.
void printAxis | ( | ) | const |
Prints axis information to the B2INFO stream.
Definition at line 83 of file ParticleWeightingAxis.cc.
|
inline |
Sets name of an axis.
name | axis name |
Definition at line 57 of file ParticleWeightingAxis.h.
|
private |
Axis name.
Definition at line 30 of file ParticleWeightingAxis.h.
|
private |
ID of out-of-range bin.
Definition at line 32 of file ParticleWeightingAxis.h.
|
private |
Named axis with bins.
Definition at line 28 of file ParticleWeightingAxis.h.