The Array Mode Data Area¶
For access to the columns there is a data area:
void** data = ...;
ObjectId and
ObjectRange, meaning it is readily available everywhere an xAOD
decoration (and with that a column) might be accessed.
It is ambiguous whether this ought to be a const qualified pointer or
not. It contains input and output columns, so either way at some point
somewhere a const_cast has to happen. However, this also generally
happens in a safe manner inside the columnar infrastructure, and users
will only ever experience non-const pointers if the input pointer was
non-const.
The meaning of each entry is completely determined by the index, which is given a meaning during setup time. All type and access checks are also based on checking that index.
For convenience entry 0 is always guaranteed to be a nullptr,
thereby guaranteeing that an uninitialized index will lead to a
nullptr dereference and a segmentation fault (as opposed to undefined
behavior). In practical use this should only occur if a user marks a
column as optional, but doesn't check first whether the column exists;
or if the user uses a default initialized (i.e. empty) column accessor.