 |
ATLAS Offline Software
|
Go to the documentation of this file.
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<RegularContainerIdConcept CI,
typename CT>
73 myinfo.offsetName = CI::idName;
74 myinfo.isOffset =
true;
75 info.offsetName = std::string (CI::idName) +
"." +
name +
".offset";
77 columnarTool.addColumn (
info.offsetName,
m_offsetData.get(), std::move (myinfo));
79 columnarTool.addColumn (std::string (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>
char data[hepevt_bytes_allocation_ATLAS]
const InDetSimData * getData(const InDetSimDataCollection &coll, const Identifier &id)
static constexpr bool useConvertWithDataInput
static constexpr bool useConvertInput
void moveAccessor(unsigned &dataIndex, std::unique_ptr< ColumnAccessorDataArray > &accessorData, unsigned &sourceIndex, std::unique_ptr< ColumnAccessorDataArray > &sourceData)
typename ColumnTypeTraits< CT, CM >::ColumnType ElementType
AccessorTemplate & operator=(AccessorTemplate &&that)
std::map< std::string, HypoJetVector >::const_iterator CI
@ u
Enums for curvilinear frames.
a struct that contains meta-information about each column that's needed to interface the column with ...
AccessorTemplate()=default
ColumnAccessMode
an enum for the different access modes for a column
static constexpr bool isNativeType
typename ColumnTypeTraits< CT, CM >::UserType UserType
a class representing a single object (electron, muons, etc.)
bool isAvailable(ObjectId< CI, CM > id) const noexcept
VectorConvertView(FunctionType &&, ViewType &&) -> VectorConvertView< std::remove_cv_t< FunctionType >, std::remove_cv_t< ViewType >>
static ColumnInfo & updateColumnInfo(ColumnarTool< CM > &, ColumnInfo &info)
a trait class to provide information about the column type
std::unique_ptr< ColumnAccessorDataArray > m_offsetData
ColumnAccessor< CI, std::vector< typename ColumnTypeTraits< CT, CM >::ColumnType >, CM > m_accessor
std::unique_ptr< ColumnAccessorDataArray > m_dataData
the raw column accessor template class
decltype(auto) operator()(ObjectId< CI, CM > id) const noexcept
std::size_t ColumnarOffsetType
the type used for the size and offsets in the columnar data