LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
phot::OpDetVisibilityData< Cont, Mapping > Class Template Reference

A container for photon visibility mapping data. More...

#include "OpDetVisibilityData.h"

Inheritance diagram for phot::OpDetVisibilityData< Cont, Mapping >:
util::MappedContainer< Cont, Mapping > util::MappedContainerBase

Public Types

using DataContainer_t = Cont
 Type of the original container. More...
 
using Mapping_t = Mapping
 Type of the mapping object. More...
 
using size_type = std::size_t
 
using value_type = Value_t
 
using MappedContainer_t = MappedContainer< DataContainer_t, Mapping_t >
 Type of this class. More...
 
using DataIndex_t = util::collection_value_t< Mapping_t >
 Type of the index passed to the original container. More...
 
using MappingIndex_t = std::size_t
 Type of the index passed to the mapping. More...
 
C++ standard container definitions

Type of datum in the container.

using difference_type = std::ptrdiff_t
 
using reference = util::with_const_as_t< typename Storage_t::reference, util::collection_value_access_t< DataContainer_t >>
 
using const_reference = typename Storage_t::const_reference
 
using iterator = IteratorBase< MappedContainer_t, reference >
 
using const_iterator = IteratorBase< MappedContainer_t const, const_reference >
 

Public Member Functions

void setDefaultValue (value_type defValue)
 
Validity information
 OpDetVisibilityData ()=default
 Constructor: acquires data, mapping and a default value. More...
 
 OpDetVisibilityData (DataContainer_t const &cont, Mapping_t const &mapping, size_type size, value_type defValue)
 Constructor: acquires data, mapping and a default value. More...
 
 OpDetVisibilityData (DataContainer_t const &cont, Mapping_t const &mapping, size_type size)
 Constructor: acquires data and mapping. More...
 
 OpDetVisibilityData (DataContainer_t const &cont, Mapping_t const &mapping)
 Constructor: acquires data and mapping. More...
 
bool isValid () const
 Returns whether the contained data is valid or not. More...
 
 operator bool () const
 Returns whether the container has valid data. More...
 
bool operator! () const
 Returns whether the container has no valid data. More...
 
Container information

The size of the container after mapping is not strictly defined, since there might be elements not present in the original container, as well as those elements might appear more than once.

On top of this, this object does not need to know the size to correctly operate, because no storage is used for the container data after mapping.

Nevertheless, users may rightfully wonder and ask how many elements of the container are valid after the mapping.

This class allows an answer to be provided at construction time, relying on the superior wisdom of the user. If the user does not care to impart such wisdom, a guess is made with using the minimal size needed to accommodate all the elements after mapping (see minimal_size()).

size_type size () const
 Returns the nominal size of the container (after mapping). More...
 
size_type minimal_size () const
 Returns the minimum size to include all mapped values. More...
 
size_type max_size () const
 Returns the size of the largest possible container of this type. More...
 
bool empty () const
 Returns whether the container has no elements. More...
 
reference defaultValue ()
 Returns the default value for elements with no original content. More...
 
const_reference defaultValue () const
 Returns the nominal size of the container (after mapping). More...
 
Random access to elements
decltype(auto) operator[] (MappingIndex_t index) const
 Returns the content corresponding to the specified index. More...
 
decltype(auto) operator[] (MappingIndex_t index)
 Returns the content corresponding to the specified index. More...
 
decltype(auto) at (MappingIndex_t index) const
 Returns the content corresponding to the specified index. More...
 
decltype(auto) at (MappingIndex_t index)
 Returns the content corresponding to the specified index. More...
 
decltype(auto) front () const
 Returns the first element in the container. More...
 
decltype(auto) front ()
 Returns the first element in the container. More...
 
decltype(auto) back () const
 Returns the last element in the container. More...
 
decltype(auto) back ()
 Returns the last element in the container. More...
 
decltype(auto) map_index (MappingIndex_t index) const
 Returns the index in the original data which is mapped to index. More...
 
decltype(auto) map_index (MappingIndex_t index)
 Returns the index in the original data which is mapped to index. More...
 
