#include <CondFormats/CastorObjects/interface/CastorCalibrationQIEData.h>
Public Types | |
typedef std::vector< Item > | Container |
typedef CastorCalibrationQIECoder | Item |
Public Member Functions | |
bool | addCoder (DetId fId, const CastorCalibrationQIECoder &fCoder) |
CastorCalibrationQIEData () | |
std::vector< DetId > | getAllChannels () const |
const CastorCalibrationQIECoder * | getCoder (DetId fId) const |
get QIE parameters | |
void | sort () |
bool | sorted () const |
~CastorCalibrationQIEData () | |
Private Attributes | |
Container | mItems |
bool | mSorted |
Definition at line 19 of file CastorCalibrationQIEData.h.
typedef std::vector<Item> CastorCalibrationQIEData::Container |
Definition at line 36 of file CastorCalibrationQIEData.h.
Definition at line 35 of file CastorCalibrationQIEData.h.
CastorCalibrationQIEData::CastorCalibrationQIEData | ( | ) |
CastorCalibrationQIEData::~CastorCalibrationQIEData | ( | ) |
bool CastorCalibrationQIEData::addCoder | ( | DetId | fId, | |
const CastorCalibrationQIECoder & | fCoder | |||
) |
Definition at line 59 of file CastorCalibrationQIEData.cc.
References CastorCalibrationQIECoder::minCharges(), mItems, mSorted, and DetId::rawId().
00059 { 00060 CastorCalibrationQIECoder newCoder (fId.rawId ()); 00061 newCoder.setMinCharges (fCoder.minCharges ()); 00062 mItems.push_back (newCoder); 00063 mSorted = false; 00064 return true; 00065 }
std::vector< DetId > CastorCalibrationQIEData::getAllChannels | ( | ) | const |
Definition at line 51 of file CastorCalibrationQIEData.cc.
References mItems, and HLT_VtxMuL3::result.
00051 { 00052 std::vector<DetId> result; 00053 for (std::vector<CastorCalibrationQIECoder>::const_iterator item = mItems.begin (); item != mItems.end (); item++) { 00054 result.push_back (DetId (item->rawId ())); 00055 } 00056 return result; 00057 }
const CastorCalibrationQIECoder * CastorCalibrationQIEData::getCoder | ( | DetId | fId | ) | const |
get QIE parameters
Definition at line 36 of file CastorCalibrationQIEData.cc.
References TestMuL1L2Filter_cff::cerr, lat::endl(), find(), mItems, DetId::rawId(), sorted(), and target.
00036 { 00037 CastorCalibrationQIECoder target (fId.rawId ()); 00038 std::vector<CastorCalibrationQIECoder>::const_iterator cell; 00039 if (sorted ()) { 00040 cell = std::lower_bound (mItems.begin(), mItems.end(), target, compareItems ()); 00041 } 00042 else { 00043 std::cerr << "CastorCalibrationQIEData::getValues-> container is not sorted. Please sort it to search effectively" << std::endl; 00044 cell = find (mItems, target.rawId ()); 00045 } 00046 if (cell == mItems.end() || cell->rawId () != fId.rawId ()) 00047 throw cms::Exception ("Conditions not found") << "Unavailable Coder for cell " << HcalGenericDetId(fId); 00048 return &(*cell); 00049 }
void CastorCalibrationQIEData::sort | ( | ) |
Definition at line 67 of file CastorCalibrationQIEData.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), mItems, mSorted, and python::multivaluedict::sort().
00067 { 00068 if (!mSorted) { 00069 std::sort (mItems.begin(), mItems.end(), compareItems ()); 00070 mSorted = true; 00071 std::cout << "CastorCalibrationQIEData::sort ()->" << mItems.size () << std::endl; 00072 } 00073 }
bool CastorCalibrationQIEData::sorted | ( | ) | const [inline] |
Definition at line 30 of file CastorCalibrationQIEData.h.
References mSorted.
Referenced by getCoder().
00030 {return mSorted;}
Container CastorCalibrationQIEData::mItems [private] |
Definition at line 38 of file CastorCalibrationQIEData.h.
Referenced by addCoder(), getAllChannels(), getCoder(), and sort().
bool CastorCalibrationQIEData::mSorted [private] |
Definition at line 39 of file CastorCalibrationQIEData.h.
Referenced by addCoder(), sort(), and sorted().