![]() |
ATLAS Offline Software
|
a struct that contains meta-information about each column that's needed to interface the column with the columnar data store More...
#include <ColumnInfo.h>
Public Attributes | |
| std::string | name {} |
| the name of the column | |
| unsigned | index = 0u |
| the index of the column in the data array | |
| const std::type_info * | type = nullptr |
| the type of the individual entries in the column | |
| ColumnAccessMode | accessMode = ColumnAccessMode::input |
| the access mode for the column | |
| std::string | offsetName {} |
| the name of the offset column used for this column (or empty string for none) | |
| std::vector< unsigned > | fixedDimensions {} |
| the fixed dimensions this column has (if any) | |
| bool | isOffset = false |
| whether this is an offset column | |
| std::string | replacesColumn {} |
| whether this replaces another column | |
| bool | isOptional = false |
| whether this column is optional | |
| std::string | soleLinkTargetName {} |
| for simple link columns: the name of the target container | |
| bool | isVariantLink = false |
| whether this is a variant link column | |
| std::vector< std::string > | variantLinkTargetNames {} |
| for variant link key columns: the names of the containers we can link to | |
| std::string | keyColumnForVariantLink {} |
| if this is a key column for a variant link, the name of the associated link column | |
a struct that contains meta-information about each column that's needed to interface the column with the columnar data store
Definition at line 34 of file ColumnInfo.h.
| ColumnAccessMode columnar::ColumnInfo::accessMode = ColumnAccessMode::input |
the access mode for the column
Definition at line 58 of file ColumnInfo.h.
| std::vector<unsigned> columnar::ColumnInfo::fixedDimensions {} |
the fixed dimensions this column has (if any)
For the most part we use dynamic dimensions via offset maps, but sometimes the dimensions are hard-coded, which then uses these dimensions.
Definition at line 82 of file ColumnInfo.h.
| unsigned columnar::ColumnInfo::index = 0u |
the index of the column in the data array
Definition at line 46 of file ColumnInfo.h.
| bool columnar::ColumnInfo::isOffset = false |
whether this is an offset column
In part this is for consistency checks, i.e. other columns can only refer to this as an offset column if this is set. It also means that there needs to be an extra element in the column past the last "regular" one to hold the total number of entries in columns using this.
Definition at line 92 of file ColumnInfo.h.
| bool columnar::ColumnInfo::isOptional = false |
whether this column is optional
Essentially this indicates that the column can be skipped, and the tool will check whether the column is present before trying to use it. This allows to adapt the tool somewhat to different environments.
The downside here is that overall this is still a bit ambiguous, i.e. whoever links up the columns needs to decide whether it is needed. For columns that are not in the input file that's easy, there is no choice but omitting them. However, some columns only exist as a backup option for other columns, and ideally we don't want to load the backup columns when the main columns are missing. So either that needs to be set during configuration, or we need to add more meta-information for that case, or the user needs to do something smart (i.e. manual) in their code.
Definition at line 121 of file ColumnInfo.h.
| bool columnar::ColumnInfo::isVariantLink = false |
whether this is a variant link column
If true, this column contains variant links that can reference objects in more than one container. In that case variantLinkTargetNames and variantLinkKeyColumn will be set.
Definition at line 139 of file ColumnInfo.h.
| std::string columnar::ColumnInfo::keyColumnForVariantLink {} |
if this is a key column for a variant link, the name of the associated link column
If set on a column, it indicates that this column serves as the key column for a variant link, and points to the link column that uses it. The key column should have exactly one entry per entry in variantLinkTargetNames, giving the container keys for each target container.
This field works together with variantLinkTargetNames on the same (key) column to define which containers the associated variant link can reference.
Definition at line 177 of file ColumnInfo.h.
| std::string columnar::ColumnInfo::name {} |
the name of the column
This is the primary way by which columns should be identified when interacting with the user, but it should only be used during the configuration. During the actual processing this should rely on the index for identification instead.
Definition at line 42 of file ColumnInfo.h.
| std::string columnar::ColumnInfo::offsetName {} |
the name of the offset column used for this column (or empty string for none)
Most of our columns do not represent a regular-shaped tensor, but has a different number of entries in each row, e.g. the column holding the muon-pt will have a different number of muons per event. To handle this, there needs to be a column that contains the offsets for each row.
There can be multiple irregularly shaped dimensions for a column, in which case this is just the name of the inner-most one. The outer-ones can be found by following the offset name in a chain.
Definition at line 74 of file ColumnInfo.h.
| std::string columnar::ColumnInfo::replacesColumn {} |
whether this replaces another column
For corrections it is quite typical that a column is meant to replace another column. In columnar land we will create genuinely new columns, in xAOD land we will usually overwrite the content of those columns. This member is used to indicate which column gets replaced.
Definition at line 102 of file ColumnInfo.h.
| std::string columnar::ColumnInfo::soleLinkTargetName {} |
for simple link columns: the name of the target container
For link columns that only reference a single container type, this contains the name of that container (i.e. the name of its offset column). For variant links (links that can reference multiple containers), this will be empty and variantLinkTargetNames should be used instead.
Definition at line 131 of file ColumnInfo.h.
| const std::type_info* columnar::ColumnInfo::type = nullptr |
the type of the individual entries in the column
This should generally be something like float or int, neither be const-qualified nor in a container like std::vector<float>.
Definition at line 54 of file ColumnInfo.h.
| std::vector<std::string> columnar::ColumnInfo::variantLinkTargetNames {} |
for variant link key columns: the names of the containers we can link to
This field is set on the key column (the column that has keyColumnForVariantLink set) rather than on the variant link column itself. It lists the container names that the associated variant link column can reference, in the order corresponding to the key values stored in this column.
For simple link columns (non-variant), this will be empty and soleLinkTargetName should be used instead.
Note that a variant link column may contain links to columns that are not listed here, but those will not be used by this tool. There are also no requirements on the exact values of the keys. And different tools may list the columns in different order. The thought behind that is that it allows multiple tools to read the same link column as long as they have each a unique key column, without having to coordinate the exact list of linked containers used.
Definition at line 162 of file ColumnInfo.h.