Iteration
const_iterator cbegin () const
 Returns a constant iterator to the first mapped element. More...
 
const_iterator begin () const
 Returns a constant iterator to the first mapped element. More...
 
iterator begin ()
 Returns an iterator to the first mapped element. More...
 
const_iterator cend () const
 Returns a constant iterator past the last mapped element. More...
 
const_iterator end () const
 Returns a constant iterator past the last mapped element. More...
 
iterator end ()
 Returns an iterator past the last mapped element. More...
 

Static Public Attributes

static constexpr DataIndex_t InvalidIndex = invalidIndex<DataIndex_t>()
 

Static Protected Member Functions

static size_type minimal_size (DataContainer_t const &cont, Mapping_t const &mapping)
 Returns the minimum size to include all mapped values. More...
 

Private Types

using ContainerBase_t = util::MappedContainer< Cont, Mapping >
 

Static Private Member Functions

static size_type effectiveSize (DataContainer_t const &cont, size_type allegedSize)
 Determines whether the current content should be considered valid. More...
 
static size_type effectiveSize (DataContainer_t const &cont, Mapping_t const &mapping)
 Determines whether the current content should be considered valid. More...
 

Detailed Description

template<typename Cont, typename Mapping>
class phot::OpDetVisibilityData< Cont, Mapping >

A container for photon visibility mapping data.

This container is designed to replace the use of plain pointers to library data, adding an intermediate mapping layer.

A proper mapping allows to use symmetries of the detector to reduce the redundant size of the library, at the cost of some run time.

This container is used as a util::MappedContainer object, with the addition of being aware of whether the contained data is valid or not. The validity is estimated by considering the original data that is being mapped, that is the data from the library. If the data is invalid or empty, as it may be for a null pointer or an empty vector, the container data is also considered to be invalid.

Implementation notes

In the current implementation, the concept of data being invalid is implemented by forcing the nominal size of the container to be zero.

Known limitations

Currently the mapping of the optical detectors is forced to be a static collection of detector IDs. If more flexibility is needed, the design of the container internals need to be updated to allow run time polymorphism.

Given the type of validity detection described above, it takes extra steps to provide a default mapping for areas not covered by the library. While with plain util::MappedContainer that can be achieved by a empty data container and a mapping returning InvalidIndex for all optical detectors, here this would just yield to an invalid container. Instead, together with that mapping, some fake data needs to be supplied to phot::OpDetVisibilityData, which will be basically ignored and may be of any size larger than zero (or more precisely, phot::isValidLibraryData() must return false).

Definition at line 117 of file OpDetVisibilityData.h.

Member Typedef Documentation

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::const_iterator = IteratorBase<MappedContainer_t const, const_reference>
inherited

Definition at line 179 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::const_reference = typename Storage_t::const_reference
inherited

Definition at line 176 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using phot::OpDetVisibilityData< Cont, Mapping >::ContainerBase_t = util::MappedContainer<Cont, Mapping>
private

Definition at line 118 of file OpDetVisibilityData.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::DataContainer_t = Cont

Type of the original container.

Definition at line 153 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::DataIndex_t = util::collection_value_t<Mapping_t>
inherited

Type of the index passed to the original container.

Definition at line 160 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::difference_type = std::ptrdiff_t
inherited

Definition at line 172 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::iterator = IteratorBase<MappedContainer_t, reference>
inherited

Definition at line 178 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::MappedContainer_t = MappedContainer<DataContainer_t, Mapping_t>
inherited

Type of this class.

Definition at line 157 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::Mapping_t = Mapping

Type of the mapping object.

Definition at line 154 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::MappingIndex_t = std::size_t
inherited

Type of the index passed to the mapping.

Definition at line 163 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::reference = util::with_const_as_t<typename Storage_t::reference, util::collection_value_access_t<DataContainer_t>>
inherited

Definition at line 175 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::size_type = std::size_t

Definition at line 171 of file MappedContainer.h.

template<typename Cont, typename Mapping>
using util::MappedContainer< Cont, Mapping >::value_type = Value_t

