8#ifndef COLUMNAR_CORE_LINK_COLUMN_H
9#define COLUMNAR_CORE_LINK_COLUMN_H
11#include <AthLinks/ElementLink.h>
24 template<ContainerIdConcept LT,
typename ELT>
32 template<ContainerIdConcept LT>
47 typename LT::xAODObjectIdType *ptr = *link.
cptr();
57 template<ContainerIdConcept LT,
typename ELT>
72 auto *ptr = *link.
cptr();
74 auto *ptr2 =
dynamic_cast<typename LT::xAODObjectIdType*
>(ptr);
75 if (!ptr2)
throw std::runtime_error (
"link not of expected type");
91 template<ContainerIdConcept LT>
103 info.linkTargetNames = {std::string{LT::idName}};
118 template<RegularContainerIdConcept LT,
typename ELT>
char data[hepevt_bytes_allocation_ATLAS]
ElementLink implementation for ROOT usage.
ElementConstPointer cptr() const
Return a pointer to the referenced element.
bool isValid() const
Test to see if the link can be dereferenced.
a class representing a single optional object (electron, muons, etc.)
constexpr ColumnarOffsetType invalidObjectIndex
the value for an invalid element index
a struct that contains meta-information about each column that's needed to interface the column with ...
OptObjectId< LT > UserType
static OptObjectId< LT > convertInput(const ElementLink< ELT > &link)
static constexpr bool useConvertWithDataInput
static constexpr bool useConvertInput
static ColumnInfo & updateColumnInfo(ColumnarTool< CM > &, ColumnInfo &info)
static constexpr bool isNativeType
NativeColumn< ElementLink< ELT > > ColumnType
static constexpr bool isNativeType
static OptObjectId< LT > convertInput(void **data, typename CM::LinkIndexType link)
static ColumnInfo & updateColumnInfo(ColumnarTool< CM > &, ColumnInfo &info)
OptObjectId< LT > UserType
static constexpr bool useConvertInput
static constexpr bool useConvertWithDataInput
typename CM::LinkIndexType ColumnType
NativeColumn< ElementLink< typename LT::xAODElementLinkType > > ColumnType
static OptObjectId< LT > convertInput(const ElementLink< typename LT::xAODElementLinkType > &link)
OptObjectId< LT > UserType
static constexpr bool isNativeType
static constexpr bool useConvertInput
static constexpr bool useConvertWithDataInput
static ColumnInfo & updateColumnInfo(ColumnarTool< CM > &, ColumnInfo &info)
a trait class to provide information about the column type
std::size_t LinkIndexType
the type used for columns that represent element links
a special column type that behaves like an OptObjectId, but applies an internal cast in xAOD mode
a type wrapper to force AccessorTemplate to treat the type as native