#include <HcalCalibrationsSet.h>
Classes | |
struct | CalibSetObject |
Public Member Functions | |
void | clear () |
const HcalCalibrations & | getCalibrations (const DetId id) const |
HcalCalibrationsSet () | |
void | setCalibrations (const DetId id, const HcalCalibrations &ca) |
void | sort () |
Private Types | |
typedef CalibSetObject | Item |
Private Attributes | |
HcalCalibrations | dummy |
std::vector< CalibSetObject > | mItems |
bool | sorted_ |
typedef CalibSetObject HcalCalibrationsSet::Item [private] |
Definition at line 29 of file HcalCalibrationsSet.h.
HcalCalibrationsSet::HcalCalibrationsSet | ( | ) |
Definition at line 8 of file HcalCalibrationsSet.cc.
: sorted_ (false) {}
void HcalCalibrationsSet::clear | ( | void | ) |
Definition at line 42 of file HcalCalibrationsSet.cc.
References mItems.
Referenced by HcalDbService::buildCalibrations().
{ mItems.clear(); }
const HcalCalibrations & HcalCalibrationsSet::getCalibrations | ( | const DetId | id | ) | const |
Definition at line 11 of file HcalCalibrationsSet.cc.
References spr::find(), mItems, sorted_, and filterCSVwithJSON::target.
Referenced by HcalDbService::getHcalCalibrations().
{ 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 HcalCalibrations for cell " << HcalGenericDetId(fId); return cell->calib; }
void HcalCalibrationsSet::setCalibrations | ( | const DetId | id, |
const HcalCalibrations & | ca | ||
) |
Definition at line 25 of file HcalCalibrationsSet.cc.
References calib, spr::find(), mItems, and sorted_.
Referenced by HcalDbService::buildCalibrations().
void HcalCalibrationsSet::sort | ( | ) |
Definition at line 36 of file HcalCalibrationsSet.cc.
References mItems, and sorted_.
Referenced by HcalDbService::buildCalibrations().
HcalCalibrations HcalCalibrationsSet::dummy [private] |
Definition at line 30 of file HcalCalibrationsSet.h.
std::vector<CalibSetObject> HcalCalibrationsSet::mItems [private] |
Definition at line 31 of file HcalCalibrationsSet.h.
Referenced by clear(), getCalibrations(), setCalibrations(), and sort().
bool HcalCalibrationsSet::sorted_ [private] |
Definition at line 32 of file HcalCalibrationsSet.h.
Referenced by getCalibrations(), setCalibrations(), and sort().