File indexing completed on 2024-09-07 04:35:40
0001 #ifndef SiPixelVCal_h
0002 #define SiPixelVCal_h
0003 #include <cstdint>
0004 #include <iostream>
0005 #include <map>
0006 #include <vector>
0007 #include "CondFormats/Serialization/interface/Serializable.h"
0008
0009 class SiPixelVCal {
0010 public:
0011 SiPixelVCal() {}
0012 ~SiPixelVCal() {}
0013
0014 using mapToDetId = std::map<uint32_t, float>;
0015
0016 struct VCal {
0017 float slope = 47.;
0018 float offset = -60.;
0019 COND_SERIALIZABLE;
0020 };
0021
0022 inline void putSlopeAndOffset(std::map<unsigned int, VCal>& vcal) { m_vcal = vcal; }
0023 inline const std::map<unsigned int, VCal>& getSlopeAndOffset() const { return m_vcal; }
0024 bool putSlopeAndOffset(const uint32_t&, float&, float&);
0025 VCal getSlopeAndOffset(const uint32_t&) const;
0026 float getSlope(const uint32_t&) const;
0027 float getOffset(const uint32_t&) const;
0028 mapToDetId getAllSlopes() const;
0029 mapToDetId getAllOffsets() const;
0030
0031
0032 private:
0033
0034
0035
0036
0037
0038
0039 std::map<unsigned int, VCal> m_vcal;
0040
0041 COND_SERIALIZABLE;
0042 };
0043
0044 #endif