![]() |
ATLAS Offline Software
|
Helper class to associate ranges of elements in multiple containers to a contiguous index. More...
#include <PhaseIIInDetRawDataContainer.h>
Public Types | |
| using | DataContainerType = T_DataContainer |
| using | T_RangeTypeBase = decltype( GetValue<T_RangeType>::value(T_RangeType{})) |
Public Member Functions | |
| IndexedRanges (unsigned int n_ranges, unsigned int container_list_size) | |
| create a container collection for n_ranges and a certain maximum number of containers. | |
| bool | registerOrEraseNewData (unsigned int index, const T_RangeTypeBase &new_range) |
| register an element range or erase the elements of this range. | |
| bool | update (unsigned int index, T_RangeTypeBase &is_range, const T_RangeTypeBase &new_range) |
| update a range (version for an "atomic" range) | |
| bool | update (unsigned int index, T_RangeTypeBase &is_range, const T_RangeTypeBase &new_range) |
| update a range (version for a "non-atomic" range) | |
| const T_DataContainer & | data (unsigned int container_index) const |
| Get an existing container from the container collection (read only). | |
| T_DataContainer & | data (unsigned int container_index) |
| Get an existing container from the container collection. | |
| const T_RangeType & | range (unsigned int index) const |
| Get a specific element range. | |
| std::size_t | size () const |
| return the total number of element ranges. | |
| std::size_t | empty () const |
| return true there are no element ranges. | |
| std::size_t | containerListCapacity () const |
| const auto & | errorContainer (unsigned int container_index) const |
| if there is an associated error container get it. | |
| auto & | errorContainer (unsigned int container_index) |
| if there is an associated error container get it (read/write access). | |
Protected Attributes | |
| ContainerList< T_DataContainer > | m_containers |
| std::vector< T_RangeType > | m_range |
Helper class to associate ranges of elements in multiple containers to a contiguous index.
The elements are stored in containers of a container collection. The range provides an element range and a container index which identifies the container within the collection, the The idea is that a contiguous range of elements is added at the end of a one container of the collection. Once all element of this range are added to the container, the range is registered for a certain index which identifies the element range e.g. an IdentifierHash If there is already a range registered for that index, the elements that just had been added to the end of the container and still constitute the end of the container are erased. The range can be either an atomic range i.e. provides compare_exchange_weak(is_range, new_range) or a simple value. The container has to allow for erasing an element range at the end of the container (erase_back) @TODO introduce concepts for T_DataContainer and T_RangeType ?
Definition at line 109 of file PhaseIIInDetRawDataContainer.h.
| using PhaseII::IndexedRanges< T_DataContainer, T_RangeType >::DataContainerType = T_DataContainer |
Definition at line 111 of file PhaseIIInDetRawDataContainer.h.
| using PhaseII::IndexedRanges< T_DataContainer, T_RangeType >::T_RangeTypeBase = decltype( GetValue<T_RangeType>::value(T_RangeType{})) |
Definition at line 112 of file PhaseIIInDetRawDataContainer.h.
|
inline |
create a container collection for n_ranges and a certain maximum number of containers.
| n_ranges | the maximum number of element ranges which can be registered e.g. PixelID::wafer_hash_max |
| container_list_size | the maximum number of containers in the container collection e.g. 1 |
Definition at line 117 of file PhaseIIInDetRawDataContainer.h.
|
inline |
Definition at line 183 of file PhaseIIInDetRawDataContainer.h.
|
inline |
Get an existing container from the container collection.
| container_index | the index which identifies the container in the container collection. |
Definition at line 165 of file PhaseIIInDetRawDataContainer.h.
|
inline |
Get an existing container from the container collection (read only).
| container_index | the index which identifies the container in the container collection. |
Definition at line 160 of file PhaseIIInDetRawDataContainer.h.
|
inline |
return true there are no element ranges.
Definition at line 180 of file PhaseIIInDetRawDataContainer.h.
|
inline |
if there is an associated error container get it (read/write access).
Definition at line 192 of file PhaseIIInDetRawDataContainer.h.
|
inline |
if there is an associated error container get it.
Definition at line 186 of file PhaseIIInDetRawDataContainer.h.
|
inline |
Get a specific element range.
| index | the index which identifies the element range the element range will in addition to the actual element range also provide the index of the container in container collection which contains these elements. |
Definition at line 172 of file PhaseIIInDetRawDataContainer.h.
|
inline |
register an element range or erase the elements of this range.
| index | and index which identifies the range i.e. the group of elements of this range |
| new_range | the element range that should be be registered. The element range will be registered for the given index unless a range has been registered already. In the latter case the element of this new range well be erased. |
Definition at line 126 of file PhaseIIInDetRawDataContainer.h.
|
inline |
return the total number of element ranges.
Definition at line 178 of file PhaseIIInDetRawDataContainer.h.
|
inline |
|
inline |
|
protected |
Definition at line 198 of file PhaseIIInDetRawDataContainer.h.
|
protected |
Definition at line 199 of file PhaseIIInDetRawDataContainer.h.