Definition at line 169 of file MappedContainer.h.

Constructor & Destructor Documentation

template<typename Cont, typename Mapping>
phot::OpDetVisibilityData< Cont, Mapping >::OpDetVisibilityData ( )
default

Constructor: acquires data, mapping and a default value.

Parameters
contcontainer with the data to be mapped
mappingthe mapping to be used
sizethe size of the container after mapping
defValuevalue to be used as default
See also
MappedContainer(DataContainer_t const&, Mapping_t const&, size_type, value_type)

This works as the equivalent util::MappedContainer constructor, except that if the data in cont is deemed invalid the size is overridden to zero.

template<typename Cont, typename Mapping>
phot::OpDetVisibilityData< Cont, Mapping >::OpDetVisibilityData ( DataContainer_t const &  cont,
Mapping_t const &  mapping,
size_type  size,
value_type  defValue 
)
inline

Constructor: acquires data, mapping and a default value.

Parameters
contcontainer with the data to be mapped
mappingthe mapping to be used
sizethe size of the container after mapping
defValuevalue to be used as default
See also
MappedContainer(DataContainer_t const&, Mapping_t const&, size_type, value_type)

This works as the equivalent util::MappedContainer constructor, except that if the data in cont is deemed invalid the size is overridden to zero.

Definition at line 154 of file OpDetVisibilityData.h.

158  : ContainerBase_t(cont, mapping, effectiveSize(cont, size), defValue)
159  {}
size_type size() const
Returns the nominal size of the container (after mapping).
util::MappedContainer< Cont, Mapping > ContainerBase_t
static size_type effectiveSize(DataContainer_t const &cont, size_type allegedSize)
Determines whether the current content should be considered valid.
template<typename Cont, typename Mapping>
phot::OpDetVisibilityData< Cont, Mapping >::OpDetVisibilityData ( DataContainer_t const &  cont,
Mapping_t const &  mapping,
size_type  size 
)
inline

Constructor: acquires data and mapping.

Parameters
contcontainer with the data to be mapped
mappingthe mapping to be used
sizethe size of the container after mapping
See also
MappedContainer(DataContainer_t const&, Mapping_t const&, size_type)

This works as the equivalent util::MappedContainer constructor, except that if the data in cont is deemed invalid the size is overridden to zero.

Definition at line 172 of file OpDetVisibilityData.h.

173  : ContainerBase_t(cont, mapping, effectiveSize(cont, size))
174  {}
size_type size() const
Returns the nominal size of the container (after mapping).
util::MappedContainer< Cont, Mapping > ContainerBase_t
static size_type effectiveSize(DataContainer_t const &cont, size_type allegedSize)
Determines whether the current content should be considered valid.
template<typename Cont, typename Mapping>
phot::OpDetVisibilityData< Cont, Mapping >::OpDetVisibilityData ( DataContainer_t const &  cont,
Mapping_t const &  mapping 
)
inline

Constructor: acquires data and mapping.

Parameters
contcontainer with the data to be mapped
mappingthe mapping to be used
See also
util::MappedContainer(DataContainer_t const&, Mapping_t const&, size_type)

The size of the container is declared to be the minimal one (see minimal_size()), unless data of the library cont is invalid, in which case the full container is invalid.

The default value is assigned as in util::MappedContainer(DataContainer_t const&, Mapping_t const&, size_type).

Definition at line 189 of file OpDetVisibilityData.h.

190  : ContainerBase_t(cont, mapping, effectiveSize(cont, mapping))
191  {}
util::MappedContainer< Cont, Mapping > ContainerBase_t
static size_type effectiveSize(DataContainer_t const &cont, size_type allegedSize)
Determines whether the current content should be considered valid.

Member Function Documentation

template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::at ( MappingIndex_t  index) const
inherited

Returns the content corresponding to the specified index.

Parameters
indexthe index of the data to be retrieved
Returns
the mapped value (some decoration of value_type)
Exceptions
std::out_of_rangeif the index is not in the container

Referenced by util::MappedContainer< Cont, Mapping >::minimal_size().

