#include <AlgorithmCalibration.h>
Public Types | |
typedef XERCES_CPP_NAMESPACE::DOMElement | DOMElement |
typedef XERCES_CPP_NAMESPACE::DOMNode | DOMNode |
Public Member Functions | |
AlgorithmCalibration (const std::string &fileName) | |
void | saveCalibration (const std::string &fileName) |
void | startCalibration () |
void | updateCalibration (const typename T::Input &calibrationInput) |
template<class CI > | |
void | updateCalibration (const typename T::Input &calibrationInputForCategory, const CI &inputForCalibration) |
~AlgorithmCalibration () | |
Public Member Functions inherited from CalibrationInterface< T, CO > | |
int | addCategoryDefinition (const T &categoryDefinition) |
int | addEntry (const T &categoryDefinition, const CO &data) |
CalibrationInterface () | |
const std::vector< std::pair< T, CO > > & | categoriesWithData () const |
const CO * | getCalibData (const typename T::Input &calibrationInput) const |
CO * | getCalibData (const typename T::Input &calibrationInput) |
const CO * | getCalibData (int index) const |
CO * | getCalibData (int index) |
const T * | getCategoryDefinition (int index) const |
int | getIndex (const typename T::Input &calibrationInput) const |
void | setCalibData (int index, const CO &data) |
int | size () const |
~CalibrationInterface () | |
Protected Member Functions | |
DOMElement * | dom () |
bool | readCategories () |
CO * | readObject (DOMNode *) |
Private Attributes | |
std::string | m_filename |
CalibrationXML * | m_xml |
The AlgorithmCalibration class is the interface between user code and calibration framework developed for BReco subsytem. Both the analysis programs and the calibration programs should only access calibration information via that class.
An algorithm is supposed to keep a single instance of that class to avoid the reload of XML for every event (during analysis) and because you want to accumulate over all events the data to perform a new calibration in the calibration program.
The class is templated on the Category T and on the CalibratedObject CO
Definition at line 37 of file AlgorithmCalibration.h.
typedef XERCES_CPP_NAMESPACE::DOMElement AlgorithmCalibration< T, CO >::DOMElement |
Definition at line 41 of file AlgorithmCalibration.h.
typedef XERCES_CPP_NAMESPACE::DOMNode AlgorithmCalibration< T, CO >::DOMNode |
Definition at line 42 of file AlgorithmCalibration.h.
AlgorithmCalibration< T, CO >::AlgorithmCalibration | ( | const std::string & | fileName | ) |
Create an AlgorithmCalibration class and load from fileName the cateogries and their objects.
Definition at line 93 of file AlgorithmCalibration.h.
References CalibrationXML::closeFile(), AlgorithmCalibration< T, CO >::m_xml, and AlgorithmCalibration< T, CO >::readCategories().
AlgorithmCalibration< T, CO >::~AlgorithmCalibration | ( | ) |
Definition at line 102 of file AlgorithmCalibration.h.
References AlgorithmCalibration< T, CO >::m_xml.
|
inlineprotected |
Definition at line 75 of file AlgorithmCalibration.h.
Referenced by AlgorithmCalibration< T, CO >::readCategories(), and AlgorithmCalibration< T, CO >::readObject().
|
protected |
Definition at line 108 of file AlgorithmCalibration.h.
References CalibrationInterface< T, CO >::addEntry(), eostools::cat(), AlgorithmCalibration< T, CO >::dom(), GetRecoTauVFromDQM_MC_cff::obj, and AlgorithmCalibration< T, CO >::readObject().
Referenced by AlgorithmCalibration< T, CO >::AlgorithmCalibration().
|
protected |
Definition at line 133 of file AlgorithmCalibration.h.
References AlgorithmCalibration< T, CO >::dom().
Referenced by AlgorithmCalibration< T, CO >::readCategories().
void AlgorithmCalibration< T, CO >::saveCalibration | ( | const std::string & | fileName | ) |
Finalize and save the calibration run to fileName
void AlgorithmCalibration< T, CO >::startCalibration | ( | ) |
Prepare for a new calibration run
void AlgorithmCalibration< T, CO >::updateCalibration | ( | const typename T::Input & | calibrationInput | ) |
Accumulate information to calibrate.
void AlgorithmCalibration< T, CO >::updateCalibration | ( | const typename T::Input & | calibrationInputForCategory, |
const CI & | inputForCalibration | ||
) |
|
private |
Definition at line 87 of file AlgorithmCalibration.h.
|
private |
Definition at line 88 of file AlgorithmCalibration.h.
Referenced by AlgorithmCalibration< T, CO >::AlgorithmCalibration(), and AlgorithmCalibration< T, CO >::~AlgorithmCalibration().