Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:11

0001 #ifndef CALIBFORMATS_HCALOBJECTS_HCALCALIBRATIONWIDTHSSET_H
0002 #define CALIBFORMATS_HCALOBJECTS_HCALCALIBRATIONWIDTHSSET_H 1
0003 
0004 #include "CalibFormats/HcalObjects/interface/HcalCalibrationWidths.h"
0005 #include "CondFormats/HcalObjects/interface/HcalDetIdRelationship.h"
0006 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0007 #include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
0008 #include <vector>
0009 #include <unordered_map>
0010 #include <cstdint>
0011 
0012 /** \class HcalCalibrationWidthsSet
0013   *  
0014   * \author R.Ofierzynski
0015   */
0016 class HcalCalibrationWidthsSet {
0017 public:
0018   HcalCalibrationWidthsSet();
0019   const HcalCalibrationWidths& getCalibrationWidths(const DetId id) const;
0020   void setCalibrationWidths(const DetId id, const HcalCalibrationWidths& ca);
0021   void clear();
0022   std::vector<DetId> getAllChannels() const;
0023 
0024 private:
0025   struct CalibWidthSetObject {
0026     CalibWidthSetObject(const DetId& aid) { id = hcalTransformedId(aid); }
0027     DetId id;
0028     HcalCalibrationWidths calib;
0029     bool operator<(const CalibWidthSetObject& cso) const { return id < cso.id; }
0030     bool operator==(const CalibWidthSetObject& cso) const { return id == cso.id; }
0031   };
0032   typedef CalibWidthSetObject Item;
0033   HcalCalibrationWidths dummy;
0034   std::unordered_map<uint32_t, CalibWidthSetObject> mItems;
0035 };
0036 
0037 #endif