15 dest.push_back(
static_cast<float>(*
static_cast<T *
>(
value)));
22 const auto size = std::min(vec.size(), maxSize);
23 dest.insert(
dest.end(), vec.begin(), vec.begin() +
size);
29bool MatchColHandler(
const std::type_info &colType, CustomLoaderHelper::ColHandler_t &handler,
bool &isVector)
31 if (colType ==
typeid(T)) {
32 handler = &AppendAs<T>;
34 handler = &AppendVectorAs<T>;
37 return handler !=
nullptr;
41template <
typename... Types>
42CustomLoaderHelper::ColHandler_t ResolveColHandler(
const std::type_info &colType,
bool &isVector)
44 CustomLoaderHelper::ColHandler_t handler =
nullptr;
45 if ((MatchColHandler<Types>(colType, handler, isVector) || ...))
49 "' cannot be converted to float.");
55 const std::vector<const std::type_info *> &colTypeIDs,
56 const std::vector<std::size_t> &vecSizes,
float vecPadding)
57 : fLocation(location), fVecPadding(vecPadding)
61 std::size_t vecIdx = 0;
62 for (
const auto *colType : colTypeIDs) {
63 bool isVector =
false;
65 ResolveColHandler<
float,
double,
bool,
char,
signed char,
unsigned char,
short,
unsigned short,
int,
66 unsigned int,
long,
unsigned long,
long long,
unsigned long long>(*colType, isVector));
68 fMaxSizes.push_back(isVector ? vecSizes[vecIdx++] : 1);
75 auto nValues{values.size()};
76 for (
decltype(nValues) i{}; i < nValues; i++)
77 fColHandlers[i](*fLocation, values[i], fMaxSizes[i], fVecPadding);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
CustomLoaderHelper(const std::shared_ptr< ROOT::RVecF > &location, const std::vector< const std::type_info * > &colTypeIDs, const std::vector< std::size_t > &vecSizes, float vecPadding)
void Exec(unsigned int slot, const std::vector< void * > &values)
std::vector< ColHandler_t > fColHandlers
One handler per input column, resolved once from the column types.
std::vector< std::size_t > fMaxSizes
Maximum size of each input column, resolved once from the vector sizes, only used for vector columns.
std::string TypeID2TypeName(const std::type_info &id)
Returns the name of a type starting from its type_info An empty string is returned in case of failure...