Manages a grid-like division of 2D space. More...
Public Member Functions | |
CellGridClass () | |
Default constructor: invalid ranges. More... | |
CellGridClass (unsigned int nWires, unsigned int nTDC) | |
Constructor: sets the extremes and assumes one cell for each element. More... | |
CellGridClass (float min_wire, float max_wire, unsigned int nWires, float min_tdc, float max_tdc, unsigned int nTDC) | |
Constructor: sets the wire and TDC ranges in detail. More... | |
size_t | NCells () const |
Returns the total number of cells in the grid. More... | |
GridAxisClass const & | WireAxis () const |
Return the information about the wires. More... | |
GridAxisClass const & | TDCAxis () const |
Return the information about the TDCs. More... | |
std::ptrdiff_t | GetCell (float wire, float tick) const |
Returns the index of specified cell, or -1 if out of range. More... | |
std::tuple< float, float, float, float > | GetCellBox (std::ptrdiff_t iCell) const |
Returns the coordinates { w1, t1, w2, t2 } of specified cell. More... | |
template<typename CONT > | |
bool | Add (CONT &cont, float wire, float tick, typename CONT::value_type v) |
bool | SetMinWireCellSize (float min_size) |
Sets the minimum size for wire cells. More... | |
bool | SetMinTDCCellSize (float min_size) |
Sets the minimum size for TDC cells. More... | |
template<typename Stream > | |
void | Dump (Stream &&out) const |
Prints the current axes on the specified stream. More... | |
bool | hasWire (float wire) const |
Returns whether the range includes the specified wire. More... | |
bool | hasWire (int wire) const |
bool | hasTick (float tick) const |
Returns whether the range includes the specified wire. More... | |
bool | hasTick (int tick) const |
Setters | |
Sets a simple wire range: all the wires, one cell per wire | |
void | SetWireRange (unsigned int nWires) |
void | SetWireRange (float min_wire, float max_wire) |
Sets the wire range, leaving the number of wire cells unchanged. More... | |
void | SetWireRange (float min_wire, float max_wire, unsigned int nWires) |
Sets the complete wire range. More... | |
void | SetWireRange (float min_wire, float max_wire, unsigned int nWires, float min_size) |
Sets the complete wire range, with minimum cell size. More... | |
void | SetTDCRange (unsigned int nTDC) |
Sets a simple TDC range: all the ticks, one cell per tick. More... | |
void | SetTDCRange (float min_tdc, float max_tdc, unsigned int nTDC) |
Sets the complete TDC range. More... | |
void | SetTDCRange (float min_tdc, float max_tdc) |
Sets the TDC range, leaving the number of ticks unchanged. More... | |
void | SetTDCRange (float min_tdc, float max_tdc, unsigned int nTDC, float min_size) |
Sets the complete TDC range, with minimum cell size. More... | |
Private Attributes | |
GridAxisClass | wire_axis |
GridAxisClass | tdc_axis |
Manages a grid-like division of 2D space.
Definition at line 492 of file RawDataDrawer.cxx.
|
inline |
evd::details::CellGridClass::CellGridClass | ( | unsigned int | nWires, |
unsigned int | nTDC | ||
) |
Constructor: sets the extremes and assumes one cell for each element.
Definition at line 2087 of file RawDataDrawer.cxx.
evd::details::CellGridClass::CellGridClass | ( | float | min_wire, |
float | max_wire, | ||
unsigned int | nWires, | ||
float | min_tdc, | ||
float | max_tdc, | ||
unsigned int | nTDC | ||
) |
Constructor: sets the wire and TDC ranges in detail.
Definition at line 2092 of file RawDataDrawer.cxx.
|
inline |
Increments the specified cell of cont with the value v
Definition at line 567 of file RawDataDrawer.cxx.
void evd::details::CellGridClass::Dump | ( | Stream && | out | ) | const |
Prints the current axes on the specified stream.
Definition at line 2130 of file RawDataDrawer.cxx.
std::ptrdiff_t evd::details::CellGridClass::GetCell | ( | float | wire, |
float | tick | ||
) | const |
Returns the index of specified cell, or -1 if out of range.
Definition at line 2103 of file RawDataDrawer.cxx.
std::tuple< float, float, float, float > evd::details::CellGridClass::GetCellBox | ( | std::ptrdiff_t | iCell | ) | const |
Returns the coordinates { w1, t1, w2, t2 } of specified cell.
Definition at line 2114 of file RawDataDrawer.cxx.
|
inline |
Returns whether the range includes the specified wire.
Definition at line 552 of file RawDataDrawer.cxx.
|
inline |
Definition at line 557 of file RawDataDrawer.cxx.
|
inline |
Returns whether the range includes the specified wire.
Definition at line 538 of file RawDataDrawer.cxx.
|
inline |
Definition at line 543 of file RawDataDrawer.cxx.
|
inline |
Returns the total number of cells in the grid.
Definition at line 510 of file RawDataDrawer.cxx.
|
inline |
Sets the minimum size for TDC cells.
Definition at line 646 of file RawDataDrawer.cxx.
|
inline |
Sets the minimum size for wire cells.
Definition at line 639 of file RawDataDrawer.cxx.
|
inline |
Sets a simple TDC range: all the ticks, one cell per tick.
Definition at line 608 of file RawDataDrawer.cxx.
|
inline |
Sets the complete TDC range.
Definition at line 615 of file RawDataDrawer.cxx.
|
inline |
Sets the TDC range, leaving the number of ticks unchanged.
Definition at line 622 of file RawDataDrawer.cxx.
|
inline |
Sets the complete TDC range, with minimum cell size.
Definition at line 629 of file RawDataDrawer.cxx.
|
inline |
Definition at line 579 of file RawDataDrawer.cxx.
|
inline |
Sets the wire range, leaving the number of wire cells unchanged.
Definition at line 586 of file RawDataDrawer.cxx.
|
inline |
Sets the complete wire range.
Definition at line 593 of file RawDataDrawer.cxx.
|
inline |
Sets the complete wire range, with minimum cell size.
Definition at line 600 of file RawDataDrawer.cxx.
|
inline |
|
inline |
|
private |
Definition at line 657 of file RawDataDrawer.cxx.
|
private |
Definition at line 656 of file RawDataDrawer.cxx.