CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTLFMergeRankEtaQLUT.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_L1MuGMTLFMergeRankEtaQLUT_h
21 #define L1TriggerGlobalMuonTrigger_L1MuGMTLFMergeRankEtaQLUT_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  L1MuGMTLFMergeRankEtaQLUT() : L1MuGMTLUT("LFMergeRankEtaQ",
49  "DT BRPC CSC FRPC",
50  "eta(6) q(3)",
51  "flag(1) rank_etaq(7)", 8, false) {
53  } ;
54 
57 
59  unsigned SpecificLookup_flag (int idx, unsigned eta, unsigned q) const {
60  std::vector<unsigned> addr(2);
61  addr[0] = eta;
62  addr[1] = q;
63  return Lookup(idx, addr) [0];
64  };
65 
67  unsigned SpecificLookup_rank_etaq (int idx, unsigned eta, unsigned q) const {
68  std::vector<unsigned> addr(2);
69  addr[0] = eta;
70  addr[1] = q;
71  return Lookup(idx, addr) [1];
72  };
73 
75  unsigned SpecificLookup (int idx, unsigned eta, unsigned q) const {
76  std::vector<unsigned> addr(2);
77  addr[0] = eta;
78  addr[1] = q;
79  return LookupPacked(idx, addr);
80  };
81 
82 
83 
85 
86  virtual unsigned LookupFunctionPacked (int idx, unsigned address) const {
87  std::vector<unsigned> addr = u2vec(address, m_Inputs);
88  return TheLookupFunction(idx ,addr[0] ,addr[1]);
89 
90  };
91 
92  private:
94  void InitParameters();
95 
97  unsigned TheLookupFunction (int idx, unsigned eta, unsigned q) const;
98 
100 };
101 #endif
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
char * address
Definition: mlp_lapack.h:14
L1MuGMTLFMergeRankEtaQLUT()
constuctor using function-lookup
unsigned SpecificLookup(int idx, unsigned eta, unsigned q) const
specific lookup function for entire output field
T eta() const
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 eta, unsigned q) const
The lookup function - here the functionality of the LUT is implemented.
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
std::vector< port > m_Inputs
Definition: L1MuGMTLUT.h:203
unsigned SpecificLookup_rank_etaq(int idx, unsigned eta, unsigned q) const
specific lookup function for rank_etaq
unsigned SpecificLookup_flag(int idx, unsigned eta, unsigned q) const
specific lookup function for flag
virtual unsigned LookupFunctionPacked(int idx, unsigned address) const
access to lookup function with packed input and output
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 ~L1MuGMTLFMergeRankEtaQLUT()
destructor
unsigned LookupPacked(int idx, unsigned) const
Definition: L1MuGMTLUT.h:262