template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::at ( MappingIndex_t  index)
inherited

Returns the content corresponding to the specified index.

Parameters
indexthe index of the data to be retrieved
Returns
the mapped value (some decoration of value_type)
Exceptions
std::out_of_rangeif the index is not in the container
template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::back ( ) const
inlineinherited

Returns the last element in the container.

Returns
the last element in the container, undefined if empty()

Definition at line 347 of file MappedContainer.h.

347 { return map_element(size() - 1); }
size_type size() const
Returns the nominal size of the container (after mapping).
decltype(auto) map_element(MappingIndex_t index)
Returns the value mapped to the specified index.
template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::back ( )
inlineinherited

Returns the last element in the container.

Returns
the last element in the container, undefined if empty()

Definition at line 348 of file MappedContainer.h.

348 { return map_element(size() - 1); }
size_type size() const
Returns the nominal size of the container (after mapping).
decltype(auto) map_element(MappingIndex_t index)
Returns the value mapped to the specified index.
template<typename Cont, typename Mapping>
const_iterator util::MappedContainer< Cont, Mapping >::begin ( ) const
inlineinherited

Returns a constant iterator to the first mapped element.

Definition at line 372 of file MappedContainer.h.

372 { return cbegin(); }
const_iterator cbegin() const
Returns a constant iterator to the first mapped element.
template<typename Cont, typename Mapping>
iterator util::MappedContainer< Cont, Mapping >::begin ( )
inlineinherited

Returns an iterator to the first mapped element.

Definition at line 375 of file MappedContainer.h.

375 { return {*this, 0U}; }
template<typename Cont, typename Mapping>
const_iterator util::MappedContainer< Cont, Mapping >::cbegin ( ) const
inlineinherited

Returns a constant iterator to the first mapped element.

Definition at line 369 of file MappedContainer.h.

369 { return {*this, 0U}; }
template<typename Cont, typename Mapping>
const_iterator util::MappedContainer< Cont, Mapping >::cend ( ) const
inlineinherited

Returns a constant iterator past the last mapped element.

Definition at line 378 of file MappedContainer.h.

378 { return {*this, size()}; }
size_type size() const
Returns the nominal size of the container (after mapping).
template<typename Cont, typename Mapping>
reference util::MappedContainer< Cont, Mapping >::defaultValue ( )
inlineinherited

Returns the default value for elements with no original content.

Note that changing it will change at the same time the value returned for all unmapped elements afterwards.

Definition at line 294 of file MappedContainer.h.

294 { return fDefValue; }
std::remove_cv_t< Value_t > fDefValue
< Value returned for elements not mapped.
template<typename Cont, typename Mapping>
const_reference util::MappedContainer< Cont, Mapping >::defaultValue ( ) const
inlineinherited

Returns the nominal size of the container (after mapping).

This is the value provided at construction time, or the minimal_size() at that time if no value was provided.

Definition at line 295 of file MappedContainer.h.

295 { return fDefValue; }
std::remove_cv_t< Value_t > fDefValue
< Value returned for elements not mapped.
template<typename Cont , typename Mapping >
auto phot::OpDetVisibilityData< Cont, Mapping >::effectiveSize ( DataContainer_t const &  cont,
size_type  allegedSize 
)
staticprivate

Determines whether the current content should be considered valid.

Definition at line 351 of file OpDetVisibilityData.h.

References phot::isValidLibraryData().

353  {
354  return isValidLibraryData(cont) ? allegedSize : 0U;
355  }
bool isValidLibraryData(Cont &&cont)
Returns the validity of content of library data in the container.
template<typename Cont , typename Mapping >
auto phot::OpDetVisibilityData< Cont, Mapping >::effectiveSize ( DataContainer_t const &  cont,
Mapping_t const &  mapping 
)
staticprivate

Determines whether the current content should be considered valid.

Definition at line 358 of file OpDetVisibilityData.h.

References phot::isValidLibraryData(), and util::MappedContainer< Cont, Mapping >::minimal_size().

