LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Manages a cell-like division of a coordinate. More...
Public Member Functions | |
GridAxisClass () | |
Default constructor: an invalid range. More... | |
GridAxisClass (size_t nDiv, float new_min, float new_max) | |
Constructor: sets the limits and the number of cells. More... | |
bool | hasCell (std::ptrdiff_t iCell) const |
Returns whether the cell is present or not. More... | |
bool | hasCoord (float coord) const |
Returns whether the coordinate is included in the range or not. More... | |
float | Length () const |
Returns the length of the axis. More... | |
size_t | NCells () const |
Returns the length of the axis. More... | |
bool | isEmpty () const |
Returns whether minimum and maximum match. More... | |
float | CellSize () const |
Returns the cell size. More... | |
float | LowerEdge (std::ptrdiff_t iCell) const |
Returns the lower edge of the cell. More... | |
float | UpperEdge (std::ptrdiff_t iCell) const |
Returns the upper edge of the cell. More... | |
bool | Init (size_t nDiv, float new_min, float new_max) |
Initialize the axis, returns whether cell size is finite. More... | |
bool | SetLimits (float new_min, float new_max) |
Initialize the axis limits, returns whether cell size is finite. More... | |
bool | SetMinCellSize (float min_size) |
bool | SetMaxCellSize (float max_size) |
bool | SetCellSizeBoundary (float min_size, float max_size) |
template<typename Stream > | |
void | Dump (Stream &&out) const |
std::ptrdiff_t | GetCell (float coord) const |
Returns the index of the specified cell. More... | |
std::ptrdiff_t | operator() (float coord) const |
Returns the index of the specified cell. More... | |
float | Min () const |
Returns the extremes of the axis. More... | |
float | Max () const |
Returns the extremes of the axis. More... | |
Private Attributes | |
size_t | n_cells |
number of cells in the axis More... | |
float | min |
float | max |
extremes of the axis More... | |
float | cell_size |
size of each cell More... | |
Manages a cell-like division of a coordinate.
Definition at line 306 of file RawDataDrawer.cxx.
|
inline |
Default constructor: an invalid range.
Definition at line 309 of file RawDataDrawer.cxx.
|
inline |
Constructor: sets the limits and the number of cells.
Definition at line 312 of file RawDataDrawer.cxx.
References geo::vect::coord().
|
inline |
Returns the cell size.
Definition at line 345 of file RawDataDrawer.cxx.
void evd::details::GridAxisClass::Dump | ( | Stream && | out | ) | const |
Definition at line 1834 of file RawDataDrawer.cxx.
References tca::Length().
Referenced by evd::details::CellGridClass::Dump().
std::ptrdiff_t evd::details::GridAxisClass::GetCell | ( | float | coord | ) | const |
Returns the index of the specified cell.
Definition at line 1780 of file RawDataDrawer.cxx.
Referenced by evd::details::CellGridClass::GetCell().
|
inline |
Returns whether the cell is present or not.
Definition at line 321 of file RawDataDrawer.cxx.
Referenced by evd::details::CellGridClass::GetCell().
|
inline |
Returns whether the coordinate is included in the range or not.
Definition at line 327 of file RawDataDrawer.cxx.
bool evd::details::GridAxisClass::Init | ( | size_t | nDiv, |
float | new_min, | ||
float | new_max | ||
) |
Initialize the axis, returns whether cell size is finite.
Definition at line 1786 of file RawDataDrawer.cxx.
|
inline |
|
inline |
|
inline |
Returns the lower edge of the cell.
Definition at line 348 of file RawDataDrawer.cxx.
Referenced by evd::details::CellGridClass::GetCellBox().
|
inline |
|
inline |
|
inline |
Returns the length of the axis.
Definition at line 339 of file RawDataDrawer.cxx.
Referenced by evd::details::CellGridClass::GetCell(), and evd::details::CellGridClass::GetCellBox().
|
inline |
Returns the index of the specified cell.
Definition at line 317 of file RawDataDrawer.cxx.
|
inline |
Expands the cell (at fixed range) to meet maximum cell size
Definition at line 369 of file RawDataDrawer.cxx.
bool evd::details::GridAxisClass::SetLimits | ( | float | new_min, |
float | new_max | ||
) |
Initialize the axis limits, returns whether cell size is finite.
Definition at line 1795 of file RawDataDrawer.cxx.
References tca::Length().
bool evd::details::GridAxisClass::SetMaxCellSize | ( | float | max_size | ) |
Expands the cell (at fixed range) to meet maximum cell size
Definition at line 1819 of file RawDataDrawer.cxx.
References tca::Length().
bool evd::details::GridAxisClass::SetMinCellSize | ( | float | min_size | ) |
Expands the cell (at fixed range) to meet minimum cell size
Definition at line 1805 of file RawDataDrawer.cxx.
References tca::Length().
|
inline |
Returns the upper edge of the cell.
Definition at line 351 of file RawDataDrawer.cxx.
Referenced by evd::details::CellGridClass::GetCellBox().
|
private |
size of each cell
Definition at line 381 of file RawDataDrawer.cxx.
|
private |
extremes of the axis
Definition at line 379 of file RawDataDrawer.cxx.
|
private |
Definition at line 379 of file RawDataDrawer.cxx.
|
private |
number of cells in the axis
Definition at line 378 of file RawDataDrawer.cxx.