LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Forward iterator browsing all geometry elements in the detector. More...
#include "GeometryCore.h"
Public Types | |
using | id_iterator_t = GEOIDITER |
using | iterator = geometry_element_iterator< id_iterator_t > |
this type More... | |
using | Element_t = typename std::remove_pointer< ElementPtr_t >::type |
Geometry class pointed by the iterator. More... | |
Types mirrored from the ID iterator | |
using | LocalID_t = typename id_iterator_t::LocalID_t |
using | GeoID_t = typename id_iterator_t::GeoID_t |
using | UndefinedPos_t = typename id_iterator_t::UndefinedPos_t |
using | BeginPos_t = typename id_iterator_t::BeginPos_t |
using | EndPos_t = typename id_iterator_t::EndPos_t |
using | ElementPtr_t = typename id_iterator_t::ElementPtr_t |
Public Member Functions | |
geometry_element_iterator ()=default | |
Default constructor; effect not defined: assign to it before using! More... | |
geometry_element_iterator (geo::GeometryCore const *geom) | |
Constructor: points to begin. More... | |
geometry_element_iterator (id_iterator_t const &iter) | |
Constructor: points to the same element as the specified ID iterator. More... | |
geometry_element_iterator (id_iterator_t &&iter) | |
Constructor: points to the same element as the specified ID iterator. More... | |
geometry_element_iterator (geo::GeometryCore const *geom, GeoID_t const &start_from) | |
Constructor: points to the specified geometry element. More... | |
geometry_element_iterator (geo::GeometryCore const *geom, BeginPos_t const pos) | |
Constructor: points to beginning. More... | |
geometry_element_iterator (geo::GeometryCore const *geom, EndPos_t const pos) | |
Constructor: points to end. More... | |
bool | operator== (iterator const &as) const |
Returns true if the two iterators point to the same object. More... | |
bool | operator!= (iterator const &as) const |
Returns true if the two iterators point to different objects. More... | |
Element_t const & | operator* () const |
Returns the geometry element the iterator points to. More... | |
Element_t const * | operator-> () const |
Returns a pointer to the element the iterator points to (or nullptr) More... | |
iterator & | operator++ () |
Prefix increment: returns this iterator pointing to the next element. More... | |
iterator | operator++ (int) |
Postfix increment: returns the current iterator, then increments it. More... | |
operator bool () const | |
Returns whether the iterator is pointing to a valid geometry element. More... | |
ElementPtr_t | get () const |
Returns a pointer to the geometry element, or nullptr if invalid. More... | |
LocalID_t const & | ID () const |
Returns the ID of the pointed geometry element. More... | |
Static Public Attributes | |
static constexpr BeginPos_t | begin_pos = {} |
static constexpr EndPos_t | end_pos = {} |
static constexpr UndefinedPos_t | undefined_pos = {} |
Protected Member Functions | |
id_iterator_t const & | id_iterator () const |
Access to the base ID iterator. More... | |
id_iterator_t & | id_iterator () |
Access to the base ID iterator. More... | |
Private Attributes | |
id_iterator_t | id_iter |
iterator performing the job More... | |
Friends | |
bool | geo::details::operator== (iterator const &iter, id_iterator_t const &id_iter) |
bool | geo::details::operator== (id_iterator_t const &id_iter, iterator const &iter) |
bool | geo::details::operator!= (iterator const &iter, id_iterator_t const &id_iter) |
bool | geo::details::operator!= (id_iterator_t const &id_iter, iterator const &iter) |
Forward iterator browsing all geometry elements in the detector.
GEOITER | type of geometry ID iterator |
This iterator works as the corresponding ID iterator in the template argument. The difference is the dereferenciation operator: this one obtains the geometry element directly, or throws on failure. The boolean conversion operator checks that it can obtain a pointer to the geometry element.
In particular, get() and ID() methods still return the pointer to the geometry element and its ID, respectively.
It can also be initialized and compare with the corresponding ID iterator.
Definition at line 688 of file GeometryCore.h.
using geo::details::geometry_element_iterator< GEOIDITER >::BeginPos_t = typename id_iterator_t::BeginPos_t |
Definition at line 754 of file GeometryCore.h.
using geo::details::geometry_element_iterator< GEOIDITER >::Element_t = typename std::remove_pointer<ElementPtr_t>::type |
Geometry class pointed by the iterator.
Definition at line 767 of file GeometryCore.h.
using geo::details::geometry_element_iterator< GEOIDITER >::ElementPtr_t = typename id_iterator_t::ElementPtr_t |
Definition at line 756 of file GeometryCore.h.
using geo::details::geometry_element_iterator< GEOIDITER >::EndPos_t = typename id_iterator_t::EndPos_t |
Definition at line 755 of file GeometryCore.h.
using geo::details::geometry_element_iterator< GEOIDITER >::GeoID_t = typename id_iterator_t::GeoID_t |
Definition at line 752 of file GeometryCore.h.
using geo::details::geometry_element_iterator< GEOIDITER >::id_iterator_t = GEOIDITER |
Definition at line 739 of file GeometryCore.h.
using geo::details::geometry_element_iterator< GEOIDITER >::iterator = geometry_element_iterator<id_iterator_t> |
this type
Definition at line 747 of file GeometryCore.h.
using geo::details::geometry_element_iterator< GEOIDITER >::LocalID_t = typename id_iterator_t::LocalID_t |
Definition at line 751 of file GeometryCore.h.
using geo::details::geometry_element_iterator< GEOIDITER >::UndefinedPos_t = typename id_iterator_t::UndefinedPos_t |
Definition at line 753 of file GeometryCore.h.
|
default |
Default constructor; effect not defined: assign to it before using!
|
inline |
Constructor: points to begin.
Definition at line 773 of file GeometryCore.h.
|
inline |
Constructor: points to the same element as the specified ID iterator.
Definition at line 777 of file GeometryCore.h.
|
inline |
Constructor: points to the same element as the specified ID iterator.
Definition at line 780 of file GeometryCore.h.
|
inline |
Constructor: points to the specified geometry element.
Definition at line 784 of file GeometryCore.h.
|
inline |
Constructor: points to beginning.
Definition at line 790 of file GeometryCore.h.
|
inline |
Constructor: points to end.
Definition at line 796 of file GeometryCore.h.
|
inline |
Returns a pointer to the geometry element, or nullptr if invalid.
Definition at line 838 of file GeometryCore.h.
References geo::details::geometry_element_iterator< GEOIDITER >::get().
Referenced by geo::details::geometry_element_iterator< GEOIDITER >::get().
|
inline |
Returns the ID of the pointed geometry element.
Definition at line 841 of file GeometryCore.h.
|
inlineprotected |
Access to the base ID iterator.
Definition at line 855 of file GeometryCore.h.
Referenced by geo::details::operator!=(), geo::details::geometry_element_iterator< GEOIDITER >::operator!=(), geo::details::operator==(), and geo::details::geometry_element_iterator< GEOIDITER >::operator==().
|
inlineprotected |
Access to the base ID iterator.
Definition at line 856 of file GeometryCore.h.
|
inline |
Returns whether the iterator is pointing to a valid geometry element.
Definition at line 834 of file GeometryCore.h.
|
inline |
Returns true if the two iterators point to different objects.
Definition at line 805 of file GeometryCore.h.
References geo::details::geometry_element_iterator< GEOIDITER >::id_iterator().
|
inline |
Returns the geometry element the iterator points to.
cet::exception | (category "geometry_iterator") if no valid geometry element is currently pointed by the iterator |
Definition at line 814 of file GeometryCore.h.
|
inline |
Prefix increment: returns this iterator pointing to the next element.
Definition at line 827 of file GeometryCore.h.
|
inline |
Postfix increment: returns the current iterator, then increments it.
Definition at line 830 of file GeometryCore.h.
|
inline |
Returns a pointer to the element the iterator points to (or nullptr)
Definition at line 824 of file GeometryCore.h.
|
inline |
Returns true if the two iterators point to the same object.
Definition at line 801 of file GeometryCore.h.
References geo::details::geometry_element_iterator< GEOIDITER >::id_iterator().
|
friend |
|
friend |
|
friend |
|
friend |
|
staticinherited |
Definition at line 119 of file GeometryCore.h.
Referenced by geo::GeometryCore::begin_cryostat(), geo::GeometryCore::begin_cryostat_id(), geo::GeometryCore::begin_plane(), geo::GeometryCore::begin_plane_id(), geo::GeometryCore::begin_ROP_id(), geo::GeometryCore::begin_TPC(), geo::GeometryCore::begin_TPC_id(), geo::GeometryCore::begin_TPCset_id(), geo::GeometryCore::begin_wire(), geo::GeometryCore::begin_wire_id(), and geo::GeometryCore::PointWithinSegments().
|
staticinherited |
Definition at line 120 of file GeometryCore.h.
Referenced by geo::GeometryCore::end_cryostat(), geo::GeometryCore::end_cryostat_id(), geo::GeometryCore::end_plane(), geo::GeometryCore::end_plane_id(), geo::GeometryCore::end_ROP_id(), geo::GeometryCore::end_TPC(), geo::GeometryCore::end_TPC_id(), geo::GeometryCore::end_TPCset_id(), geo::GeometryCore::end_wire(), geo::GeometryCore::end_wire_id(), and geo::GeometryCore::PointWithinSegments().
|
private |
iterator performing the job
Definition at line 860 of file GeometryCore.h.
|
staticinherited |
Definition at line 121 of file GeometryCore.h.
Referenced by geo::GeometryCore::PointWithinSegments().