LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 380 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 381 of file geo_vectors_utils.h.

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

Definition at line 386 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 389 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 388 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 390 of file geo_vectors_utils.h.

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

Definition at line 347 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 387 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 393 of file geo_vectors_utils.h.

393 : 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 396 of file geo_vectors_utils.h.

397  : Base_t(v, CoordHelper_t(getter, setter))
398  {}
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 362 of file geo_vectors_utils.h.

References lar::dump::vector().

362 { 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 371 of file geo_vectors_utils.h.

371 { 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 368 of file geo_vectors_utils.h.

References lar::dump::vector().

368 { 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 365 of file geo_vectors_utils.h.

365 { 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 422 of file geo_vectors_utils.h.

References lar::dump::vector().

423  {
424  Base_t::manager().mult(Base_t::vector(), f);
425  return *this;
426  }
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 408 of file geo_vectors_utils.h.

References lar::dump::vector().

409  {
410  Base_t::manager().incr(Base_t::vector(), c);
411  return *this;
412  }
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 415 of file geo_vectors_utils.h.

References lar::dump::vector().

416  {
417  Base_t::manager().decr(Base_t::vector(), c);
418  return *this;
419  }
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 429 of file geo_vectors_utils.h.

References lar::dump::vector().

430  {
431  Base_t::manager().div(Base_t::vector(), f);
432  return *this;
433  }
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 401 of file geo_vectors_utils.h.

References lar::dump::vector().

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

Definition at line 372 of file geo_vectors_utils.h.

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

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