#include <CalibrationInterface.h>
Public Member Functions | |
int | addCategoryDefinition (const CategoryT &categoryDefinition) |
int | addEntry (const CategoryT &categoryDefinition, const CalibDataT &data) |
CalibrationInterface () | |
const std::vector< std::pair < CategoryT, CalibDataT > > & | categoriesWithData () const |
CalibDataT * | getCalibData (int index) |
CalibDataT * | getCalibData (const typename CategoryT::Input &calibrationInput) |
const CalibDataT * | getCalibData (int index) const |
const CalibDataT * | getCalibData (const typename CategoryT::Input &calibrationInput) const |
const CategoryT * | getCategoryDefinition (int index) const |
int | getIndex (const typename CategoryT::Input &calibrationInput) const |
void | setCalibData (int index, const CalibDataT &data) |
int | size () const |
~CalibrationInterface () | |
Private Attributes | |
std::vector< std::pair < CategoryT, CalibDataT > > | m_categoriesWithData |
Definition at line 11 of file CalibrationInterface.h.
CalibrationInterface< CategoryT, CalibDataT >::CalibrationInterface | ( | ) |
Definition at line 50 of file CalibrationInterface.h.
{ }
CalibrationInterface< CategoryT, CalibDataT >::~CalibrationInterface | ( | ) |
Definition at line 55 of file CalibrationInterface.h.
{ }
int CalibrationInterface< CategoryT, CalibDataT >::addCategoryDefinition | ( | const CategoryT & | categoryDefinition | ) |
Definition at line 102 of file CalibrationInterface.h.
References revisionDML::addEntry().
{ CalibDataT emptyData; return addEntry(categoryDefinition,emptyData); }
int CalibrationInterface< CategoryT, CalibDataT >::addEntry | ( | const CategoryT & | categoryDefinition, |
const CalibDataT & | data | ||
) |
Definition at line 109 of file CalibrationInterface.h.
{ std::pair<CategoryT,CalibDataT> newEntry(categoryDefinition,data); m_categoriesWithData.push_back(newEntry); return m_categoriesWithData.size(); }
const std::vector<std::pair<CategoryT, CalibDataT> >& CalibrationInterface< CategoryT, CalibDataT >::categoriesWithData | ( | ) | const [inline] |
Definition at line 41 of file CalibrationInterface.h.
{return m_categoriesWithData; }
CalibDataT* CalibrationInterface< CategoryT, CalibDataT >::getCalibData | ( | const typename CategoryT::Input & | calibrationInput | ) | [inline] |
Definition at line 23 of file CalibrationInterface.h.
{ return(getCalibData(getIndex(calibrationInput))); }
CalibDataT * CalibrationInterface< CategoryT, CalibDataT >::getCalibData | ( | int | index | ) |
Definition at line 92 of file CalibrationInterface.h.
References i, and edm::second().
{ size_t ii=i; if(i>=0 && ii < m_categoriesWithData.size() ) return &m_categoriesWithData[i].second; else return 0; }
const CalibDataT * CalibrationInterface< CategoryT, CalibDataT >::getCalibData | ( | int | index | ) | const |
Definition at line 81 of file CalibrationInterface.h.
References i, and edm::second().
{ size_t ii=i; if(i>=0 && ii < m_categoriesWithData.size() ) return &m_categoriesWithData[i].second; else return 0; }
const CalibDataT* CalibrationInterface< CategoryT, CalibDataT >::getCalibData | ( | const typename CategoryT::Input & | calibrationInput | ) | const [inline] |
Definition at line 18 of file CalibrationInterface.h.
Referenced by CalibrationInterface< T, CO >::getCalibData().
{ return(getCalibData(getIndex(calibrationInput))); }
const CategoryT* CalibrationInterface< CategoryT, CalibDataT >::getCategoryDefinition | ( | int | index | ) | const |
int CalibrationInterface< CategoryT, CalibDataT >::getIndex | ( | const typename CategoryT::Input & | calibrationInput | ) | const |
Definition at line 60 of file CalibrationInterface.h.
References newFWLiteAna::found, and i.
Referenced by CalibrationInterface< T, CO >::getCalibData().
{ int i=0; int found=-1; for(typename std::vector<std::pair<CategoryT,CalibDataT> >::const_iterator it = m_categoriesWithData.begin();it!=m_categoriesWithData.end();it++) { if((*it).first.match(calibrationInput)) { if(found >=0 ) { edm::LogWarning("BTagCalibration") << "WARNING: OVERLAP in categories, using latest one" ; } found=i; } i++; } return found; }
void CalibrationInterface< CategoryT, CalibDataT >::setCalibData | ( | int | index, |
const CalibDataT & | data | ||
) |
Definition at line 118 of file CalibrationInterface.h.
References data, and getHLTprescales::index.
{ m_categoriesWithData[index].second=data; }
int CalibrationInterface< CategoryT, CalibDataT >::size | ( | void | ) | const [inline] |
Definition at line 42 of file CalibrationInterface.h.
{return m_categoriesWithData.size(); }
std::vector<std::pair<CategoryT, CalibDataT> > CalibrationInterface< CategoryT, CalibDataT >::m_categoriesWithData [private] |
Definition at line 45 of file CalibrationInterface.h.
Referenced by CalibrationInterface< T, CO >::categoriesWithData(), and CalibrationInterface< T, CO >::size().