CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1MuDTTrackAssembler.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
20 //
21 //--------------------------------------------------
22 #ifndef L1MUDT_TRACK_ASSEMBLER_H
23 #define L1MUDT_TRACK_ASSEMBLER_H
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 
29 #include <bitset>
30 
31 //----------------------
32 // Base Class Headers --
33 //----------------------
34 
35 //------------------------------------
36 // Collaborating Class Declarations --
37 //------------------------------------
38 
42 
43 // ---------------------
44 // -- Class Interface --
45 // ---------------------
46 
48 public:
51 
54 
56  void run();
57 
59  void reset();
60 
62  void print() const;
63 
65  inline TrackClass trackClass(int id) const { return m_theTCs[id]; }
66 
68  inline const std::bitset<4>& trackBitMap(int id) const { return m_theBitMaps[id]; }
69 
71  inline bool isEmpty(int id) const { return (m_theTCs[id] == UNDEF); }
72 
74  inline int address(int id, int stat) const { return m_theAddresses[id].station(stat); }
75 
77  inline L1MuDTAddressArray address(int id) const { return m_theAddresses[id]; }
78 
79 private:
81  void runEncoderSubUnit1(unsigned& global, unsigned& group, unsigned& priority);
82 
84  void runEncoderSubUnit2(unsigned& global, unsigned& group, unsigned& priority);
85 
87  void runAddressAssignment1(int global, int group);
88 
90  void runAddressAssignment2(int global, int group);
91 
93  static unsigned int priorityEncoder12(const std::bitset<12>& input);
94 
96  static unsigned int priorityEncoder4(const std::bitset<4>& input);
97 
99  static unsigned int priorityEncoder22(const std::bitset<22>& input);
100 
102  static unsigned int priorityEncoder21(const std::bitset<21>& input);
103 
105  static unsigned int addressEncoder12(const std::bitset<12>& input);
106 
108  static unsigned int addressEncoder12s(const std::bitset<12>& input);
109 
111  static unsigned long subBitset68(const std::bitset<68>& input, int pos, int length);
112 
114  static unsigned long subBitset56(const std::bitset<56>& input, int pos, int length);
115 
117  static std::bitset<56> getCancelationTable(unsigned int);
118 
119 private:
121 
122  std::bitset<68> m_thePriorityTable1;
123  std::bitset<56> m_thePriorityTable2;
124  unsigned int m_theLastAddress[68];
125  unsigned int m_theLastAddressI[12];
126 
127  TrackClass m_theTCs[2]; // Track Classes of the 2 candidates
128  std::bitset<4> m_theBitMaps[2]; // bitmaps of Track Class
129  L1MuDTAddressArray m_theAddresses[2]; // relative addresses of the 2 candidates
130 };
131 
132 #endif
static unsigned int addressEncoder12(const std::bitset< 12 > &input)
12 bit address encoder
uint16_t *__restrict__ id
static unsigned int addressEncoder12s(const std::bitset< 12 > &input)
special 12 bit address encoder
void runAddressAssignment1(int global, int group)
run the first Address Assignment Sub-Unit
void print() const
print result of Track Assembler
L1MuDTAddressArray m_theAddresses[2]
static unsigned int priorityEncoder12(const std::bitset< 12 > &input)
12 bit priority encoder
L1MuDTAddressArray address(int id) const
get address-array of selected track candidate
unsigned int m_theLastAddress[68]
static std::string const input
Definition: EdmProvDump.cc:47
static unsigned int priorityEncoder22(const std::bitset< 22 > &input)
22 bit priority encoder
L1MuDTTrackAssembler(const L1MuDTSectorProcessor &)
constructor
const L1MuDTSectorProcessor & m_sp
void runEncoderSubUnit2(unsigned &global, unsigned &group, unsigned &priority)
run the second Priority Encoder Sub-Unit
void run()
run Track Assembler
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
void reset()
reset Track Assembler
~L1MuDTTrackAssembler()
destructor
std::bitset< 4 > m_theBitMaps[2]
static std::bitset< 56 > getCancelationTable(unsigned int)
cancel Out Table
static unsigned int priorityEncoder21(const std::bitset< 21 > &input)
21 bit priority encoder
tuple group
Definition: watchdog.py:82
std::bitset< 68 > m_thePriorityTable1
unsigned int m_theLastAddressI[12]
static unsigned int priorityEncoder4(const std::bitset< 4 > &input)
4 bit priority encoder
void runAddressAssignment2(int global, int group)
run the second Address Assignment Sub-Unit
static unsigned long subBitset56(const std::bitset< 56 > &input, int pos, int length)
get sub-bitmap of a 56-bit word
void runEncoderSubUnit1(unsigned &global, unsigned &group, unsigned &priority)
run the first Priority Encoder Sub-Unit
bool isEmpty(int id) const
is it a valid Track Class?
std::bitset< 56 > m_thePriorityTable2
TrackClass trackClass(int id) const
return Track Class of found track
static unsigned long subBitset68(const std::bitset< 68 > &input, int pos, int length)
get sub-bitmap of a 68-bit word
int address(int id, int stat) const
get address of a single station of selected track candidate
unsigned short station(int stat) const
get address of a given station [1-4]