LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
geo::vect::details::BoundCoordManager< CoordHelper, StoredVector > Class Template Reference

#include "geo_vectors_utils.h"

Inheritance diagram for geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >:
geo::vect::details::BoundCoordGetter< CoordHelper, StoredVector >

Public Types

using CoordHelper_t = CoordHelper
 
using Vector_t = typename CoordHelper_t::Vector_t
 
using Scalar_t = typename CoordHelper_t::Scalar_t
 
using Getter_t = typename CoordHelper_t::Getter_t
 
using Setter_t = typename CoordHelper_t::Setter_t
 
using Stored_t = StoredVector
 

Public Member Functions

 BoundCoordManager (Stored_t &v, CoordHelper_t coordManager)
 Constructor: manage the specified coordinate of specified vector. More...
 
 BoundCoordManager (Stored_t &v, Getter_t getter, Setter_t setter)
 Constructor: manage the specified vector with specified methods. More...
 
BoundCoordManageroperator= (Scalar_t c)
 Setter: assigns a value to the bound coordinate of specified vector. More...
 
BoundCoordManageroperator+= (Scalar_t c)
 Increments by the specified amount. More...
 
BoundCoordManageroperator-= (Scalar_t c)
 Decrements by the specified amount. More...
 
BoundCoordManageroperator*= (Scalar_t f)
 Multiplies by the specified amount. More...
 
BoundCoordManageroperator/= (Scalar_t f)
 Divides by the specified amount. More...
 
Scalar_t get () const
 Returns the value of the bound coordinate. More...
 
Scalar_t operator() () const
 Returns the value of the bound coordinate. More...
 
 operator Scalar_t () const
 Returns the value of the bound coordinate. More...
 

Protected Member Functions

CoordHelper_t const & manager () const
 
Stored_tvector () const
 

Private Types

using Base_t = BoundCoordGetter< CoordHelper, StoredVector >
 

Detailed Description

template<typename CoordHelper, typename StoredVector>
class geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >

Definition at line 346 of file geo_vectors_utils.h.

Member Typedef Documentation

template<typename CoordHelper , typename StoredVector >
using geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::Base_t = BoundCoordGetter<CoordHelper, StoredVector>
private

Definition at line 349 of file geo_vectors_utils.h.

template<typename CoordHelper , typename StoredVector >
using geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::CoordHelper_t = CoordHelper

Definition at line 354 of file geo_vectors_utils.h.

template<typename CoordHelper , typename StoredVector >
using geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::Getter_t = typename CoordHelper_t::Getter_t

Definition at line 357 of file geo_vectors_utils.h.

template<typename CoordHelper , typename StoredVector >
using geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::Scalar_t = typename CoordHelper_t::Scalar_t

Definition at line 356 of file geo_vectors_utils.h.

template<typename CoordHelper , typename StoredVector >
using geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::Setter_t = typename CoordHelper_t::Setter_t

Definition at line 358 of file geo_vectors_utils.h.

template<typename CoordHelper , typename StoredVector >
using geo::vect::details::BoundCoordGetter< CoordHelper, StoredVector >::Stored_t = StoredVector

Definition at line 311 of file geo_vectors_utils.h.

template<typename CoordHelper , typename StoredVector >
using geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::Vector_t = typename CoordHelper_t::Vector_t

Definition at line 355 of file geo_vectors_utils.h.

Constructor & Destructor Documentation

template<typename CoordHelper , typename StoredVector >
geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::BoundCoordManager ( Stored_t v,
CoordHelper_t  coordManager 
)
inline

Constructor: manage the specified coordinate of specified vector.

Definition at line 361 of file geo_vectors_utils.h.

362  : Base_t(v, coordManager) {}
constexpr auto coordManager(unsigned int n)
Returns an object that can be bound to a vector to manage one of its coordinates. ...
BoundCoordGetter< CoordHelper, StoredVector > Base_t
template<typename CoordHelper , typename StoredVector >
geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::BoundCoordManager ( Stored_t v,
Getter_t  getter,
Setter_t  setter 
)
inline