360  {
361  return isValidLibraryData(cont) ? ContainerBase_t::minimal_size(cont, mapping) : 0U;
362  } // OpDetVisibilityData::effectiveSize(DataContainer_t, Mapping_t)
size_type minimal_size() const
Returns the minimum size to include all mapped values.
bool isValidLibraryData(Cont &&cont)
Returns the validity of content of library data in the container.
template<typename Cont, typename Mapping>
bool util::MappedContainer< Cont, Mapping >::empty ( ) const
inlineinherited

Returns whether the container has no elements.

Definition at line 285 of file MappedContainer.h.

Referenced by phot::OpDetVisibilityData< phot::IPhotonLibrary::T0s_t >::isValid().

285 { return size() == 0U; }
size_type size() const
Returns the nominal size of the container (after mapping).
template<typename Cont, typename Mapping>
const_iterator util::MappedContainer< Cont, Mapping >::end ( ) const
inlineinherited

Returns a constant iterator past the last mapped element.

Definition at line 381 of file MappedContainer.h.

381 { return cend(); }
const_iterator cend() const
Returns a constant iterator past the last mapped element.
template<typename Cont, typename Mapping>
iterator util::MappedContainer< Cont, Mapping >::end ( )
inlineinherited

Returns an iterator past the last mapped element.

Definition at line 384 of file MappedContainer.h.

384 { return {*this, size()}; }
size_type size() const
Returns the nominal size of the container (after mapping).
template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::front ( ) const
inlineinherited

Returns the first element in the container.

Returns
the first element in the container, undefined if empty()

Definition at line 338 of file MappedContainer.h.

338 { return map_element(0U); }
decltype(auto) map_element(MappingIndex_t index)
Returns the value mapped to the specified index.
template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::front ( )
inlineinherited

Returns the first element in the container.

Returns
the first element in the container, undefined if empty()

Definition at line 339 of file MappedContainer.h.

339 { return map_element(0U); }
decltype(auto) map_element(MappingIndex_t index)
Returns the value mapped to the specified index.
template<typename Cont, typename Mapping>
bool phot::OpDetVisibilityData< Cont, Mapping >::isValid ( ) const
inline

Returns whether the contained data is valid or not.

Definition at line 200 of file OpDetVisibilityData.h.

Referenced by phot::isValidLibraryData(), phot::OpDetVisibilityData< phot::IPhotonLibrary::T0s_t >::operator bool(), and phot::OpDetVisibilityData< phot::IPhotonLibrary::T0s_t >::operator!().

200 { return !ContainerBase_t::empty(); }
bool empty() const
Returns whether the container has no elements.
template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::map_index ( MappingIndex_t  index) const
inherited

Returns the index in the original data which is mapped to index.

Parameters
indexthe index to be mapped (like e.g. in at())
Returns
the index in the original data container, or InvalidIndex

Referenced by util::MappedContainer< Cont, Mapping >::minimal_size().

template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::map_index ( MappingIndex_t  index)
inherited

Returns the index in the original data which is mapped to index.

Parameters
indexthe index to be mapped (like e.g. in at())
Returns
the index in the original data container, or InvalidIndex
template<typename Cont, typename Mapping>
size_type util::MappedContainer< Cont, Mapping >::max_size ( ) const
inlineinherited

Returns the size of the largest possible container of this type.

Definition at line 282 of file MappedContainer.h.

282 { return std::numeric_limits<size_type>::max(); }
template<typename Cont , typename Mapping >
auto util::MappedContainer< Cont, Mapping >::minimal_size ( ) const
inherited

Returns the minimum size to include all mapped values.

This method is available only if the mapping type (Mapping_t) answers a std::size() call, which is expected to return the number of elements the original data can be mapped into.

Definition at line 753 of file MappedContainer.h.

References util::MappedContainer< Cont, Mapping >::at(), util::MappedContainer< Cont, Mapping >::map_element(), util::size(), and util::to_string().

Referenced by phot::OpDetVisibilityData< Cont, Mapping >::effectiveSize().

