CMS 3D CMS Logo

L1MuGMTLFDisableHotLUT.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
10 //
11 // Author :
12 // H. Sakulin HEPHY Vienna
13 //
14 // Migrated to CMSSW:
15 // I. Mikulec
16 //
17 //--------------------------------------------------
18 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTLFDisableHotLUT_h
19 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFDisableHotLUT_h
20 
21 //---------------
22 // C++ Headers --
23 //---------------
24 
25 //----------------------
26 // Base Class Headers --
27 //----------------------
29 
30 //------------------------------------
31 // Collaborating Class Declarations --
32 //------------------------------------
33 
34 // ---------------------
35 // -- Class Interface --
36 // ---------------------
37 
39 public:
40  enum { DT, CSC };
41 
43  L1MuGMTLFDisableHotLUT() : L1MuGMTLUT("LFDisableHot", "DT CSC", "eta(6) phi(8)", "disable_hot(1)", 10, false) {
45  };
46 
49 
51  unsigned SpecificLookup_disable_hot(int idx, unsigned eta, unsigned phi) const {
52  std::vector<unsigned> addr(2);
53  addr[0] = eta;
54  addr[1] = phi;
55  return Lookup(idx, addr)[0];
56  };
57 
59  unsigned SpecificLookup(int idx, unsigned eta, unsigned phi) const {
60  std::vector<unsigned> addr(2);
61  addr[0] = eta;
62  addr[1] = phi;
63  return LookupPacked(idx, addr);
64  };
65 
67 
68  unsigned LookupFunctionPacked(int idx, unsigned address) const override {
69  std::vector<unsigned> addr = u2vec(address, m_Inputs);
70  return TheLookupFunction(idx, addr[0], addr[1]);
71  };
72 
73 private:
75  void InitParameters();
76 
78  unsigned TheLookupFunction(int idx, unsigned eta, unsigned phi) const;
79 };
80 #endif
unsigned SpecificLookup_disable_hot(int idx, unsigned eta, unsigned phi) const
specific lookup function for disable_hot
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:272
L1MuGMTLFDisableHotLUT()
constuctor using function-lookup
~L1MuGMTLFDisableHotLUT() override
destructor
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
std::vector< unsigned > u2vec(unsigned value, const std::vector< port > &widths) const
generate composite address or value from compact unsigned
Definition: L1MuGMTLUT.h:251
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -> vector)
Definition: L1MuGMTLUT.h:121
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:214
unsigned LookupFunctionPacked(int idx, unsigned address) const override
access to lookup function with packed input and output
unsigned SpecificLookup(int idx, unsigned eta, unsigned phi) const
specific lookup function for entire output field
unsigned TheLookupFunction(int idx, unsigned eta, unsigned phi) const
The lookup function - here the functionality of the LUT is implemented.