Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:25

0001 #ifndef CondFormats_PPSObjects_CTPPSPixelGainCalibrations_h
0002 #define CondFormats_PPSObjects_CTPPSPixelGainCalibrations_h
0003 
0004 #include "CondFormats/PPSObjects/interface/CTPPSPixelGainCalibration.h"
0005 #include <map>
0006 #include <vector>
0007 
0008 class CTPPSPixelGainCalibrations {
0009 public:
0010   typedef std::map<uint32_t, CTPPSPixelGainCalibration> CalibMap;
0011 
0012   CTPPSPixelGainCalibrations() {}
0013   virtual ~CTPPSPixelGainCalibrations() {}
0014 
0015   void setGainCalibration(const uint32_t& DetId, const CTPPSPixelGainCalibration& PixGains);
0016   void setGainCalibration(const uint32_t& DetId, const std::vector<float>& peds, const std::vector<float>& gains);
0017   void setGainCalibrations(const CalibMap& PixGainsCalibs);
0018   void setGainCalibrations(const std::vector<uint32_t>& detidlist,
0019                            const std::vector<std::vector<float>>& peds,
0020                            const std::vector<std::vector<float>>& gains);
0021 
0022   const CalibMap& getCalibMap() const { return m_calibrations; }
0023 
0024   const CTPPSPixelGainCalibration& getGainCalibration(const uint32_t& detid) const;
0025 
0026   int size() const { return m_calibrations.size(); }
0027 
0028 private:
0029   CalibMap m_calibrations;
0030 
0031   COND_SERIALIZABLE;
0032 };
0033 
0034 #endif