Constructor: manage the specified vector with specified methods.

Definition at line 365 of file geo_vectors_utils.h.

366  : Base_t(v, CoordHelper_t(getter, setter)) {}
BoundCoordGetter< CoordHelper, StoredVector > Base_t

Member Function Documentation

template<typename CoordHelper, typename StoredVector>
Scalar_t geo::vect::details::BoundCoordGetter< CoordHelper, StoredVector >::get ( ) const
inlineinherited

Returns the value of the bound coordinate.

Definition at line 327 of file geo_vectors_utils.h.

References lar::dump::vector().

327 { return manager().get(vector()); }
CoordHelper_t const & manager() const
template<typename CoordHelper, typename StoredVector>
CoordHelper_t const& geo::vect::details::BoundCoordGetter< CoordHelper, StoredVector >::manager ( ) const
inlineprotectedinherited

Definition at line 336 of file geo_vectors_utils.h.

336 { return fCoord; }
CoordHelper_t fCoord
Helper to manage a specific coordinate.
template<typename CoordHelper, typename StoredVector>
geo::vect::details::BoundCoordGetter< CoordHelper, StoredVector >::operator Scalar_t ( ) const
inlineinherited

Returns the value of the bound coordinate.

Definition at line 333 of file geo_vectors_utils.h.

References lar::dump::vector().

333 { return manager().get(vector()); }
CoordHelper_t const & manager() const
template<typename CoordHelper, typename StoredVector>
Scalar_t geo::vect::details::BoundCoordGetter< CoordHelper, StoredVector >::operator() ( ) const
inlineinherited

Returns the value of the bound coordinate.

Definition at line 330 of file geo_vectors_utils.h.

330 { return get(); }
template<typename CoordHelper , typename StoredVector >
BoundCoordManager& geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::operator*= ( Scalar_t  f)
inline

Multiplies by the specified amount.

Definition at line 381 of file geo_vectors_utils.h.

References lar::dump::vector().

382  { Base_t::manager().mult(Base_t::vector(), f); return *this; }
TFile f
Definition: plotHisto.C:6
CoordHelper_t const & manager() const
template<typename CoordHelper , typename StoredVector >
BoundCoordManager& geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::operator+= ( Scalar_t  c)
inline

Increments by the specified amount.

Definition at line 373 of file geo_vectors_utils.h.

References lar::dump::vector().

374  { Base_t::manager().incr(Base_t::vector(), c); return *this; }
CoordHelper_t const & manager() const
template<typename CoordHelper , typename StoredVector >
BoundCoordManager& geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::operator-= ( Scalar_t  c)
inline

Decrements by the specified amount.

Definition at line 377 of file geo_vectors_utils.h.

References lar::dump::vector().

378  { Base_t::manager().decr(Base_t::vector(), c); return *this; }
CoordHelper_t const & manager() const
template<typename CoordHelper , typename StoredVector >
BoundCoordManager& geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::operator/= ( Scalar_t  f)
inline

Divides by the specified amount.

Definition at line 385 of file geo_vectors_utils.h.

References lar::dump::vector().

386  { Base_t::manager().div(Base_t::vector(), f); return *this; }
TFile f
Definition: plotHisto.C:6
CoordHelper_t const & manager() const
template<typename CoordHelper , typename StoredVector >
BoundCoordManager& geo::vect::details::BoundCoordManager< CoordHelper, StoredVector >::operator= ( Scalar_t  c)
inline

Setter: assigns a value to the bound coordinate of specified vector.

Definition at line 369 of file geo_vectors_utils.h.

References lar::dump::vector().

370  { Base_t::manager().set(Base_t::vector(), c); return *this; }
CoordHelper_t const & manager() const
template<typename CoordHelper, typename StoredVector>
Stored_t& geo::vect::details::BoundCoordGetter< CoordHelper, StoredVector >::vector ( ) const
inlineprotectedinherited

Definition at line 337 of file geo_vectors_utils.h.

337 { return fVector; }
Stored_t & fVector
The vector to manage the coordinate of.

The documentation for this class was generated from the following file: