#include <Parameter.h>
|
std::map< std::string, unsigned int > | getColumnIndices (void) const noexcept |
|
std::string | getId (void) const noexcept |
|
std::string | getProcOrRole (void) const noexcept |
|
template<class T > |
std::vector< T > | getTableColumn (const char *colName) const |
|
template<class T > |
std::map< std::string, T > | getTableRow (unsigned long rowNum) const |
|
std::string | getType (void) const noexcept |
|
template<class T > |
T | getValue (void) const |
|
std::string | getValueAsStr (void) const noexcept |
|
template<class T > |
std::vector< T > | getVector (void) const |
|
bool | isScalar (void) const noexcept |
|
bool | isTable (void) const noexcept |
|
bool | isVector (void) const noexcept |
|
Parameter & | operator= (const Parameter &s)=default |
|
Parameter & | operator= (Parameter &&s)=default |
|
| Parameter (const char *id, const char *procOrRole, const char *type, const char *value, const char *delimeter=",") |
|
| Parameter (const char *id, const char *procOrRole, const char *types, const char *columns, const std::vector< std::string > &rows, const char *delimeter=",") |
|
| Parameter (const Parameter &s)=default |
|
| Parameter (Parameter &&s)=default |
|
| Parameter (void) |
|
| ~Parameter (void) |
|
Definition at line 21 of file Parameter.h.
◆ Parameter() [1/5]
l1t::Parameter::Parameter |
( |
const Parameter & |
s | ) |
|
|
default |
◆ Parameter() [2/5]
◆ Parameter() [3/5]
l1t::Parameter::Parameter |
( |
const char * |
id, |
|
|
const char * |
procOrRole, |
|
|
const char * |
type, |
|
|
const char * |
value, |
|
|
const char * |
delimeter = "," |
|
) |
| |
◆ Parameter() [4/5]
l1t::Parameter::Parameter |
( |
const char * |
id, |
|
|
const char * |
procOrRole, |
|
|
const char * |
types, |
|
|
const char * |
columns, |
|
|
const std::vector< std::string > & |
rows, |
|
|
const char * |
delimeter = "," |
|
) |
| |
◆ Parameter() [5/5]
l1t::Parameter::Parameter |
( |
void |
| ) |
|
|
inline |
◆ ~Parameter()
l1t::Parameter::~Parameter |
( |
void |
| ) |
|
|
inline |
◆ getColumnIndices()
std::map<std::string, unsigned int> l1t::Parameter::getColumnIndices |
( |
void |
| ) |
const |
|
inlinenoexcept |
◆ getId()
std::string l1t::Parameter::getId |
( |
void |
| ) |
const |
|
inlinenoexcept |
◆ getProcOrRole()
std::string l1t::Parameter::getProcOrRole |
( |
void |
| ) |
const |
|
inlinenoexcept |
◆ getTableColumn()
template<class T >
std::vector<T> l1t::Parameter::getTableColumn |
( |
const char * |
colName | ) |
const |
|
inline |
◆ getTableRow()
template<class T >
std::map<std::string, T> l1t::Parameter::getTableRow |
( |
unsigned long |
rowNum | ) |
const |
|
inline |
Definition at line 88 of file Parameter.h.
89 std::map<std::string, T> retval;
92 retval.insert(std::make_pair(column.first, castTo<T>(column.second.at(rowNum).c_str())));
References table.
◆ getType()
std::string l1t::Parameter::getType |
( |
void |
| ) |
const |
|
inlinenoexcept |
◆ getValue()
template<class T >
T l1t::Parameter::getValue |
( |
void |
| ) |
const |
|
inline |
Definition at line 53 of file Parameter.h.
55 throw std::runtime_error(
"The registered type: '" +
type +
56 "' is not a scalar -> try getVector() or getTable()");
References isScalar(), and scalarOrVector.
◆ getValueAsStr()
std::string l1t::Parameter::getValueAsStr |
( |
void |
| ) |
const |
|
inlinenoexcept |
◆ getVector()
template<class T >
std::vector<T> l1t::Parameter::getVector |
( |
void |
| ) |
const |
|
inline |
Definition at line 61 of file Parameter.h.
63 throw std::runtime_error(
"The registered type: '" +
type +
"' is not a vector");
65 const char *
d =
delim.c_str();
69 for (
const char *
item = strtok_r(
copy.get(),
d, &saveptr);
item !=
nullptr;
item = strtok_r(
nullptr,
d, &saveptr))
72 }
catch (std::runtime_error &
e) {
73 throw std::runtime_error(
std::string(
e.what()) +
"; check if delimeter '" +
delim +
"' is correct");
References filterCSVwithJSON::copy, ztail::d, delim, MillePedeFileConverter_cfg::e, bookConverter::elements, isVector(), B2GTnPMonitor_cfi::item, scalarOrVector, AlCaHLTBitMon_QueryRunRegistry::string, and funct::void.
◆ isScalar()
bool l1t::Parameter::isScalar |
( |
void |
| ) |
const |
|
inlinenoexcept |
Definition at line 35 of file Parameter.h.
36 if (
type.find(
"vector") != std::string::npos ||
type.find(
"table") != std::string::npos)
Referenced by getValue().
◆ isTable()
bool l1t::Parameter::isTable |
( |
void |
| ) |
const |
|
inlinenoexcept |
Definition at line 45 of file Parameter.h.
46 if (
type.find(
"table") == std::string::npos)
◆ isVector()
bool l1t::Parameter::isVector |
( |
void |
| ) |
const |
|
inlinenoexcept |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ columnNameToIndex
std::map<std::string, unsigned int> l1t::Parameter::columnNameToIndex |
|
private |
◆ delim
std::string l1t::Parameter::delim |
|
private |
◆ id
std::string l1t::Parameter::id |
|
private |
◆ procOrRole
std::string l1t::Parameter::procOrRole |
|
private |
◆ scalarOrVector
std::string l1t::Parameter::scalarOrVector |
|
private |
◆ table
std::map<std::string, std::vector<std::string> > l1t::Parameter::table |
|
private |
◆ type
std::string l1t::Parameter::type |
|
private |