00001 #ifndef CALIBFORMATS_HCALOBJECTS_HCALCALIBRATIONWIDTHSSET_H 00002 #define CALIBFORMATS_HCALOBJECTS_HCALCALIBRATIONWIDTHSSET_H 1 00003 00004 #include "CalibFormats/CastorObjects/interface/CastorCalibrationWidths.h" 00005 #include "DataFormats/HcalDetId/interface/HcalDetId.h" 00006 #include <vector> 00007 00015 class CastorCalibrationWidthsSet { 00016 public: 00017 CastorCalibrationWidthsSet(); 00018 const CastorCalibrationWidths& getCalibrationWidths(const DetId id) const; 00019 void setCalibrationWidths(const DetId id, const CastorCalibrationWidths& ca); 00020 void sort(); 00021 void clear(); 00022 private: 00023 struct CalibWidthSetObject { 00024 CalibWidthSetObject(const DetId& aid) : id(aid) { } 00025 DetId id; 00026 CastorCalibrationWidths calib; 00027 bool operator<(const CalibWidthSetObject& cso) const { return id < cso.id; } 00028 bool operator==(const CalibWidthSetObject& cso) const { return id == cso.id; } 00029 }; 00030 typedef CalibWidthSetObject Item; 00031 CastorCalibrationWidths dummy; 00032 std::vector<CalibWidthSetObject> mItems; 00033 bool sorted_; 00034 }; 00035 00036 #endif