97 {
98 msg(MSG::DEBUG) <<
" ALFA_RoDDecoder_charge::fillCollection" <<
endmsg;
99
100ALFA_RawDataCollection_charge* collection = nullptr;
101
103
104 std::vector<uint32_t> VData;
105
106 VData.clear();
107
108
112
115
118
120
121
123
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
160
161 robFrag->rod_data(vint);
162
163
165
166
167 uint32_t ROD_source_ID = robFrag->rod_source_id();
168
169
170 uint32_t ROD_LVL1_ID = robFrag->rod_lvl1_id();
171
172msg(MSG::DEBUG) <<
"============================" << std::endl;
173msg(MSG::DEBUG) <<
"Frag Size : " << robFrag->rod_fragment_size_word() <<
endmsg;
174msg(MSG::DEBUG) <<
"Header Size: " << robFrag->rod_header_size_word() <<
endmsg;
175msg(MSG::DEBUG) <<
"Source ID : " << ROD_source_ID <<
endmsg;
176msg(MSG::DEBUG) <<
"Run num : " << robFrag->rod_run_no() <<
endmsg;
177msg(MSG::DEBUG) <<
"Version : " << robFrag->rod_version() <<
endmsg;
178msg(MSG::DEBUG) <<
" ROD_LVL1_ID " <<ROD_LVL1_ID<<
endmsg;
179msg(MSG::DEBUG) <<
"============================" << std::endl;
180
181
182uint32_t evt_Id = ((robFrag->rod_lvl1_id()) & 0xFF000000) >> 24;
183uint32_t lvl1_Id = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF) ;
184
185
186msg(MSG::DEBUG) <<
" evt_Id : " << evt_Id <<
" lvl1_Id : " << lvl1_Id <<
endmsg;
187
188
189
190
191
192
193
194
195
196
197
198
199
203
205
206 if(EcrId!=evt_Id) {
209 }
210
211 if (n==0) Event_num = LvL1;
212 else Event_num = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF) + Event_num;
213
214 LvL1 = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF)+1 ;
215 EcrId = ((robFrag->rod_lvl1_id()) & 0xFF000000) >> 24;
216
217 if(l==1) Event_num_max=Event_num;
218
219 Event_num = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF)+1 + Event_num_max;
220
221 Count_evt++;
222
223
224 msg(MSG::INFO) <<
" Event_num " << Event_num <<
" Count_evt " << Count_evt <<
endmsg;
225
226
227
228
230 {
231 msg(MSG::DEBUG) <<
" Found the beginning of buffer "<<
endmsg;
232
234 } else {
235 msg(MSG::DEBUG) <<
" Beginning of block not found BOB "<<
endmsg;
236 }
237
238
240
241
242
244 {
245 wordPos += 1;
246 if (wordPos >= size)
247 {
248 msg(MSG::ERROR)<<
" Error: data corrupted" <<
endmsg;
249 return StatusCode::FAILURE;
250 }
252 }
253
254
256 {
257 msg(MSG::DEBUG) <<
" Found the beginning of Link BOL"<<
endmsg;
259
260 }
261
263 {
264 msg(MSG::DEBUG)<<
" Error: collection not found " <<
endmsg;
265 return StatusCode::FAILURE;
266 }
267
268
269 wordPos += 1;
270 if (wordPos >= size) {
271 msg(MSG::ERROR)<<
" Error: data corrupted"<<
endmsg;
272 return StatusCode::FAILURE;
273 }
274
275
278
280
282
283 msg(MSG::DEBUG)<<
" Decoding data from Slot Id number : " << slotIdNum <<
endmsg;
284
285
286
287
289 {
290 wordPos += 1;
291 if (wordPos >= size)
292 {
293 msg(MSG::DEBUG)<<
" Error: data corrupted" <<
endmsg;
294 return StatusCode::FAILURE;
295 }
296
298
302
303
305
306
307
308
309
311
312
313
314
315 CountPMF0++;
316
318
319 for (
unsigned int i=0;
i<8;
i++){
320
321 charge_hit = (
char) tmpCharge & 0x00000001;
322 tmpCharge>>=1;
323
324 if(charge_hit==1){
326
327 if(CountPMF0==1) collection =
getCollection(MBIdNum,rdoCont );
329
330 if(CountPMF0==1)
msg(MSG::DEBUG)<<
" DECODER : MBIdNum " << MBIdNum <<
endmsg;
331
332
333 }
334
335
336 }
337
338 }
339
340
341
342
344
345
346
350
351 auto rawData_charge = std::make_unique< ALFA_RawData_charge >(PMFIdNum);
352
353 rawData_charge->SetChannelNum_PMF(ChannelIdNum);
354 rawData_charge->SetPMFId_PMF(PMFIdNum);
355 rawData_charge->SetMBId_PMF(MBIdNum);
356 rawData_charge->SetChargeChan_PMF(ChargeNum);
357
358
359 msg(MSG::DEBUG)<<
" PMFIdNum = " << PMFIdNum <<
" ChannelIdNum = " << ChannelIdNum <<
" chargeNum = " << ChargeNum <<
endmsg;
360
361 std::vector<uint16_t> ChargeHitId;
362 ChargeHitId.push_back(ChargeNum);
363 rawData_charge->SetChargeChanVect_PMF(ChargeHitId);
364
365 rawData_charge->addData(vint[wordPos]);
366 rawData_charge->PushBack_PMF(ChargeNum);
367
368 if(collection) collection->
push_back(rawData_charge.release());
369
370
371 }
372
373
374
375
376
377
378
379
380
381
382 }
383
384
385 }
386
387
390 }
391
392 wordPos += 1;
393 if (wordPos >= size) {
394 msg(MSG::DEBUG)<<
" Error: data corrupted" <<
endmsg;
395 return StatusCode::FAILURE;
396 }
397
398
401
402 }
403
404 wordPos += 1;
405 if (wordPos >= size)
406 {
407 msg(MSG::DEBUG)<<
" Error: data corrupted" <<
endmsg;
408 return StatusCode::FAILURE;
409 }
410
412
413
414
415
416const eformat::FullEventFragment<const uint32_t*> *
event =
m_robDataProvider->getEvent(Gaudi::Hive::currentContext());
417
418msg(MSG::DEBUG) <<
"========FULL Event=============" << std::endl;
419msg(MSG::DEBUG) <<
"Event time (sec): " << (
uint32_t)
event->bc_time_seconds() << std::endl;
420msg(MSG::DEBUG) <<
"Event time (ns): " << (
uint32_t)
event->bc_time_nanoseconds() << std::endl;
421msg(MSG::DEBUG) <<
"Global ID: " << (
uint32_t)
event->global_id() << std::endl;
424msg(MSG::DEBUG) <<
"Lumi Block: " << (
uint32_t)
event->lumi_block() << std::endl;
427msg(MSG::DEBUG) <<
"Level1 trig type: " << (
uint32_t)
event->lvl1_trigger_type() << std::endl;
428msg(MSG::DEBUG) <<
"Level1 Nwords: " << (
uint32_t)
event->nlvl1_trigger_info() << std::endl;
429msg(MSG::DEBUG) <<
"============================" << std::endl;
430
431uint32_t Time_StampID =
event->bc_time_seconds();
433
436
437
438
439
440
441
442 }
443
444
446 {
447 msg(MSG::DEBUG) <<
" Found the end of block EOB ---------------------- "<<
endmsg;
448 }
449
450 wordPos += 1;
452
453
454 return StatusCode::SUCCESS;
455}
ALFA_RawDataCollection_charge * getCollection(unsigned int MotherBoardId, ALFA_RawDataContainer_charge *cont)
ALFA_RawDataCollectionReadOut * m_ALFA_RawDataCollectionReadOut
ALFA_RawDataContainerReadOut * m_ALFA_RawDataContainerReadOut
ALFA_RawDataReadOut_charge * m_ALFA_RawDataReadOut_charge
void SetBCId_POT(uint32_t BCId)
void SetMBId_POT(uint16_t MB_number)
void SetTimeStamp_POT(uint32_t TimeStamp)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const DataType * PointerType
l
Printing final latex table to .tex output file.