#include <HcalCalibrationWidthsSet.h>
Classes | |
struct | CalibWidthSetObject |
Public Member Functions | |
void | clear () |
const HcalCalibrationWidths & | getCalibrationWidths (const DetId id) const |
HcalCalibrationWidthsSet () | |
void | setCalibrationWidths (const DetId id, const HcalCalibrationWidths &ca) |
void | sort () |
Private Types | |
typedef CalibWidthSetObject | Item |
Private Attributes | |
HcalCalibrationWidths | dummy |
std::vector< CalibWidthSetObject > | mItems |
bool | sorted_ |
typedef CalibWidthSetObject HcalCalibrationWidthsSet::Item [private] |
Definition at line 29 of file HcalCalibrationWidthsSet.h.
HcalCalibrationWidthsSet::HcalCalibrationWidthsSet | ( | ) |
Definition at line 8 of file HcalCalibrationWidthsSet.cc.
: sorted_ (false) {}
void HcalCalibrationWidthsSet::clear | ( | void | ) |
Definition at line 42 of file HcalCalibrationWidthsSet.cc.
References mItems.
Referenced by HcalDbService::buildCalibWidths().
{ mItems.clear(); }
const HcalCalibrationWidths & HcalCalibrationWidthsSet::getCalibrationWidths | ( | const DetId | id | ) | const |
Definition at line 11 of file HcalCalibrationWidthsSet.cc.
References spr::find(), mItems, sorted_, and filterCSVwithJSON::target.
Referenced by HcalDbService::getHcalCalibrationWidths().
{ Item target(fId); std::vector<Item>::const_iterator cell; if (sorted_) { cell = std::lower_bound (mItems.begin(), mItems.end(), target); } else { cell = std::find(mItems.begin(),mItems.end(), target); } if (cell == mItems.end() || cell->id != fId) throw cms::Exception ("Conditions not found") << "Unavailable HcalCalibrationWidths for cell " << HcalGenericDetId(fId); return cell->calib; }
void HcalCalibrationWidthsSet::setCalibrationWidths | ( | const DetId | id, |
const HcalCalibrationWidths & | ca | ||
) |
Definition at line 25 of file HcalCalibrationWidthsSet.cc.
References calib, spr::find(), mItems, and sorted_.
Referenced by HcalDbService::buildCalibWidths().
void HcalCalibrationWidthsSet::sort | ( | ) |
Definition at line 36 of file HcalCalibrationWidthsSet.cc.
References mItems, and sorted_.
Referenced by HcalDbService::buildCalibWidths().
Definition at line 30 of file HcalCalibrationWidthsSet.h.
std::vector<CalibWidthSetObject> HcalCalibrationWidthsSet::mItems [private] |
Definition at line 31 of file HcalCalibrationWidthsSet.h.
Referenced by clear(), getCalibrationWidths(), setCalibrationWidths(), and sort().
bool HcalCalibrationWidthsSet::sorted_ [private] |
Definition at line 32 of file HcalCalibrationWidthsSet.h.
Referenced by getCalibrationWidths(), setCalibrationWidths(), and sort().