LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Proxy class for charged space point proxy elements. More...
#include "ChargedSpacePoints.h"
Public Types | |
using | base_t = CollectionProxyElement< CollProxy > |
Base type. More... | |
using | collection_proxy_t = CollProxy |
using | main_element_t = typename collection_proxy_t::main_element_t |
using | aux_elements_t = typename details::SubstituteWithAuxList< typename collection_proxy_t::aux_collections_t >::type |
Tuple of elements (expected to be tagged types). More... | |
Public Member Functions | |
recob::PointCharge const & | chargeInfo () const |
main_element_t const * | operator-> () const |
Returns a pointer to the main element. More... | |
main_element_t const & | operator* () const |
Returns a reference to the main element. More... | |
std::size_t | index () const |
Returns the index of this element in the collection. More... | |
template<typename Tag > | |
auto | get () const -> decltype(auto) |
Returns the auxiliary data specified by type (Tag ). More... | |
template<typename Tag , typename T = Tag const&> | |
auto | getIf () const -> decltype(auto) |
Returns the auxiliary data specified by type (Tag ). More... | |
Full data object access | |
recob::SpacePoint const & | point () const |
Returns the original space point. More... | |
Direct space point interface | |
auto | ID () const |
Returns the ID of the space point. More... | |
geo::Point_t | position () const |
Returns the position of the space point. More... | |
Direct charge interface | |
recob::PointCharge::Charge_t | charge () const |
bool | hasCharge () const |
Static Public Member Functions | |
template<typename Tag > | |
static constexpr bool | has () |
Returns whether this class knowns about the specified type (Tag ). More... | |
Proxy class for charged space point proxy elements.
CollProxy | type of point proxy collection to get data from |
For details on the space point interface see proxy::ChargedSpacePoints
.
Definition at line 244 of file ChargedSpacePoints.h.
|
inherited |
Tuple of elements (expected to be tagged types).
Definition at line 170 of file CollectionProxyElement.h.
using proxy::SpacePointWithCharge< CollProxy >::base_t = CollectionProxyElement<CollProxy> |
Base type.
Definition at line 246 of file ChargedSpacePoints.h.
|
inherited |
Definition at line 165 of file CollectionProxyElement.h.
|
inherited |
Definition at line 166 of file CollectionProxyElement.h.
|
inline |
Returns the charge associated to this point
recob::PointCharge::charge()
Definition at line 287 of file ChargedSpacePoints.h.
|
inline |
Returns the recob::PointCharge
object with the complete charge information.
Definition at line 263 of file ChargedSpacePoints.h.
|
inlineinherited |
Returns the auxiliary data specified by type (Tag
).
Definition at line 190 of file CollectionProxyElement.h.
|
inherited |
Returns the auxiliary data specified by type (Tag
).
Tag | tag of the data to fetch (usually, its type) |
T | type to return (by default, a constant reference to Tag ) |
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":
recob::SpacePoint
) is not registered in the proxy, getIf()
has no clue of what the return value should be ("which is the type of
the data that does not exist?"). Definition at line 359 of file CollectionProxyElement.h.
References proxy::CollectionProxyElement< CollProxy >::getIfHas().
|
inlinestaticinherited |
Returns whether this class knowns about the specified type (Tag
).
Definition at line 267 of file CollectionProxyElement.h.
|
inline |
Returns whether the charge associated to the space point is valid.
recob::PointCharge::hasCharge()
Definition at line 292 of file ChargedSpacePoints.h.
|
inline |
Returns the ID of the space point.
Definition at line 271 of file ChargedSpacePoints.h.
|
inlineinherited |
Returns the index of this element in the collection.
Definition at line 186 of file CollectionProxyElement.h.
|
inlineinherited |
Returns a reference to the main element.
Definition at line 183 of file CollectionProxyElement.h.
|
inlineinherited |
Returns a pointer to the main element.
Definition at line 180 of file CollectionProxyElement.h.
|
inline |
Returns the original space point.
Definition at line 256 of file ChargedSpacePoints.h.
References operator*().
|
inline |
Returns the position of the space point.
Definition at line 274 of file ChargedSpacePoints.h.
References geo::vect::makePointFromCoords().