CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTLFMergeRankCombineLUT.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
10 // $Date: 2007/04/02 15:45:38 $
11 // $Revision: 1.3 $
12 //
13 // Author :
14 // H. Sakulin HEPHY Vienna
15 //
16 // Migrated to CMSSW:
17 // I. Mikulec
18 //
19 //--------------------------------------------------
20 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTLFMergeRankCombineLUT_h
21 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFMergeRankCombineLUT_h
22 
23 //---------------
24 // C++ Headers --
25 //---------------
26 
27 
28 //----------------------
29 // Base Class Headers --
30 //----------------------
32 
33 //------------------------------------
34 // Collaborating Class Declarations --
35 //------------------------------------
36 
37 // ---------------------
38 // -- Class Interface --
39 // ---------------------
40 
41 
43 
44  public:
45  enum {DT, BRPC, CSC, FRPC};
46 
48  L1MuGMTLFMergeRankCombineLUT() : L1MuGMTLUT("LFMergeRankCombine",
49  "DT BRPC CSC FRPC",
50  "rank_etaq(7) rank_ptq(2) rank_etaphi(1)",
51  "merge_rank(8)", 9, false) {
53  } ;
54 
57 
59  unsigned SpecificLookup_merge_rank (int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const {
60  std::vector<unsigned> addr(3);
61  addr[0] = rank_etaq;
62  addr[1] = rank_ptq;
63  addr[2] = rank_etaphi;
64  return Lookup(idx, addr) [0];
65  };
66 
68  unsigned SpecificLookup (int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const {
69  std::vector<unsigned> addr(3);
70  addr[0] = rank_etaq;
71  addr[1] = rank_ptq;
72  addr[2] = rank_etaphi;
73  return LookupPacked(idx, addr);
74  };
75 
76 
77 
79 
80  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
81  std::vector<unsigned> addr = u2vec(address, m_Inputs);
82  return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2]);
83 
84  };
85 
86  private:
88  void InitParameters();
89 
91  unsigned TheLookupFunction (int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const;
92 
94 };
95 #endif
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
char * address
Definition: mlp_lapack.h:14
std::vector< unsigned > Lookup(int idx, const std::vector< unsigned > &address) const
additional lookup function (std::vector -&gt; vector)
Definition: L1MuGMTLUT.h:117
unsigned TheLookupFunction(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
The lookup function - here the functionality of the LUT is implemented.
unsigned SpecificLookup_merge_rank(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
specific lookup function for merge_rank
virtual ~L1MuGMTLFMergeRankCombineLUT()
destructor
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:203
L1MuGMTLFMergeRankCombineLUT()
constuctor using function-lookup
unsigned SpecificLookup(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
specific lookup function for entire output field
std::vector< unsigned > u2vec(unsigned value, const std::vector< port > &widths) const
generate composite address or value from compact unsigned
Definition: L1MuGMTLUT.h:241
virtual unsigned LookupFunctionPacked(int idx, unsigned address) const
access to lookup function with packed input and output
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:262
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...