![]() |
ATLAS Offline Software
|
a class that interfaces an IColumnarTool to a ColumnVectorHeader More...
#include <ToolColumnVectorMap.h>
Classes | |
struct | MyColumnInfo |
my cached information for the various columns needed More... | |
Public Member Functions | |
ToolColumnVectorMap (ColumnVectorHeader &val_columnHeader, IColumnarTool &val_tool) | |
standard constructor More... | |
const IColumnarTool & | getTool () const |
get the wrapped tool More... | |
const ColumnVectorHeader & | getColumnHeader () const |
get the header information for the various columns needed More... | |
std::vector< std::string > | getColumnNames () const |
get the list of all defined columns More... | |
std::size_t | getColumnIndex (const std::string &name) const |
get the index for the column with the given name More... | |
template<typename CT > | |
void | setColumn (ColumnVectorData &columnData, const std::string &name, std::size_t size, CT *dataPtr) const |
set the data for the given column picking up the type via a template More... | |
void | setColumnVoid (ColumnVectorData &columnData, const std::string &name, std::size_t size, const void *dataPtr, const std::type_info &type, bool isConst) const |
set the data for the given column with the user passing in the type More... | |
template<typename CT > | |
std::pair< std::size_t, CT * > | getColumn (ColumnVectorData &columnData, const std::string &name) const |
get the data for the given column picking up the type via a template More... | |
std::pair< std::size_t, const void * > | getColumnVoid (ColumnVectorData &columnData, const std::string &name, const std::type_info *type, bool isConst) const |
get the data for the given column in a type-erased manner More... | |
Private Attributes | |
const IColumnarTool * | m_tool = nullptr |
the wrapped tool More... | |
ColumnVectorHeader * | m_columnHeader = nullptr |
the header information for the various columns needed More... | |
std::unordered_map< std::string, MyColumnInfo > | m_columns |
a class that interfaces an IColumnarTool to a ColumnVectorHeader
This takes care of registering all the columns needed by the tool, storing the name-index map, and setting the column indices in the tool.
This class does not try to take care of any tool management, or working with the ColumnVectorData. It does provide some helpers implemented using its own public interface, but this is just for convenience.
Definition at line 29 of file ToolColumnVectorMap.h.
|
explicit |
standard constructor
configure all the columns for it, and set the proper column indices in the tool.
Definition at line 25 of file ToolColumnVectorMap.cxx.
|
inline |
get the data for the given column picking up the type via a template
Definition at line 94 of file ToolColumnVectorMap.h.
|
inline |
get the header information for the various columns needed
Definition at line 49 of file ToolColumnVectorMap.h.
std::size_t columnar::ToolColumnVectorMap::getColumnIndex | ( | const std::string & | name | ) | const |
get the index for the column with the given name
This is mostly to share the lookup code, as well as the proper error handling.
Definition at line 72 of file ToolColumnVectorMap.cxx.
std::vector< std::string > columnar::ToolColumnVectorMap::getColumnNames | ( | ) | const |
get the list of all defined columns
This is mostly to make it easy for the caller to know which columns are defined. For more complete information ask the tool directly for the vector of ColumnInfo
.
Definition at line 60 of file ToolColumnVectorMap.cxx.
|
inline |
get the data for the given column in a type-erased manner
Definition at line 100 of file ToolColumnVectorMap.h.
|
inline |
|
inline |
set the data for the given column picking up the type via a template
These function are just forwarding to ColumnVectorHeader and ColumnVectorData. These are just here to make use easier and insulate the user from changes (Law of Demeter).
Definition at line 79 of file ToolColumnVectorMap.h.
|
inline |
set the data for the given column with the user passing in the type
Definition at line 85 of file ToolColumnVectorMap.h.
|
private |
the header information for the various columns needed
Definition at line 115 of file ToolColumnVectorMap.h.
|
private |
Definition at line 122 of file ToolColumnVectorMap.h.
|
private |