CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/CalibFormats/HcalObjects/interface/HcalCalibrationsSet.h

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