1 #ifndef LARCOREALG_GEOMETRY_DETAILS_ELEMENT_ITERATORS_H 2 #define LARCOREALG_GEOMETRY_DETAILS_ELEMENT_ITERATORS_H 12 #include "cetlib_except/exception.h" 35 template <
typename Owner,
typename Element,
typename GEOIDITER>
41 "template class for geometry_element_iterator must be a geometry iterator");
47 using LocalID_t =
typename id_iterator_t::LocalID_t;
48 using GeoID_t =
typename id_iterator_t::GeoID_t;
80 <<
"iterator attempted to obtain geometry element " << std::string(
ID());
118 template <
typename Owner,
typename Element,
typename IterationPolicy>
122 template <
typename Element>
126 template <
typename Owner,
typename Element,
typename GEOIDITER>
133 template <
typename Owner,
typename Element,
typename GEOIDITER>
140 template <
typename Owner,
typename Element,
typename GEOIDITER>
147 template <
typename Owner,
typename Element,
typename GEOIDITER>
154 template <
typename Owner,
typename Element,
typename GEOIDITER>
161 template <
typename Owner,
typename Element,
typename GEOIDITER>
170 #endif // LARCOREALG_GEOMETRY_DETAILS_ELEMENT_ITERATORS_H std::forward_iterator_tag iterator_category
value_type const * pointer
bool validElement(GeometryCore const *geom, CryostatID const &id)
CryostatGeo const * getElementPtr(GeometryCore const *geom, CryostatID const &id)
iterator & operator++()
Prefix increment: returns this iterator pointing to the next element.
LocalID_t const & ID() const
Returns the ID of the pointed geometry element.
iterator operator++(int)
Postfix increment: returns the current iterator, then increments it.
bool operator==(geometry_element_iterator< Owner, Element, GEOIDITER > const &a, geometry_element_iterator< Owner, Element, GEOIDITER > const &b)
reference operator*() const
Returns the geometry element the iterator points to.
Definition of data types for geometry description.
geometry_element_iterator()=default
Default constructor; effect not defined: assign to it before using!
bool operator!=(geometry_element_iterator< Owner, Element, GEOIDITER > const &a, geometry_element_iterator< Owner, Element, GEOIDITER > const &b)
std::ptrdiff_t difference_type
Element const * ElementPtr_t
Stream output for all geometry ID iterator types: prints the pointed ID.
typename id_iterator_t::GeoID_t GeoID_t
geometry_element_iterator(Owner const *owner, id_iterator_t const &iter)
Constructor: points to the same element as the specified ID iterator.
value_type const & reference
Forward iterator browsing all geometry elements in the detector.
pointer operator->() const
Returns a pointer to the element the iterator points to (or nullptr)
cet::coded_exception< error, detail::translate > exception
typename id_iterator_t::LocalID_t LocalID_t