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