125 map<int, vector<Word64> > map_data;
128 int ts[3] = {0, 0, 0};
131 vector<Word64> words;
141 for (DetDigis::const_iterator
it = detDigis.begin();
it != detDigis.end(); ++
it) {
145 for (
int is = 0; is < dataframe.
size(); ++is)
156 if (
ix == 1 &&
iy == 1)
158 else if (
ix == 0 &&
iy == 1)
160 else if (
ix == 1 &&
iy == 0)
162 else if (
ix == 0 &&
iy == 0)
168 kchip =
ix + (
iy - 1) * 20 - 1;
169 else if (
detId.zside() == 1 &&
detId.plane() == 2)
170 kchip =
ix + (
iy - 1) * 20 + 399;
171 else if (
detId.zside() == -1 &&
detId.plane() == 1)
172 kchip =
ix + (
iy - 1) * 20 + 799;
173 else if (
detId.zside() == -1 &&
detId.plane() == 2)
174 kchip =
ix + (
iy - 1) * 20 + 1199;
178 <<
detId.strip() <<
" (" << kchip <<
"," << pace <<
") " << ts[2] <<
" " << ts[1] <<
" " << ts[0] << endl;
185 map_data[kchip].push_back(
word);
188 map<int, vector<Word64> >::const_iterator kit;
189 for (kit = map_data.begin(); kit != map_data.end(); ++kit) {
191 cout <<
"KCHIP : " << kit->first << endl;
200 words.push_back(
word);
202 const vector<Word64>&
data = kit->second;
203 for (
unsigned int id = 0;
id <
data.size(); ++
id) {
206 words.push_back(
data[
id]);
210 int dataSize = (words.size() + 8) *
sizeof(
Word64);
213 vector<Word64> DCCwords;
215 word1 = (dataSize <<
sDEL);
217 DCCwords.push_back(
word);
221 DCCwords.push_back(
word);
225 DCCwords.push_back(
word);
229 DCCwords.push_back(
word);
233 DCCwords.push_back(
word);
237 DCCwords.push_back(
word);
249 for (
unsigned int i = 0;
i < DCCwords.size(); ++
i) {
251 cout <<
"DCC : " <<
print(DCCwords[
i]) << endl;
257 for (
unsigned int i = 0;
i < words.size(); ++
i) {
264 dataSize /
sizeof(
Word64),
const ESDetId & id() const
int adc() const
get the ADC sample (singed 16 bits)
const ESSample & sample(int i) const
static void set(unsigned char *trailer, uint32_t lenght, uint16_t crc, uint8_t evt_stat, uint8_t tts, bool moreTrailers=false)
Set all fields in the trailer.
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
char data[epos_bytes_allocation]
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)