![]() |
ATLAS Offline Software
|
Extended Helper class to associate ranges of elements in multiple containers to a contiguous index to be used in a MT context The base class is extended by a container list which can be grown dynamically (mutex protected), and the per module element range is atomic. More...
#include <PhaseIIInDetRawDataContainerMT.h>
Public Types | |
| typedef std::true_type | thread_safe |
| using | BASE = PhaseII::IndexedRanges<T_RawDataContainer, std::atomic<PhaseII::DataRange> > |
| using | ContainerPtr = typename DynamicContainerListHelper<T_RawDataContainer>::ContainerPtr |
| using | DataContainerType |
| using | T_RangeTypeBase |
Public Member Functions | |
| IndexedRangesMT (unsigned int n_ranges, unsigned int container_list_size) | |
| ContainerPtr | getNewContainerPtr () |
| get an unused container to add new RDOs. | |
| 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_RawDataContainer & | data (unsigned int container_index) const |
| Get an existing container from the container collection (read only). | |
| T_RawDataContainer & | data (unsigned int container_index) |
| Get an existing container from the container collection. | |
| const std::atomic< PhaseII::DataRange > & | 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_RawDataContainer > | m_containers |
| std::vector< std::atomic< PhaseII::DataRange > > | m_range |
Private Attributes | |
| DynamicContainerListHelper< T_RawDataContainer > | m_containerListHelper |
Extended Helper class to associate ranges of elements in multiple containers to a contiguous index to be used in a MT context The base class is extended by a container list which can be grown dynamically (mutex protected), and the per module element range is atomic.
If the initial guess for the container list is conservative enough, then the only additional overhead are atomic operations when registering an element range per module, the atomic operation to the increment the container used counter. If the initial guess was too optimistic, the container list needs to be grown which is mutex protected, but will be done in chunks.
Definition at line 20 of file PhaseIIInDetRawDataContainerMT.h.
| using PhaseII::IndexedRangesMT< T_RawDataContainer >::BASE = PhaseII::IndexedRanges<T_RawDataContainer, std::atomic<PhaseII::DataRange> > |
Definition at line 24 of file PhaseIIInDetRawDataContainerMT.h.
| using PhaseII::IndexedRangesMT< T_RawDataContainer >::ContainerPtr = typename DynamicContainerListHelper<T_RawDataContainer>::ContainerPtr |
Definition at line 26 of file PhaseIIInDetRawDataContainerMT.h.
|
inherited |
Definition at line 111 of file PhaseIIInDetRawDataContainer.h.
|
inherited |
Definition at line 112 of file PhaseIIInDetRawDataContainer.h.
| typedef std::true_type PhaseII::IndexedRangesMT< T_RawDataContainer >::thread_safe |
Definition at line 23 of file PhaseIIInDetRawDataContainerMT.h.
|
inline |
Definition at line 27 of file PhaseIIInDetRawDataContainerMT.h.
|
inlineinherited |
Definition at line 183 of file PhaseIIInDetRawDataContainer.h.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
return true there are no element ranges.
Definition at line 180 of file PhaseIIInDetRawDataContainer.h.
|
inlineinherited |
if there is an associated error container get it (read/write access).
Definition at line 192 of file PhaseIIInDetRawDataContainer.h.
|
inlineinherited |
if there is an associated error container get it.
Definition at line 186 of file PhaseIIInDetRawDataContainer.h.
|
inline |
get an unused container to add new RDOs.
Definition at line 34 of file PhaseIIInDetRawDataContainerMT.h.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
return the total number of element ranges.
Definition at line 178 of file PhaseIIInDetRawDataContainer.h.
|
inlineinherited |
|
inlineinherited |
|
private |
Definition at line 39 of file PhaseIIInDetRawDataContainerMT.h.
|
protectedinherited |
Definition at line 198 of file PhaseIIInDetRawDataContainer.h.
|
protectedinherited |
Definition at line 199 of file PhaseIIInDetRawDataContainer.h.