 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef COLUMNAR_TOOL_WRAPPER_COLUMN_VECTOR_WRAPPER_H
9 #define COLUMNAR_TOOL_WRAPPER_COLUMN_VECTOR_WRAPPER_H
46 const std::type_info *
type =
nullptr;
109 static constexpr std::size_t
unsetIndex =
static_cast<std::size_t
>(-1);
122 void setOffsetColumn (std::size_t columnIndex, std::size_t offsetIndex);
168 template<
typename CT>
170 auto voidPtr =
reinterpret_cast<const void*
>(
const_cast<const CT*
>(dataPtr));
171 setColumnVoid (columnIndex,
size, voidPtr,
typeid (std::decay_t<CT>), std::is_const_v<CT>);
173 void setColumnVoid (std::size_t columnIndex, std::size_t
size,
const void *dataPtr,
const std::type_info&
type,
bool isConst);
177 template<
typename CT>
178 [[nodiscard]] std::pair<std::size_t,CT*>
181 auto [
size,
ptr] =
getColumnVoid (columnIndex, &
typeid (std::decay_t<CT>), std::is_const_v<CT>);
182 if constexpr (std::is_const_v<CT>)
183 return std::make_pair (
size,
static_cast<CT*
>(
ptr));
185 return std::make_pair (
size,
static_cast<CT*
>(
const_cast<void*
>(
ptr)));
187 [[nodiscard]] std::pair<std::size_t,const void*>
188 getColumnVoid (std::size_t columnIndex,
const std::type_info *
type,
bool isConst);
char data[hepevt_bytes_allocation_ATLAS]
void setColumn(std::size_t columnIndex, std::size_t size, CT *dataPtr)
set the data for the given column
ColumnVectorData(const ColumnVectorHeader *val_header)
standard constructor
void checkSelf() const
check the self-consistency of the header
the header information for the entire columnar data vector
static constexpr std::size_t nullIndex
the index used for an invalid index (always has to be 0)
bool readOnly
whether this column will only be used for read access
bool const RAWDATA *ch2 const
static constexpr std::size_t unsetIndex
the number used for an unset but non-null index
@ u
Enums for curvilinear frames.
void callNoCheck(const IColumnarTool &tool)
call the tool with the assembled data, without performing any checks on the data
std::vector< void * > m_data
std::size_t addColumn(const ColumnInfo &columnInfo)
add a column for the given ColumnInfo, returning its index
std::pair< std::size_t, const void * > getColumnVoid(std::size_t columnIndex, const std::type_info *type, bool isConst)
a struct that contains meta-information about each column that's needed to interface the column with ...
bool isOffset
whether this is an offset column
void checkData() const
do a basic check of the data vector
void setColumnVoid(std::size_t columnIndex, std::size_t size, const void *dataPtr, const std::type_info &type, bool isConst)
std::size_t numColumns() const noexcept
the number of columns in the columnar data vector
std::vector< std::size_t > m_dataSize
std::string debugName
the name of the column to use in messages
std::pair< std::size_t, CT * > getColumn(std::size_t columnIndex)
get the data for the given column
std::size_t size() const noexcept
static constexpr std::size_t sizeIndex
the index used for the column size column
static constexpr std::size_t numFixedColumns
the number of fix elements in the columnar data vector
std::size_t offsetIndex
the index of the offset column (or nullIndex for none)
const std::type_info * type
the type to use for the column
a class that holds the columnar data for a single call
unsigned arraySize
the total size of all inner array dimensions
const ColumnVectorElementHeader & getColumn(std::size_t index) const
get the column for the given index
std::vector< ColumnVectorElementHeader > m_elements
the elements in the columnar data vector
void setOffsetColumn(std::size_t columnIndex, std::size_t offsetIndex)
set the index of the offset column for the given column
bool isOptional
whether this column is optional
void checkData(std::span< const void *const > data) const
do a basic check of the data vector
the header information for a single element in the columnar data vector
ColumnVectorHeader()
standard contructor
const ColumnVectorHeader * m_header