Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:19

0001 #ifndef CALIBFORMATS_CASTOROBJECTS_CASTORCALIBRATIONSSET_H
0002 #define CALIBFORMATS_CASTOROBJECTS_CASTORCALIBRATIONSSET_H 1
0003 
0004 #include "CalibFormats/CastorObjects/interface/CastorCalibrations.h"
0005 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0006 #include <vector>
0007 
0008 class CastorCalibrationsSet {
0009 public:
0010   CastorCalibrationsSet();
0011   const CastorCalibrations& getCalibrations(const DetId id) const;
0012   void setCalibrations(const DetId id, const CastorCalibrations& ca);
0013   void sort();
0014   void clear();
0015 
0016 private:
0017   struct CalibSetObject {
0018     CalibSetObject(const DetId& aid) : id(aid) {}
0019     DetId id;
0020     CastorCalibrations calib;
0021     bool operator<(const CalibSetObject& cso) const { return id < cso.id; }
0022     bool operator==(const CalibSetObject& cso) const { return id == cso.id; }
0023   };
0024   typedef CalibSetObject Item;
0025   CastorCalibrations dummy;
0026   std::vector<CalibSetObject> mItems;
0027   bool sorted_;
0028 };
0029 
0030 #endif