 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef COLUMNAR_TEST_FIXTURES_MANUAL_COLUMN_DATA_H
9 #define COLUMNAR_TEST_FIXTURES_MANUAL_COLUMN_DATA_H
11 #include <boost/core/demangle.hpp>
52 [[nodiscard]]
const std::type_info*
type()
const noexcept {
57 [[nodiscard]] std::span<const T>
getSpan (
const std::string&
name)
const
60 throw std::runtime_error (
"column " +
name +
" not configured");
62 throw std::runtime_error (
"column " +
name +
" has wrong type: " + boost::core::demangle(
m_type->name()) +
" != " + boost::core::demangle(
typeid(T).name()));
63 return std::span<const T> (
static_cast<const T*
> (
m_column.get()),
m_data.size());
84 const std::type_info *
m_type =
nullptr;
char data[hepevt_bytes_allocation_ATLAS]
void * columnVoidData() noexcept
get the data pointer for the column
ManualColumnData(std::vector< std::any > &&data)
standard constructor
bool const RAWDATA *ch2 const
std::shared_ptr< void > m_column
the column created from m_data
const std::type_info * m_type
the actual type for the column
std::vector< std::any > m_data
a vector of untyped data provided by the user
a class that holds manually specified column data
const std::type_info * type() const noexcept
get the type we are configured for
void configureType(const std::string &columnName, const std::type_info &type)
configure for the given type
std::size_t columnSize() const noexcept
get the size of the column
std::span< const T > getSpan(const std::string &name) const
get the configured column as an std::span