1 #ifndef CALIBRATION_INTERFACE_H
2 #define CALIBRATION_INTERFACE_H
37 int addEntry(
const CategoryT & categoryDefinition,
const CalibDataT &
data);
49 template <
class CategoryT,
class CalibDataT>
54 template <
class CategoryT,
class CalibDataT>
59 template <
class CategoryT,
class CalibDataT>
64 for(
typename std::vector<std::pair<CategoryT,CalibDataT> >::const_iterator it = m_categoriesWithData.begin();it!=m_categoriesWithData.end();it++)
67 if((*it).first.match(calibrationInput))
71 edm::LogWarning(
"BTagCalibration") <<
"WARNING: OVERLAP in categories, using latest one" ;
80 template <
class CategoryT,
class CalibDataT>
84 if(i>=0 && ii < m_categoriesWithData.size() )
85 return &m_categoriesWithData[i].
second;
91 template <
class CategoryT,
class CalibDataT>
95 if(i>=0 && ii < m_categoriesWithData.size() )
96 return &m_categoriesWithData[i].
second;
101 template <
class CategoryT,
class CalibDataT>
104 CalibDataT emptyData;
105 return addEntry(categoryDefinition,emptyData);
108 template <
class CategoryT,
class CalibDataT>
111 std::pair<CategoryT,CalibDataT> newEntry(categoryDefinition,data);
112 m_categoriesWithData.push_back(newEntry);
113 return m_categoriesWithData.size();
117 template <
class CategoryT,
class CalibDataT>
int getIndex(const typename CategoryT::Input &calibrationInput) const
U second(std::pair< T, U > const &p)
void setCalibData(int index, const CalibDataT &data)
const std::vector< std::pair< CategoryT, CalibDataT > > & categoriesWithData() const
std::vector< std::pair< CategoryT, CalibDataT > > m_categoriesWithData
const CalibDataT * getCalibData(const typename CategoryT::Input &calibrationInput) const
CalibDataT * getCalibData(const typename CategoryT::Input &calibrationInput)
int addEntry(const CategoryT &categoryDefinition, const CalibDataT &data)
const CategoryT * getCategoryDefinition(int index) const
int addCategoryDefinition(const CategoryT &categoryDefinition)