1 #ifndef CALIBRATION_INTERFACE_H
2 #define CALIBRATION_INTERFACE_H
11 template <
class CategoryT,
class CalibDataT>
33 int addEntry(
const CategoryT& categoryDefinition,
const CalibDataT&
data);
44 template <
class CategoryT,
class CalibDataT>
47 template <
class CategoryT,
class CalibDataT>
50 template <
class CategoryT,
class CalibDataT>
54 for (
typename std::vector<std::pair<CategoryT, CalibDataT> >::const_iterator it = m_categoriesWithData.begin();
55 it != m_categoriesWithData.end();
57 if ((*it).first.match(calibrationInput)) {
59 edm::LogWarning(
"BTagCalibration") <<
"WARNING: OVERLAP in categories, using latest one";
68 template <
class CategoryT,
class CalibDataT>
71 if (
i >= 0 &&
ii < m_categoriesWithData.size())
72 return &m_categoriesWithData[
i].
second;
77 template <
class CategoryT,
class CalibDataT>
80 if (
i >= 0 &&
ii < m_categoriesWithData.size())
81 return &m_categoriesWithData[
i].
second;
86 template <
class CategoryT,
class CalibDataT>
89 return addEntry(categoryDefinition, emptyData);
92 template <
class CategoryT,
class CalibDataT>
94 std::pair<CategoryT, CalibDataT> newEntry(categoryDefinition,
data);
95 m_categoriesWithData.push_back(newEntry);
96 return m_categoriesWithData.size();
99 template <
class CategoryT,
class CalibDataT>
101 m_categoriesWithData[
index].second =
data;