#include <ITkPixEncoder.h>
|
| | ITkPixEncoder (const bool enableChipID=true, const unsigned nCol=400, const unsigned nRow=384, const unsigned nColInCCol=8, const unsigned nRowInQRow=2, const unsigned nEventsPerStream=16, const bool plainHitMap=false, const bool dropToT=false) |
| std::vector< uint32_t > & | getWords () |
| void | addBits64 (const uint64_t value, const uint8_t length) const |
| void | setHitMap (const HitMap &hitMap) const |
| void | setEventsPerStream (const unsigned nEventsPerStream=16) |
| void | setChipID (const uint8_t &chipID) |
| void | clear () const |
Definition at line 23 of file ITkPixEncoder.h.
◆ HitMap
◆ ITkPixEncoder()
| ITkPixEncoder::ITkPixEncoder |
( |
const bool | enableChipID = true, |
|
|
const unsigned | nCol = 400, |
|
|
const unsigned | nRow = 384, |
|
|
const unsigned | nColInCCol = 8, |
|
|
const unsigned | nRowInQRow = 2, |
|
|
const unsigned | nEventsPerStream = 16, |
|
|
const bool | plainHitMap = false, |
|
|
const bool | dropToT = false ) |
◆ addBits64()
| void ITkPixEncoder::addBits64 |
( |
const uint64_t | value, |
|
|
const uint8_t | length ) const |
Definition at line 28 of file ITkPixEncoder.cxx.
28 {
29
30
31
32
33
34
35
36
37
39
40
41
42
45 return;
46 }
47
48
49
50 else {
51
52
54
55
56 m_currBlock |= ((
value >> (
length - remainingBits)));
57
58
59
61
62
64
65
66
67
68
69 addBits64((value & (0xFFFFFFFFFFFFFFFF >> (64 - leftoverBits))), leftoverBits);
70
71 }
72}
void addBits64(const uint64_t value, const uint8_t length) const
◆ clear()
| void ITkPixEncoder::clear |
( |
| ) |
const |
◆ encodeEvent()
| void ITkPixEncoder::encodeEvent |
( |
| ) |
const |
|
protected |
Definition at line 169 of file ITkPixEncoder.cxx.
169 {
170
171
172
173
174
176
177 for (
unsigned CCol = 0; CCol <
m_nCCol; CCol++){
178
179 if (m_lastQRow[CCol] == 0) continue;
180
182
183 int previousQRow = -666;
184 for (
unsigned QRow = 0; QRow <
m_nQRow; QRow++){
185
186 if (!m_hitQCores[CCol][QRow]) continue;
187
188
190
191
192 if (QRow == (
uint)previousQRow + 1){
194 }
195 else {
198 };
199
200
202
203
204 previousQRow = QRow;
205 }
206 }
207}
void encodeQCore(const unsigned nCCol, const unsigned nQRow) const
◆ encodeQCore()
| void ITkPixEncoder::encodeQCore |
( |
const unsigned | nCCol, |
|
|
const unsigned | nQRow ) const |
|
protected |
Definition at line 91 of file ITkPixEncoder.cxx.
91 {
92
93
94
95
96
99
100
101
103 std::vector<uint16_t> tots;
104 tots.reserve(16);
105 int pix = 0;
107 for (
unsigned pixCol = col; pixCol < col +
m_nColInCCol; pixCol++){
108 if (m_hitMap(pixCol, pixRow)){
109 lutIndex |= 0x1 << pix;
110 tots.push_back(m_hitMap(pixCol, pixRow) - 1);
111 }
112 pix++;
113 }
114 }
115
116
117
118
119
121
122
124
125
126 for (auto& tot : tots){
128 }
129}
constexpr std::array< uint32_t, LookUpTableSize > ITkPixV2QCoreEncodingLUT_Length
constexpr std::array< uint32_t, LookUpTableSize > ITkPixV2QCoreEncodingLUT_Tree
row
Appending html table to final .html summary file.
◆ getWords()
| std::vector< uint32_t > & ITkPixEncoder::getWords |
( |
| ) |
|
|
inline |
◆ hitInQCore()
| bool ITkPixEncoder::hitInQCore |
( |
const unsigned | CCol, |
|
|
const unsigned | QRow ) const |
|
protected |
Definition at line 131 of file ITkPixEncoder.cxx.
131 {
132
133
136
138 for (
unsigned pixCol = col; pixCol < col +
m_nColInCCol; pixCol++){
139 if (m_hitMap(pixCol, pixRow)) return true;
140 }
141 }
142
143 return false;
144}
◆ intTag()
| void ITkPixEncoder::intTag |
( |
const uint16_t | nEvt | ) |
const |
|
protected |
◆ pushWords32()
| void ITkPixEncoder::pushWords32 |
( |
| ) |
const |
|
protected |
Definition at line 74 of file ITkPixEncoder.cxx.
74 {
75
76
77
78
79
81 m_currBlock |= ((0x0ULL |
m_chipID) << 61);
82 }
84 uint32_t word2 = m_currBlock & 0xFFFFFFFF;
85 m_words.push_back(word1);
86 m_words.push_back(word2);
87 m_currBlock = 0x0ULL;
88 m_currBit = 0;
89}
◆ scanHitMap()
| void ITkPixEncoder::scanHitMap |
( |
| ) |
const |
|
protected |
Definition at line 146 of file ITkPixEncoder.cxx.
146 {
147
148
149
150
151 m_hitQCores = std::vector<std::vector<bool>>(
m_nCCol, std::vector<bool>(
m_nQRow,
false));
152 m_lastQRow = std::vector<unsigned> (
m_nCCol, 0);
153
154 for (
unsigned CCol = 0; CCol <
m_nCCol; CCol++){
155 for (
unsigned QRow = 0; QRow <
m_nQRow; QRow++){
156
157 m_hitQCores[CCol][QRow] =
hitInQCore(CCol, QRow);
158
159
160
161
162
163 if (m_hitQCores[CCol][QRow]) m_lastQRow[CCol] = QRow + 1;
164 }
165 }
166
167}
bool hitInQCore(const unsigned CCol, const unsigned QRow) const
◆ setChipID()
| void ITkPixEncoder::setChipID |
( |
const uint8_t & | chipID | ) |
|
◆ setEventsPerStream()
| void ITkPixEncoder::setEventsPerStream |
( |
const unsigned | nEventsPerStream = 16 | ) |
|
|
inline |
◆ setHitMap()
| void ITkPixEncoder::setHitMap |
( |
const HitMap & | hitMap | ) |
const |
|
inline |
◆ streamTag()
| void ITkPixEncoder::streamTag |
( |
const uint8_t | nStream | ) |
const |
|
protected |
◆ ATLAS_THREAD_SAFE [1/10]
| std::vector<uint32_t> m_words ITkPixEncoder::ATLAS_THREAD_SAFE |
|
mutableprotected |
◆ ATLAS_THREAD_SAFE [2/10]
| unsigned m_currCCol ITkPixEncoder::ATLAS_THREAD_SAFE {} |
|
mutableprotected |
Definition at line 67 of file ITkPixEncoder.h.
std::vector< uint32_t > m_words ATLAS_THREAD_SAFE
◆ ATLAS_THREAD_SAFE [3/10]
| unsigned m_currCCol m_currQRow ITkPixEncoder::ATLAS_THREAD_SAFE {} |
|
protected |
◆ ATLAS_THREAD_SAFE [4/10]
| unsigned m_currCCol m_currQRow m_currEvent ITkPixEncoder::ATLAS_THREAD_SAFE {} |
|
protected |
◆ ATLAS_THREAD_SAFE [5/10]
| uint8_t m_currStream ITkPixEncoder::ATLAS_THREAD_SAFE {} |
|
mutableprotected |
◆ ATLAS_THREAD_SAFE [6/10]
| uint64_t m_currBlock ITkPixEncoder::ATLAS_THREAD_SAFE {} |
|
mutableprotected |
◆ ATLAS_THREAD_SAFE [7/10]
| uint8_t m_currBit ITkPixEncoder::ATLAS_THREAD_SAFE {} |
|
mutableprotected |
◆ ATLAS_THREAD_SAFE [8/10]
| std::vector<std::vector<bool> > m_hitQCores ITkPixEncoder::ATLAS_THREAD_SAFE |
|
mutableprotected |
◆ ATLAS_THREAD_SAFE [9/10]
| std::vector<unsigned> m_lastQRow ITkPixEncoder::ATLAS_THREAD_SAFE |
|
mutableprotected |
◆ ATLAS_THREAD_SAFE [10/10]
| HitMap m_hitMap ITkPixEncoder::ATLAS_THREAD_SAFE |
|
mutableprotected |
◆ m_bitsPerWord
| size_t ITkPixEncoder::m_bitsPerWord |
|
protected |
◆ m_chipID
| uint8_t ITkPixEncoder::m_chipID = 0b00 |
|
protected |
◆ m_dropToT
| bool ITkPixEncoder::m_dropToT {} |
|
protected |
◆ m_enableChipID
| bool ITkPixEncoder::m_enableChipID {} |
|
protected |
◆ m_mutex
| std::mutex ITkPixEncoder::m_mutex |
|
mutableprotected |
◆ m_nCCol
| unsigned ITkPixEncoder::m_nCCol {50} |
|
protected |
◆ m_nCol
| unsigned ITkPixEncoder::m_nCol {400} |
|
protected |
◆ m_nColInCCol
| unsigned ITkPixEncoder::m_nColInCCol {8} |
|
protected |
◆ m_nEventsPerStream
| unsigned ITkPixEncoder::m_nEventsPerStream |
|
protected |
◆ m_nQRow
| unsigned ITkPixEncoder::m_nQRow {192} |
|
protected |
◆ m_nRow
| unsigned ITkPixEncoder::m_nRow {384} |
|
protected |
◆ m_nRowInQRow
| unsigned ITkPixEncoder::m_nRowInQRow {2} |
|
protected |
◆ m_plainHitMap
| bool ITkPixEncoder::m_plainHitMap {} |
|
protected |
The documentation for this class was generated from the following files: