![]() |
ATLAS Offline Software
|
Base raw data container which provides coordinates of a certain dimension and a data word per RDO (raw data object). More...
#include <PhaseIIInDetRawDataContainer.h>
Public Member Functions | |
| bool | isValid (unsigned int index) const |
| return true if the index refers to an element in the container | |
| const std::array< std::int16_t, NDim > & | coordinates (unsigned int index) const |
| return the coordinates i.e. column, row or strip of a certain RDO (read only). | |
| std::array< std::int16_t, NDim > & | coordinates (unsigned int index) |
| return the coordinates i.e. column, row or strip of a certain RDO. | |
| const std::uint32_t & | dataWord (unsigned int index) const |
| return the packed data word of of a certain RDO (read only). | |
| std::uint32_t & | dataWord (unsigned int index) |
| return the packed data word of of a certain RDO. | |
| bool | isSane () const |
| std::size_t | size () const |
| total number of RDOs which are in this container. | |
| bool | empty () const |
| test whether the container is empty i.e. does not contain any RDOs | |
| std::size_t | capacity () const |
| the maximum number RDOs this container can hold without reallocation. | |
| void | reserve (std::size_t new_capacity) |
| reserve space for a certain number of RDOs. | |
| void | emplace_back (std::array< std::int16_t, NDim > &&coordinates, std::uint32_t data_word) |
| Add a new RDO to the end of this container. | |
| void | erase_back (unsigned int begin_index) |
| erase the elements at the end of the container | |
| void | move (InDetRawDataContainer &dest, unsigned int start_index) |
| Move the coordinates and the data word of a certain number of elements at the end to a new container. | |
Static Public Member Functions | |
| static constexpr int | unpack (std::uint32_t mask, unsigned int shift, unsigned int word) |
| extract a value from a bit packed word. | |
| static constexpr std::uint32_t | pack (std::uint32_t mask, unsigned int shift, int input) |
| Create a bit-packed word from an input value. | |
Private Attributes | |
| std::vector< std::array< std::int16_t, NDim > > | m_coordinates |
| std::vector< std::uint32_t > | m_word |
Base raw data container which provides coordinates of a certain dimension and a data word per RDO (raw data object).
The class implements the basic container methods to allow its usage together with proxy container objects It also provides methods to bit-pack and unpack information into and from a single data word.
Definition at line 245 of file PhaseIIInDetRawDataContainer.h.
|
inline |
the maximum number RDOs this container can hold without reallocation.
Definition at line 269 of file PhaseIIInDetRawDataContainer.h.
|
inline |
return the coordinates i.e. column, row or strip of a certain RDO.
Definition at line 254 of file PhaseIIInDetRawDataContainer.h.
|
inline |
return the coordinates i.e. column, row or strip of a certain RDO (read only).
Definition at line 252 of file PhaseIIInDetRawDataContainer.h.
|
inline |
|
inline |
|
inline |
Add a new RDO to the end of this container.
| coordinates | the coordinates of the RDO e.g. pixel row, column or strop. |
| data_word | a bit packed data word which may contain e.g. the ToT. |
Definition at line 281 of file PhaseIIInDetRawDataContainer.h.
|
inline |
test whether the container is empty i.e. does not contain any RDOs
Definition at line 267 of file PhaseIIInDetRawDataContainer.h.
|
inline |
erase the elements at the end of the container
| begin_index | the index of the first element that is erased. Will erase all elements from begin_index till the end of the container. begin_index is expected to be smaller or equal to the container size. The result may be undefined if begin_index is larger than the container size. |
Definition at line 294 of file PhaseIIInDetRawDataContainer.h.
|
inline |
Definition at line 262 of file PhaseIIInDetRawDataContainer.h.
|
inline |
return true if the index refers to an element in the container
Definition at line 249 of file PhaseIIInDetRawDataContainer.h.
|
inline |
Move the coordinates and the data word of a certain number of elements at the end to a new container.
| dest | the container to which the elements will be moved. |
| start_index | the index of the first element that will be moved. Will copy the elements from start_index until then end to the container dest, and erase the copied elements from this container. |
Definition at line 330 of file PhaseIIInDetRawDataContainer.h.
|
inlinestaticconstexpr |
Create a bit-packed word from an input value.
| mask | the mask to blend out bits of the input value which are not part of the actual value. |
| shift | the bit number of the first bit in the bit packed data word. |
| input | the input value. |
Definition at line 319 of file PhaseIIInDetRawDataContainer.h.
|
inline |
reserve space for a certain number of RDOs.
Definition at line 272 of file PhaseIIInDetRawDataContainer.h.
|
inline |
total number of RDOs which are in this container.
Definition at line 265 of file PhaseIIInDetRawDataContainer.h.
|
inlinestaticconstexpr |
extract a value from a bit packed word.
| mask | the mask to blend out bits not part of a certain value after shifting the data word. |
| shift | the first bit of the value |
| word | the bit packed data word |
Definition at line 307 of file PhaseIIInDetRawDataContainer.h.
|
private |
Definition at line 339 of file PhaseIIInDetRawDataContainer.h.
|
private |
Definition at line 340 of file PhaseIIInDetRawDataContainer.h.