LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "GeometryDataContainers.h"
Public Types | |
using | index_type = size_type |
Type used internally (so far) for indexing. More... | |
STL container types. | |
using | value_type = typename Container_t::value_type |
using | reference = typename Container_t::reference |
using | const_reference = typename Container_t::const_reference |
using | pointer = typename Container_t::pointer |
using | const_pointer = typename Container_t::const_pointer |
using | iterator = typename Container_t::iterator |
using | const_iterator = typename Container_t::const_iterator |
using | reverse_iterator = typename Container_t::reverse_iterator |
using | const_reverse_iterator = typename Container_t::const_reverse_iterator |
using | difference_type = typename Container_t::difference_type |
using | size_type = typename Container_t::size_type |
Public Member Functions | |
GeoContainerData ()=default | |
Default constructor with empty container. Good for nothing. More... | |
GeoContainerData (size_type size) | |
Prepares the container with default-constructed data. More... | |
GeoContainerData (size_type size, value_type const &defValue) | |
Container status query | |
size_type | size () const |
Returns the number of elements in the container. More... | |
size_type | capacity () const |
Returns the number of elements the container has memory for. More... | |
bool | empty () const |
Returns whether the container has no elements (false by assumptions). More... | |
Data modification | |
In general, each single element can be accessed and changed. In addition, this section includes methods acting on multiple elements at once. | |
void | fill (value_type value) |
Sets all elements to the specified value (copied). More... | |
void | reset () |
Sets all the elements to a default-constructed value_type . More... | |
template<typename Op > | |
Op | apply (Op &&op) |
Applies an operation on all elements. More... | |
template<typename Op > | |
Op | apply (Op &&op) const |
Applies an operation on all elements. More... | |
Container modification | |
void | resize (size_type size) |
Prepares the container with default-constructed data. More... | |
void | resize (size_type size, value_type const &defValue) |
Prepares the container with copies of the specified default value. More... | |
void | clear () |
Makes the container empty, with no usable storage space. More... | |
Element access | |
reference | operator[] (index_type index) |
Returns the element for the specified index. More... | |
const_reference | operator[] (index_type index) const |
Returns the element for the specified index (read-only). More... | |
Iterators | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
const_reverse_iterator | crbegin () const |
const_reverse_iterator | crend () const |
Static Public Member Functions | |
template<typename Value , typename Upper > | |
static bool | bounded (Value v, Upper upper) |
Returns whether the specified value is between 0 and the upper limit. More... | |
Private Types | |
using | Container_t = std::vector< T > |
Private Attributes | |
Container_t | fData |
Data storage area. More... | |
Definition at line 47 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::const_iterator = typename Container_t::const_iterator |
Definition at line 973 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::const_pointer = typename Container_t::const_pointer |
Definition at line 971 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::const_reference = typename Container_t::const_reference |
Definition at line 969 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::const_reverse_iterator = typename Container_t::const_reverse_iterator |
Definition at line 975 of file GeometryDataContainers.h.
|
private |
Definition at line 960 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::difference_type = typename Container_t::difference_type |
Definition at line 976 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::index_type = size_type |
Type used internally (so far) for indexing.
Definition at line 982 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::iterator = typename Container_t::iterator |
Definition at line 972 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::pointer = typename Container_t::pointer |
Definition at line 970 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::reference = typename Container_t::reference |
Definition at line 968 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::reverse_iterator = typename Container_t::reverse_iterator |
Definition at line 974 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::size_type = typename Container_t::size_type |
Definition at line 977 of file GeometryDataContainers.h.
using geo::details::GeoContainerData< T >::value_type = typename Container_t::value_type |
Definition at line 967 of file GeometryDataContainers.h.
|
default |
Default constructor with empty container. Good for nothing.
|
inline |
Prepares the container with default-constructed data.
Definition at line 990 of file GeometryDataContainers.h.
|
inline |
Definition at line 993 of file GeometryDataContainers.h.
|
inline |
Applies an operation on all elements.
Op | type of operation |
op | Operation |
The operation op
is a unary functor, i.e. an object that supports the call to op(value_type&)
.
The return values of op
calls are discarded.
Definition at line 1041 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::apply(), and geo::GeoIDdataContainer< T, Mapper >::clear().
|
inline |
Applies an operation on all elements.
Op | type of operation |
op | Operation |
The operation op
is a unary functor, i.e. an object that supports the call to op(value_type const&)
.
The return values of op
calls are discarded.
Definition at line 1060 of file GeometryDataContainers.h.
|
inline |
Definition at line 1125 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::begin(), and geo::GeoIDdataContainer< T, Mapper >::end().
|
inline |
Definition at line 1127 of file GeometryDataContainers.h.
|
inlinestatic |
Returns whether the specified value is between 0
and the upper limit.
Definition at line 1144 of file GeometryDataContainers.h.
|
inline |
Returns the number of elements the container has memory for.
Definition at line 1005 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::capacity().
|
inline |
Definition at line 1129 of file GeometryDataContainers.h.
|
inline |
Definition at line 1130 of file GeometryDataContainers.h.
|
inline |
Makes the container empty, with no usable storage space.
resize()
The container needs to be resized before it is useful again.
Definition at line 1103 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::clear().
|
inline |
Definition at line 1136 of file GeometryDataContainers.h.
|
inline |
Definition at line 1137 of file GeometryDataContainers.h.
|
inline |
Returns whether the container has no elements (false
by assumptions).
Definition at line 1008 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::empty(), and geo::GeoIDdataContainer< T, Mapper >::GeoIDdataContainer().
|
inline |
Definition at line 1126 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::end().
|
inline |
Definition at line 1128 of file GeometryDataContainers.h.
|
inline |
Sets all elements to the specified value
(copied).
Definition at line 1024 of file GeometryDataContainers.h.
References trkf::fill(), and value.
Referenced by geo::GeoIDdataContainer< T, Mapper >::fill().
|
inline |
Returns the element for the specified index.
Definition at line 1113 of file GeometryDataContainers.h.
|
inline |
Returns the element for the specified index (read-only).
Definition at line 1116 of file GeometryDataContainers.h.
|
inline |
Definition at line 1132 of file GeometryDataContainers.h.
|
inline |
Definition at line 1134 of file GeometryDataContainers.h.
|
inline |
Definition at line 1133 of file GeometryDataContainers.h.
|
inline |
Definition at line 1135 of file GeometryDataContainers.h.
|
inline |
Sets all the elements to a default-constructed value_type
.
Definition at line 1027 of file GeometryDataContainers.h.
References trkf::fill().
Referenced by geo::GeoIDdataContainer< T, Mapper >::reset().
|
inline |
Prepares the container with default-constructed data.
size | number of elements in the container |
The container is sized to host data for all the elements. Each new element in the container is default-constructed. Existing data is not touched.
Definition at line 1083 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::resize(), and geo::GeoIDdataContainer< T, Mapper >::resizeAs().
|
inline |
Prepares the container with copies of the specified default value.
size | number of elements in the container |
defValue | the value copied to fill all entries in the container |
The container is sized to host data for all the elements. Each new element in the container is constructed as copy of defValue
. Existing data is not touched.
Definition at line 1095 of file GeometryDataContainers.h.
|
inline |
Returns the number of elements in the container.
Definition at line 1002 of file GeometryDataContainers.h.
Referenced by geo::GeoIDdataContainer< T, Mapper >::size().
|
private |
Data storage area.
Definition at line 1150 of file GeometryDataContainers.h.