CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/CalibFormats/CastorObjects/interface/CastorCalibrationsSet.h

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