LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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 240 of file ChargedSpacePoints.h.
|
inherited |
Tuple of elements (expected to be tagged types).
Definition at line 166 of file CollectionProxyElement.h.
using proxy::SpacePointWithCharge< CollProxy >::base_t = CollectionProxyElement<CollProxy> |
Base type.
Definition at line 242 of file ChargedSpacePoints.h.
|
inherited |
Definition at line 161 of file CollectionProxyElement.h.
|
inherited |
Definition at line 162 of file CollectionProxyElement.h.
|
inline |
Returns the charge associated to this point
recob::PointCharge::charge()
Definition at line 282 of file ChargedSpacePoints.h.
|
inline |
Returns the recob::PointCharge
object with the complete charge information.
Definition at line 258 of file ChargedSpacePoints.h.
|
inlineinherited |
Returns the auxiliary data specified by type (Tag
).
Definition at line 185 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. |
if constexpr
should be used instead (see the example below)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 351 of file CollectionProxyElement.h.
|
inlinestaticinherited |
Returns whether this class knowns about the specified type (Tag
).
Definition at line 266 of file CollectionProxyElement.h.
|
inline |
Returns whether the charge associated to the space point is valid.
recob::PointCharge::hasCharge()
Definition at line 286 of file ChargedSpacePoints.h.
|
inline |
Returns the ID of the space point.
Definition at line 268 of file ChargedSpacePoints.h.
|
inlineinherited |
Returns the index of this element in the collection.
Definition at line 181 of file CollectionProxyElement.h.
|
inlineinherited |
Returns a reference to the main element.
Definition at line 178 of file CollectionProxyElement.h.
|
inlineinherited |
Returns a pointer to the main element.
Definition at line 175 of file CollectionProxyElement.h.
|
inline |
Returns the original space point.
Definition at line 251 of file ChargedSpacePoints.h.
References operator*().
|
inline |
Returns the position of the space point.
Definition at line 271 of file ChargedSpacePoints.h.
References geo::vect::makePointFromCoords().