LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
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 |
Returns whether the range includes the specified wire. More... | |
bool | hasTick (float tick) const |
Returns whether the range includes the specified wire. More... | |
bool | hasTick (int tick) const |
Returns whether the range includes the specified wire. More... | |
Setters | |
Sets a simple wire range: all the wires, one cell per wire | |
void | SetWireRange (unsigned int nWires) |
Sets the wire range, leaving the number of wire cells unchanged. More... | |
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... | |
Protected Attributes | |
GridAxisClass | wire_axis |
GridAxisClass | tdc_axis |
Manages a grid-like division of 2D space.
Definition at line 405 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 1864 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 1872 of file RawDataDrawer.cxx.
|
inline |
Increments the specified cell of cont with the value v
Definition at line 453 of file RawDataDrawer.cxx.
void evd::details::CellGridClass::Dump | ( | Stream && | out | ) | const |
Prints the current axes on the specified stream.
Definition at line 1911 of file RawDataDrawer.cxx.
References evd::details::GridAxisClass::Dump(), TDCAxis(), and WireAxis().
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 1883 of file RawDataDrawer.cxx.
References evd::details::GridAxisClass::GetCell(), GetCellBox(), evd::details::GridAxisClass::hasCell(), evd::details::GridAxisClass::NCells(), tdc_axis, TDCAxis(), and wire_axis.
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 1894 of file RawDataDrawer.cxx.
References evd::details::GridAxisClass::LowerEdge(), evd::details::GridAxisClass::NCells(), TDCAxis(), evd::details::GridAxisClass::UpperEdge(), and WireAxis().
Referenced by GetCell(), and evd::RawDataDrawer::QueueDrawingBoxes().
|
inline |
Returns whether the range includes the specified wire.
Definition at line 445 of file RawDataDrawer.cxx.
|
inline |
Returns whether the range includes the specified wire.
Definition at line 446 of file RawDataDrawer.cxx.
References hasTick().
Referenced by hasTick().
|
inline |
Returns whether the range includes the specified wire.
Definition at line 439 of file RawDataDrawer.cxx.
|
inline |
Returns whether the range includes the specified wire.
Definition at line 440 of file RawDataDrawer.cxx.
References hasWire().
Referenced by hasWire().
|
inline |
Returns the total number of cells in the grid.
Definition at line 421 of file RawDataDrawer.cxx.
|
inline |
Sets the minimum size for TDC cells.
Definition at line 511 of file RawDataDrawer.cxx.
Referenced by evd::RawDataDrawer::SetDrawingLimits().
|
inline |
Sets the minimum size for wire cells.
Definition at line 507 of file RawDataDrawer.cxx.
Referenced by evd::RawDataDrawer::SetDrawingLimits().
|
inline |
Sets a simple TDC range: all the ticks, one cell per tick.
Definition at line 485 of file RawDataDrawer.cxx.
Referenced by evd::RawDataDrawer::ExtractRange(), and evd::RawDataDrawer::SetDrawingLimits().
|
inline |
Sets the complete TDC range.
Definition at line 489 of file RawDataDrawer.cxx.
|
inline |
Sets the TDC range, leaving the number of ticks unchanged.
Definition at line 493 of file RawDataDrawer.cxx.
|
inline |
Sets the complete TDC range, with minimum cell size.
Definition at line 498 of file RawDataDrawer.cxx.
|
inline |
Sets the wire range, leaving the number of wire cells unchanged.
Definition at line 465 of file RawDataDrawer.cxx.
Referenced by evd::RawDataDrawer::ExtractRange(), and evd::RawDataDrawer::SetDrawingLimits().
|
inline |
Sets the wire range, leaving the number of wire cells unchanged.
Definition at line 469 of file RawDataDrawer.cxx.
|
inline |
Sets the complete wire range.
Definition at line 473 of file RawDataDrawer.cxx.
|
inline |
Sets the complete wire range, with minimum cell size.
Definition at line 478 of file RawDataDrawer.cxx.
|
inline |
Return the information about the TDCs.
Definition at line 427 of file RawDataDrawer.cxx.
Referenced by Dump(), GetCell(), and GetCellBox().
|
inline |
Return the information about the wires.
Definition at line 424 of file RawDataDrawer.cxx.
Referenced by Dump(), and GetCellBox().
|
protected |
Definition at line 520 of file RawDataDrawer.cxx.
Referenced by GetCell().
|
protected |
Definition at line 519 of file RawDataDrawer.cxx.
Referenced by GetCell().