8 #ifndef COLUMNAR_CORE_VECTOR_COLUMN_H
9 #define COLUMNAR_CORE_VECTOR_COLUMN_H
35 struct ColumnTypeTraits<std::
vector<CT>,ColumnarModeXAOD>
final
37 using CM = ColumnarModeXAOD;
38 using ElementType =
typename ColumnTypeTraits<CT,CM>::ColumnType;
39 using ColumnType = NativeColumn<std::vector<ElementType>>;
40 using UserType = std::span<const ElementType>;
45 static std::span<const ElementType> convertInput (
const std::vector<ElementType>&
value) {
return std::span<const ElementType> (
value);}
56 template<ContainerIdConcept CI,
typename CT>
73 myinfo.offsetName = columnarTool.containerStoreName (CI::idName);
74 myinfo.isOffset =
true;
75 info.offsetName = columnarTool.containerStoreName (CI::idName) +
"." +
name +
".offset";
77 columnarTool.addColumn (
info.offsetName,
m_offsetData.get(), std::move (myinfo));
79 columnarTool.addColumn (columnarTool.containerStoreName(CI::idName) +
"." +
name +
".data",
m_dataData.get(), std::move (
info));
98 std::span<const ElementType>
operator () (ObjectId<CI,CM>
id)
const noexcept
102 return std::span<const ElementType> (&
data[
offset[
id.getIndex()]],
offset[
id.getIndex()+1]-
offset[
id.getIndex()]);
105 bool isAvailable (ObjectId<CI,CM>
id)
const noexcept
108 return data !=
nullptr;
131 template<ContainerIdConcept CI,
typename CT,
typename CM>
154 [[nodiscard]]
bool isAvailable (ObjectId<CI,CM>
id)
const noexcept