LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Proxy collection class for space points associated to charge. More...
#include "ChargedSpacePoints.h"
Public Types | |
using | element_proxy_t = SpacePointWithCharge< collection_proxy_t > |
Type of element of this collection proxy. More... | |
using | aux_collections_t = std::tuple< AuxColls... > |
Tuple of all auxiliary data collections (wrappers). More... | |
using | value_type = element_proxy_t |
Type of element of this collection proxy. More... | |
using | const_iterator = details::IndexBasedIterator< collection_proxy_t > |
Type of iterator to this collection (constant). More... | |
using | iterator = const_iterator |
Type of iterator to this collection (still constant). More... | |
using | main_element_t = util::collection_value_t< MainColl > |
Type of the elements in the original collection. More... | |
using | main_collection_t = MainColl |
Type of the original collection. More... | |
Public Member Functions | |
auto const & | spacePoints () const |
Returns the original collection of space points. More... | |
auto const & | charges () const |
Returns the original collection of charge information. More... | |
element_proxy_t const | operator[] (std::size_t i) const |
Returns the element of this collection with the specified index. More... | |
const_iterator | begin () const |
Returns an iterator to the first element of the collection. More... | |
const_iterator | end () const |
Returns an iterator past the last element of the collection. More... | |
bool | empty () const |
Returns whether this collection is empty. More... | |
std::size_t | size () const |
Returns the size of this collection. More... | |
auto | get () const -> decltype(auto) |
Returns the associated data proxy specified by AuxTag . More... | |
auto | getIf () const -> decltype(auto) |
Returns the auxiliary data specified by type (Tag ). More... | |
main_collection_t const & | main () const |
Returns the wrapped collection. More... | |
main_collection_t const & | mainRef () const |
Returns a reference to the wrapped collection. More... | |
main_collection_t const * | mainPtr () const |
Returns a pointer to the wrapped collection. More... | |
Static Public Member Functions | |
static constexpr bool | has () |
Returns whether this class knowns about the specified type (Tag ). More... | |
Protected Types | |
using | this_t = MainCollectionProxy< main_collection_t > |
This type. More... | |
Protected Member Functions | |
AuxColl const & | aux () const |
Returns the auxiliary data specified by type. More... | |
auto | auxByTag () const -> decltype(auto) |
Returns the auxiliary data specified by type. More... | |
auto | getIfHas (util::bool_constant< true >) const -> decltype(auto) |
auto | getIfHas (util::bool_constant< false >) const -> T |
const_iterator | makeIterator (std::size_t i) const |
Returns an iterator pointing to the specified index of this collection. More... | |
this_t & | mainProxy () |
Return this object as main collection proxy. More... | |
this_t const & | mainProxy () const |
Return this object as main collection proxy. More... | |
auto | getMainAt (std::size_t i) const -> decltype(auto) |
Returns the specified item in the original collection. More... | |
Private Types | |
using | base_t = CollectionProxyBase< SpacePointWithCharge, MainColl, AuxColl... > |
Proxy collection class for space points associated to charge.
MainColl | type of space point collection |
AuxColl | types of auxiliary data collections |
This proxy collection allows access to space point and charge collection directly:
When accessing the collection proxy element by element (that is, charged space point by charged space point), the available interface is documented in proxy::SpacePointWithCharge
.
The standard proxy interface is also available (see proxy::CollectionProxyBase
).
Definition at line 323 of file ChargedSpacePoints.h.
|
inherited |
Tuple of all auxiliary data collections (wrappers).
Definition at line 138 of file CollectionProxy.h.
|
private |
Definition at line 327 of file ChargedSpacePoints.h.
|
inherited |
Type of iterator to this collection (constant).
Definition at line 144 of file CollectionProxy.h.
|
inherited |
Type of element of this collection proxy.
Definition at line 135 of file CollectionProxy.h.
|
inherited |
Type of iterator to this collection (still constant).
Definition at line 147 of file CollectionProxy.h.
|
inherited |
Type of the original collection.
Definition at line 43 of file MainCollectionProxy.h.
|
inherited |
Type of the elements in the original collection.
Definition at line 46 of file MainCollectionProxy.h.
|
protectedinherited |
This type.
Definition at line 63 of file MainCollectionProxy.h.
|
inherited |
Type of element of this collection proxy.
Definition at line 141 of file CollectionProxy.h.
|
inlineprotectedinherited |
Returns the auxiliary data specified by type.
Definition at line 263 of file CollectionProxy.h.
|
inlineprotectedinherited |
Returns the auxiliary data specified by type.
Definition at line 267 of file CollectionProxy.h.
|
inlineinherited |
Returns an iterator to the first element of the collection.
Definition at line 179 of file CollectionProxy.h.
|
inline |
Returns the original collection of charge information.
Definition at line 337 of file ChargedSpacePoints.h.
|
inlineinherited |
Returns whether this collection is empty.
Definition at line 185 of file CollectionProxy.h.
References main().
|
inlineinherited |
Returns an iterator past the last element of the collection.
Definition at line 182 of file CollectionProxy.h.
|
inlineinherited |
Returns the associated data proxy specified by AuxTag
.
Definition at line 193 of file CollectionProxy.h.
|
inherited |
Returns the auxiliary data specified by type (Tag
).
Tag | tag of the data to fetch (usually, its type) |
T | exact type returned by the method (by default a vector of tags) |
Tag
). std::logic_error | if the tag is not available. |
This method is a get()
which forgives when the requested type is not available (because this proxy was configured not to hold it).
The difference with get()
is the following:
If the proxy tracks
has not been coded with recob::Hit
data, the code snippet will not compile, because get()
will not compile for tags that were not coded in. On the other end, if recob::Hit
is coded in tracks
but recob::SpacePoint
is not, the snippet will compile. In that case, if the has()
check had been omitted, getIt()
would throw a std::logic_error
exception when executed. With C++17, this will not be necessary any more by using "constexpr if":
T
.
|
protectedinherited |
|
protectedinherited |
|
inlineprotectedinherited |
Returns the specified item in the original collection.
Definition at line 72 of file MainCollectionProxy.h.
References proxy::details::MainCollectionProxy< MainColl >::fMain.
|
inlinestaticinherited |
Returns whether this class knowns about the specified type (Tag
).
Definition at line 252 of file CollectionProxy.h.
References main().
|
inlineinherited |
Returns the wrapped collection.
Definition at line 52 of file MainCollectionProxy.h.
References proxy::details::MainCollectionProxy< MainColl >::mainRef().
|
inlineprotectedinherited |
Return this object as main collection proxy.
Definition at line 66 of file MainCollectionProxy.h.
|
inlineprotectedinherited |
Return this object as main collection proxy.
Definition at line 69 of file MainCollectionProxy.h.
|
inlineinherited |
Returns a pointer to the wrapped collection.
Definition at line 58 of file MainCollectionProxy.h.
References proxy::details::MainCollectionProxy< MainColl >::fMain.
|
inlineinherited |
Returns a reference to the wrapped collection.
Definition at line 55 of file MainCollectionProxy.h.
References proxy::details::MainCollectionProxy< MainColl >::fMain.
Referenced by proxy::details::MainCollectionProxy< MainColl >::main().
|
inlineprotectedinherited |
Returns an iterator pointing to the specified index of this collection.
Definition at line 277 of file CollectionProxy.h.
|
inlineinherited |
Returns the element of this collection with the specified index.
i | the index in the collection |
The returned value is an object created on the spot, not a reference to an existing structure. The structure exposes the i
-th element in the main collection, plus all objects that are associated to it.
Definition at line 172 of file CollectionProxy.h.
|
inlineinherited |
Returns the size of this collection.
Definition at line 188 of file CollectionProxy.h.
References main().
|
inline |
Returns the original collection of space points.
Definition at line 333 of file ChargedSpacePoints.h.
References main().