LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
Base forward iterator browsing all cryostat IDs in the detector. More...
#include "GeometryCore.h"
Public Types | |
using | ElementPtr_t = geo::CryostatGeo const * |
using | GeoID_t = GEOID |
type of the actual ID stored in the iterator More... | |
using | iterator = cryostat_id_iterator_base< GeoID_t > |
this iterator More... | |
using | LocalID_t = geo::CryostatID |
type of the ID we change More... | |
Public Member Functions | |
cryostat_id_iterator_base () | |
Default constructor; effect not defined: assign to it before using! More... | |
cryostat_id_iterator_base (geo::GeometryCore const *geom) | |
Constructor: points to begin. More... | |
cryostat_id_iterator_base (geo::GeometryCore const *geom, GeoID_t const &start_from) | |
Constructor: points to the specified cryostat. More... | |
cryostat_id_iterator_base (geo::GeometryCore const *geom, BeginPos_t const) | |
Constructor: points to begin. More... | |
cryostat_id_iterator_base (geo::GeometryCore const *geom, EndPos_t) | |
Constructor: points to end. More... | |
template<typename OTHERID > | |
bool | operator== (cryostat_id_iterator_base< OTHERID > const &as) const |
Returns true if the two iterators point to the same cryostat. More... | |
template<typename OTHERID > | |
bool | operator!= (cryostat_id_iterator_base< OTHERID > const &as) const |
Returns true if the two iterators point to different cryostats. More... | |
LocalID_t const & | operator* () const |
Returns the ID the iterator points to. More... | |
LocalID_t const * | operator-> () const |
Returns a pointer to the ID the iterator points to. More... | |
iterator & | operator++ () |
Prefix increment: returns this iterator pointing to the next cryostat. 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 cryostat. More... | |
ElementPtr_t | get () const |
Returns a pointer to cryostat, or nullptr if invalid. More... | |
Static Public Attributes | |
static constexpr BeginPos_t | begin_pos = {} |
static constexpr EndPos_t | end_pos = {} |
static constexpr UndefinedPos_t | undefined_pos = {} |
Protected Types | |
using | ID_t = typename LocalID_t::CryostatID_t |
Protected Member Functions | |
cryostat_id_iterator_base (geo::GeometryCore const *geom, UndefinedPos_t) | |
Constructor: does not set the current ID. More... | |
void | next () |
Skips to the next cryostat. More... | |
bool | at_end () const |
Returns whether this iterator has reached the end. More... | |
geo::GeometryCore const * | geometry () const |
Returns a pointer to the geometry. More... | |
GeoID_t const & | ID () const |
Returns the actual type of ID we store. More... | |
GeoID_t & | ID () |
Returns the actual type of ID we store. More... | |
Private Member Functions | |
void | set_local_limits () |
Sets the limit member to the past-the-end cryostat number. More... | |
void | set_begin () |
Sets the iterator to the begin position. More... | |
void | set_end () |
Sets the iterator to the end position. More... | |
LocalID_t const & | localID () const |
Returns the type of ID we act on. More... | |
LocalID_t & | localID () |
Returns the type of ID we act on. More... | |
ID_t const & | local_index () const |
Returns the index (part if the ID) this iterator runs on. More... | |
ID_t & | local_index () |
Returns the index (part if the ID) this iterator runs on. More... | |
Private Attributes | |
GeoID_t | id |
ID of the current cryostat. More... | |
ID_t | limit = LocalID_t::InvalidID |
maximum number of cryostats More... | |
Base forward iterator browsing all cryostat IDs in the detector.
GEOID | ID type to be used |
This iterator assumes that GEOID is derived from geo::CryostatID. Note that no polymorphic behaviour is required, or expected, from GEOID.
This iterator is designed to carry on, untouched, anything else that the GEOID type defines beyond the required CryostatID data.
Currently, backward iterations are not supported.
Definition at line 160 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::ElementPtr_t = geo::CryostatGeo const* |
Definition at line 164 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::GeoID_t = GEOID |
type of the actual ID stored in the iterator
Definition at line 165 of file GeometryCore.h.
|
protected |
Definition at line 228 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::iterator = cryostat_id_iterator_base<GeoID_t> |
this iterator
Definition at line 167 of file GeometryCore.h.
using geo::details::cryostat_id_iterator_base< GEOID >::LocalID_t = geo::CryostatID |
type of the ID we change
Definition at line 169 of file GeometryCore.h.
|
inline |
Default constructor; effect not defined: assign to it before using!
Definition at line 175 of file GeometryCore.h.
|
inline |
Constructor: points to begin.
Definition at line 178 of file GeometryCore.h.
|
inline |
Constructor: points to the specified cryostat.
Definition at line 183 of file GeometryCore.h.
|
inline |
Constructor: points to begin.
Definition at line 189 of file GeometryCore.h.
|
inline |
Constructor: points to end.
Definition at line 194 of file GeometryCore.h.
|
inlineprotected |
Constructor: does not set the current ID.
Definition at line 231 of file GeometryCore.h.
|
inlineprotected |
Returns whether this iterator has reached the end.
Definition at line 245 of file GeometryCore.h.
|
inlineprotectedinherited |
Returns a pointer to the geometry.
Definition at line 135 of file GeometryCore.h.
|
inline |
Returns a pointer to cryostat, or nullptr if invalid.
Definition at line 5647 of file GeometryCore.h.
|
inlineprotected |
Returns the actual type of ID we store.
Definition at line 237 of file GeometryCore.h.
|
inlineprotected |
Returns the actual type of ID we store.
Definition at line 238 of file GeometryCore.h.
|
inlineprivate |
Returns the index (part if the ID) this iterator runs on.
Definition at line 269 of file GeometryCore.h.
|
inlineprivate |
Returns the index (part if the ID) this iterator runs on.
Definition at line 270 of file GeometryCore.h.
|
inlineprivate |
Returns the type of ID we act on.
Definition at line 262 of file GeometryCore.h.
Referenced by geo::details::cryostat_id_iterator_base< GEOID >::operator!=(), and geo::details::cryostat_id_iterator_base< GEOID >::operator==().
|
inlineprivate |
Returns the type of ID we act on.
Definition at line 264 of file GeometryCore.h.
References geo::CryostatID::Cryostat.
|
protected |
Skips to the next cryostat.
Definition at line 5664 of file GeometryCore.h.
|
inline |
Returns whether the iterator is pointing to a valid cryostat.
Definition at line 5643 of file GeometryCore.h.
|
inline |
Returns true if the two iterators point to different cryostats.
Definition at line 206 of file GeometryCore.h.
References geo::details::cryostat_id_iterator_base< GEOID >::localID().
|
inline |
Returns the ID the iterator points to.
Definition at line 210 of file GeometryCore.h.
|
inline |
Prefix increment: returns this iterator pointing to the next cryostat.
Definition at line 216 of file GeometryCore.h.
|
inline |
Postfix increment: returns the current iterator, then increments it.
Definition at line 219 of file GeometryCore.h.
|
inline |
Returns a pointer to the ID the iterator points to.
Definition at line 213 of file GeometryCore.h.
|
inline |
Returns true if the two iterators point to the same cryostat.
Definition at line 201 of file GeometryCore.h.
References geo::details::cryostat_id_iterator_base< GEOID >::localID().
|
inlineprivate |
Sets the iterator to the begin position.
Definition at line 5656 of file GeometryCore.h.
|
inlineprivate |
Sets the iterator to the end position.
Definition at line 5660 of file GeometryCore.h.
|
inlineprivate |
Sets the limit member to the past-the-end cryostat number.
Definition at line 5652 of file GeometryCore.h.
|
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 |
ID of the current cryostat.
Definition at line 248 of file GeometryCore.h.
|
private |
maximum number of cryostats
Definition at line 249 of file GeometryCore.h.
|
staticinherited |
Definition at line 121 of file GeometryCore.h.
Referenced by geo::GeometryCore::PointWithinSegments().