Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef __l1microgmtlut_h
0002 #define __l1microgmtlut_h
0003 
0004 #include <iostream>
0005 #include <fstream>
0006 #include <sstream>
0007 #include <bitset>
0008 #include <vector>
0009 
0010 #include "CondFormats/L1TObjects/interface/LUT.h"
0011 #include "L1Trigger/L1TMuon/interface/MicroGMTConfiguration.h"
0012 
0013 namespace l1t {
0014   class MicroGMTLUT : public LUT {
0015   public:
0016     MicroGMTLUT() : m_totalInWidth(0), m_outWidth(0), m_initialized(false){};
0017     MicroGMTLUT(l1t::LUT* lut);
0018     virtual ~MicroGMTLUT(){};
0019 
0020     // should be implemented in each daughter!
0021     // This function is the minimum that should be provided
0022     virtual int lookupPacked(int input) const;
0023 
0024     // populates the m_contents map.
0025     void initialize();
0026 
0027     int checkedInput(unsigned in, unsigned maxWidth) const;
0028 
0029     // I/O functions
0030     void save(std::ofstream& output);
0031     int load(const std::string& inFileName);
0032 
0033   protected:
0034     unsigned m_totalInWidth;
0035     unsigned m_outWidth;
0036     std::vector<MicroGMTConfiguration::input_t> m_inputs;
0037     bool m_initialized;
0038   };
0039 }  // namespace l1t
0040 
0041 #endif /* defined(__l1microgmtlut_h) */