Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CALIBFORMATS_HCALOBJECTS_HCALCALIBRATIONWIDTHSSET_H
0002 #define CALIBFORMATS_HCALOBJECTS_HCALCALIBRATIONWIDTHSSET_H 1
0003 
0004 #include "CalibFormats/CastorObjects/interface/CastorCalibrationWidths.h"
0005 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0006 #include <vector>
0007 
0008 /** \class CastorCalibrationWidthsSet
0009   *  
0010   * \author R.Ofierzynski
0011   * Adapted for CASTOR by L. Mundim
0012   */
0013 class CastorCalibrationWidthsSet {
0014 public:
0015   CastorCalibrationWidthsSet();
0016   const CastorCalibrationWidths& getCalibrationWidths(const DetId id) const;
0017   void setCalibrationWidths(const DetId id, const CastorCalibrationWidths& ca);
0018   void sort();
0019   void clear();
0020 
0021 private:
0022   struct CalibWidthSetObject {
0023     CalibWidthSetObject(const DetId& aid) : id(aid) {}
0024     DetId id;
0025     CastorCalibrationWidths calib;
0026     bool operator<(const CalibWidthSetObject& cso) const { return id < cso.id; }
0027     bool operator==(const CalibWidthSetObject& cso) const { return id == cso.id; }
0028   };
0029   typedef CalibWidthSetObject Item;
0030   CastorCalibrationWidths dummy;
0031   std::vector<CalibWidthSetObject> mItems;
0032   bool sorted_;
0033 };
0034 
0035 #endif