![]() |
Project
|
#include <LabelContainer.h>
Classes | |
struct | HeaderElementContinuous |
struct | HeaderElementLinked |
class | Iterator |
class | LabelView |
Public Types | |
using | HeaderElement = typename std::conditional< isContiguousStorage, HeaderElementContinuous, HeaderElementLinked >::type |
using | StoredLabelType = typename std::conditional< isContiguousStorage, LabelType, std::pair< LabelType, int > >::type |
Public Member Functions | |
LabelContainer ()=default | |
~LabelContainer ()=default | |
void | reserve (int n) |
void | clear () |
void | addLabel (unsigned int dataindex, LabelType const &label) |
add a label for a dataindex | |
LabelView | getLabels (int dataindex) |
get a container view on labels allowing use standard forward iteration in user code | |
void | fillVectorOfLabels (int dataindex, std::vector< LabelType > &v) |
Static Public Member Functions | |
static unsigned int | getNextIndex (unsigned int index, std::vector< LabelType > const &) |
static unsigned int | getNextIndex (unsigned int index, std::vector< std::pair< LabelType, int > > const &labels) |
static LabelType & | dereference (std::vector< LabelType > &v, int index) |
static LabelType & | dereference (std::vector< std::pair< LabelType, int > > &v, int index) |
static int | lastIndex (HeaderElementContinuous const &h) |
static int | lastIndex (HeaderElementLinked const &h) |
static void | addLabelImpl (int dataindex, std::vector< HeaderElementContinuous > &headerv, std::vector< LabelType > &labelv, LabelType const &label) |
static void | addLabelImpl (int dataindex, std::vector< HeaderElementLinked > &headerv, std::vector< std::pair< LabelType, int > > &labelv, LabelType const &label) |
Public Attributes | |
std::vector< HeaderElement > | mHeaderArray |
std::vector< StoredLabelType > | mLabelArray |
Definition at line 35 of file LabelContainer.h.
using o2::dataformats::LabelContainer< LabelType, isContiguousStorage >::HeaderElement = typename std::conditional<isContiguousStorage, HeaderElementContinuous, HeaderElementLinked>::type |
Definition at line 55 of file LabelContainer.h.
using o2::dataformats::LabelContainer< LabelType, isContiguousStorage >::StoredLabelType = typename std::conditional<isContiguousStorage, LabelType, std::pair<LabelType, int> >::type |
Definition at line 56 of file LabelContainer.h.
|
default |
|
default |
|
inline |
add a label for a dataindex
Definition at line 209 of file LabelContainer.h.
|
inlinestatic |
Definition at line 145 of file LabelContainer.h.
|
inlinestatic |
Definition at line 163 of file LabelContainer.h.
|
inline |
Definition at line 202 of file LabelContainer.h.
|
inlinestatic |
Definition at line 67 of file LabelContainer.h.
|
inlinestatic |
Definition at line 71 of file LabelContainer.h.
|
inline |
fill an external vector container with labels might be useful to perform additional operations such as sorting on the labels; the external vector can be reused to avoid allocations/deallocs)
fixme: provide a template specialized fast version for contiguous storage
Definition at line 221 of file LabelContainer.h.
|
inline |
get a container view on labels allowing use standard forward iteration in user code
Definition at line 216 of file LabelContainer.h.
|
inlinestatic |
Definition at line 59 of file LabelContainer.h.
|
inlinestatic |
Definition at line 63 of file LabelContainer.h.
|
inlinestatic |
Definition at line 75 of file LabelContainer.h.
|
inlinestatic |
Definition at line 79 of file LabelContainer.h.
|
inline |
Definition at line 196 of file LabelContainer.h.
std::vector<HeaderElement> o2::dataformats::LabelContainer< LabelType, isContiguousStorage >::mHeaderArray |
Definition at line 186 of file LabelContainer.h.
std::vector<StoredLabelType> o2::dataformats::LabelContainer< LabelType, isContiguousStorage >::mLabelArray |
Definition at line 187 of file LabelContainer.h.