Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:23:00

0001 #ifndef __L1Trigger_L1THGCal_HGCalVFECompressionImpl_h__
0002 #define __L1Trigger_L1THGCal_HGCalVFECompressionImpl_h__
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 
0006 #include <unordered_map>
0007 #include <array>
0008 
0009 class HGCalVFECompressionImpl {
0010 public:
0011   HGCalVFECompressionImpl(const edm::ParameterSet& conf);
0012 
0013   void compress(const std::unordered_map<uint32_t, uint32_t>&, std::unordered_map<uint32_t, std::array<uint32_t, 2> >&);
0014   void compressSingle(const uint32_t value, uint32_t& compressedCode, uint32_t& compressedValue) const;
0015 
0016 private:
0017   uint32_t exponentBits_;
0018   uint32_t mantissaBits_;
0019   uint32_t truncationBits_;
0020   bool rounding_;
0021   uint32_t saturationCode_;
0022   uint32_t saturationValue_;
0023 };
0024 
0025 #endif