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