CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/CalibFormats/HcalObjects/interface/HcalCalibrationWidthsSet.h

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