754 {
756 }
size_type minimal_size() const
Returns the minimum size to include all mapped values.
decltype(auto) container() const
MappingStorage_t fMapping
Mapping of stored data into final one.
Storage_t fData
Data to be mapped.
template<typename Cont , typename Mapping >
auto util::MappedContainer< Cont, Mapping >::minimal_size ( DataContainer_t const &  cont,
Mapping_t const &  mapping 
)
staticprotectedinherited

Returns the minimum size to include all mapped values.

Definition at line 798 of file MappedContainer.h.

References util::collection_from_reference(), util::MappedContainer< Cont, Mapping >::map_index(), and util::size().

800 {
801  /*
802  * Obscure compiler errors are expected if the `Mapping_t` type does not
803  * support `std::size`. In that case, very simply, `minimal_size()` can't be
804  * used and the caller must specify the size of the container.
805  */
806 
807  using std::size;
808  return size(util::collection_from_reference(mapping));
809 } // util::MappedContainer<>::minimal_size(DataContainer_t, Mapping_t)
size_type size() const
Returns the nominal size of the container (after mapping).
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:101
decltype(auto) collection_from_reference(CollRef &collRef)
Returns the object referenced by collRef as a C++ reference.
template<typename Cont, typename Mapping>
phot::OpDetVisibilityData< Cont, Mapping >::operator bool ( ) const
inline

Returns whether the container has valid data.

Definition at line 203 of file OpDetVisibilityData.h.

203 { return isValid(); }
bool isValid() const
Returns whether the contained data is valid or not.
template<typename Cont, typename Mapping>
bool phot::OpDetVisibilityData< Cont, Mapping >::operator! ( ) const
inline

Returns whether the container has no valid data.

Definition at line 206 of file OpDetVisibilityData.h.

206 { return !isValid(); }
bool isValid() const
Returns whether the contained data is valid or not.
template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::operator[] ( MappingIndex_t  index) const
inlineinherited

Returns the content corresponding to the specified index.

Parameters
indexthe index of the data to be retrieved
Returns
the mapped value (some decoration of value_type)

The content requested for index is fetched from the original data, at the element resulting from the mapping of the index argument.

Definition at line 318 of file MappedContainer.h.

318 { return map_element(index); }
decltype(auto) map_element(MappingIndex_t index)
Returns the value mapped to the specified index.
template<typename Cont, typename Mapping>
decltype(auto) util::MappedContainer< Cont, Mapping >::operator[] ( MappingIndex_t  index)
inlineinherited

Returns the content corresponding to the specified index.

Parameters
indexthe index of the data to be retrieved
Returns
the mapped value (some decoration of value_type)

The content requested for index is fetched from the original data, at the element resulting from the mapping of the index argument.

Definition at line 319 of file MappedContainer.h.

319 { return map_element(index); }
decltype(auto) map_element(MappingIndex_t index)
Returns the value mapped to the specified index.
template<typename Cont, typename Mapping>
void util::MappedContainer< Cont, Mapping >::setDefaultValue ( value_type  defValue)
inlineinherited

Changes the default value. The new value will be used for all following mappings.

Definition at line 300 of file MappedContainer.h.

300 { fDefValue = defValue; }
std::remove_cv_t< Value_t > fDefValue
< Value returned for elements not mapped.
template<typename Cont, typename Mapping>
size_type util::MappedContainer< Cont, Mapping >::size ( ) const
inlineinherited

Returns the nominal size of the container (after mapping).

This is the value provided at construction time, or the minimal_size() at that time if no value was provided.

Definition at line 270 of file MappedContainer.h.

Referenced by phot::details::generic_size().

270 { return fSize; }
Size_t fSize
Nominal size of the container.

Member Data Documentation

template<typename Cont, typename Mapping>
constexpr DataIndex_t util::MappedContainer< Cont, Mapping >::InvalidIndex = invalidIndex<DataIndex_t>()
staticinherited

Invalid index to be returned by the mapping when the required index is not mapped back to the original container; in that case, a defaultValue() is mapped instead.

Definition at line 187 of file MappedContainer.h.


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