ATLAS Offline Software
ALFA_Decoder.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include "eformat/Issue.h"
9 #include <algorithm>
10 
11 using xAOD::EventInfo;
12 
13 static const InterfaceID IID_IALFA_Decoder ("ALFA_Decoder", 1, 0);
14 const InterfaceID& ALFA_Decoder::interfaceID()
15 {
16  return IID_IALFA_Decoder;
17 }
18 
20 // constructor
22 
23 ALFA_Decoder::ALFA_Decoder ( const std::string& type, const std::string& name,const IInterface* parent)
25  m_robDataProvider ("ROBDataProviderSvc",name)
26  //, m_ALFA_RawDataContainerReadOut(0), m_ALFA_RawDataCollectionReadOut(0), m_ALFA_RawDataReadOut(0)
27 {
28  declareInterface<ALFA_Decoder>(this);
29 
30 }
31 
32 
33 
35 // destructor
38 {
39 }
40 
41 
43 // initialize() -
46 {
47 
48 
49  StatusCode sc;
51  msg(MSG::DEBUG) << " ALFA_RoDDecoder::initialize" << endmsg;
52  if (sc.isFailure()) return sc;
53 
54  // Get ROBDataProviderSvc
55  if (m_robDataProvider.retrieve().isFailure())
56  {
57  msg(MSG::FATAL) << "Failed to retrieve service " << m_robDataProvider << endmsg;
58  return StatusCode::FAILURE;
59  } else
60  msg(MSG::DEBUG) << "Retrieved service " << m_robDataProvider << endmsg;
61 
62 
64 
65 
66  // Initialize decoding classes
70 
71 
72  return StatusCode::SUCCESS;
73 }
74 
75 
76 
77 
78 
79 
81 // finalize() -
84 {
85 
86  msg(MSG::DEBUG) << " ALFA_RoDDecoder::FINALIZE" << endmsg;
87 
88  msg(MSG::DEBUG) << " Bytestream summary:" << m_fragment_number << " fragments found" << endmsg;
89 
90 
91  delete m_ALFA_RawDataReadOut;
94 
95  return StatusCode::SUCCESS;
96 }
97 
98 
99 
101 // fillCollection() -
104 {
105  msg(MSG::DEBUG) << " ALFA_RoDDecoder::fillCollection" << endmsg;
106 
107  ALFA_RawDataCollection* collection = nullptr;
108 
109  uint32_t wordPos = 0;
110 
111  std::vector<uint32_t> VData;
112 
113  VData.clear();
114 
115 
116  uint32_t Event_num=0;
117  uint32_t Event_num_max=0;
118  uint16_t fiber_hit;
119 
120  uint16_t tmpFiber;
121  uint16_t thisMB;
122  uint16_t tmpMB;
123  uint16_t MBIdNum=0;
124 
125  uint16_t tmpADC1=10000;
126  uint16_t tmpADC2=10000;
127  uint16_t tmpScaler=100;
128 
129  std::vector<bool> tmpLvl1Pattern;
130  std::vector<bool> tmpLvl2Pattern;
131  std::vector<bool> tmpEFPattern;
132  uint32_t wo=0;
133 
134  uint32_t EcrId=1;
135  uint32_t LvL1 =0;
136 
137  uint32_t Count_evt=0;
138 
139  int n=0;
140 
141 
142  // retrieve EventInfo
143  const EventInfo* eventInfo=nullptr;
144  StatusCode sc = evtStore()->retrieve(eventInfo);
145  if (sc.isFailure()) {
146  ATH_MSG_WARNING (" cannot retrieve EventInfo, will not set ALFA bit information ");
147  }
148 
149  // Check the ROB and ROD fragment for lenght and version consistency
150 
151  try
152  {
153  robFrag->check();
154  }
155 
156  catch (eformat::Issue &ex)
157  {
158  msg(MSG::WARNING) <<ex.what ()<< endmsg;
159  if (!eventInfo->updateErrorState(EventInfo::ForwardDet, EventInfo::Error))
160  msg(MSG::WARNING) <<"Cannot set ALFA error state"<< endmsg;
161  return StatusCode::SUCCESS; // error in fragment - we search for no collection
162  }
163 
164  // Check the ROB status word for truncation or corruption.
165 
166  uint32_t nstat = robFrag->nstatus();
167 
168  if (nstat)
169  {
170  const uint32_t *it;
171  robFrag->status (it);
172 
173 
174  if (*it)
175  {
176  msg(MSG::WARNING) << " Error in ROB status word: 0x" << endmsg;
177  if (!eventInfo->updateErrorState(EventInfo::ForwardDet, EventInfo::Error))
178  msg(MSG::WARNING) <<"Cannot set ALFA error state"<< endmsg;
179  if (!eventInfo->updateEventFlagBit(EventInfo::ForwardDet, ALFAEventBitInfo::ROB_ERROR))
180  msg(MSG::WARNING) <<"Cannot set event bit info for ALFA"<< endmsg;
181 
182  return StatusCode::SUCCESS;
183  }
184  }
185 
186  // set the data pointer type
187 
189 
190  robFrag->rod_data(vint);
191 
192  // get number of data words in the fragment
193  uint32_t size = robFrag->rod_ndata();
194 
195  // get source ID
196  uint32_t ROD_source_ID = robFrag->rod_source_id();
197 
198 
199  uint32_t ROD_LVL1_ID = robFrag->rod_lvl1_id();
200 
201  msg(MSG::DEBUG) << "============================" << std::endl;
202  msg(MSG::DEBUG) << "Frag Size : " << robFrag->rod_fragment_size_word() << endmsg;
203  msg(MSG::DEBUG) << "Header Size: " << robFrag->rod_header_size_word() << endmsg;
204  msg(MSG::DEBUG) << "Source ID : " << ROD_source_ID << endmsg;
205  msg(MSG::DEBUG) << "Run num : " << robFrag->rod_run_no() << endmsg;
206  msg(MSG::DEBUG) << "Version : " << robFrag->rod_version() << endmsg;
207  msg(MSG::DEBUG) << " ROD_LVL1_ID " << ROD_LVL1_ID << endmsg;
208  msg(MSG::DEBUG) << "============================" << std::endl;
209 
210  // msg(MSG::INFO) << "ROD Time_StampID " <<robFrag->bc_time_seconds() << endmsg;
211 
212 
213  uint32_t evt_Id = ((robFrag->rod_lvl1_id()) & 0xFF000000) >> 24;
214  uint32_t lvl1_Id = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF) ;
215 
216 
217  msg(MSG::DEBUG) <<" evt_Id : " << evt_Id << " lvl1_Id : " << lvl1_Id <<endmsg;
218 
219  /*msg(MSG::DEBUG) << " **********Decoder dumping the words******** "<< endmsg;
220 
221  if (size > 0) {
222  msg(MSG::DEBUG) << " The size of this ROD-read is "<< endmsg;
223  for (unsigned int i=0; i < size; i++)
224  msg(MSG::DEBUG) << " word " << i << " = " << MSG::hex << vint[i] << MSG::dec<< endmsg;
225  } else {
226  msg(MSG::DEBUG) << " Buffer size 0 ! "<< endmsg;
227  return StatusCode::FAILURE;
228  }*/
229 
230 
232  m_ALFA_RawDataReadOut->decodeWord(vint[wordPos]);
234 
235  int l=0;
236 
237  if(EcrId!=evt_Id)
238  {
239  n++;
240  l=1;
241  }
242 
243  if (n==0) Event_num = LvL1;
244  else Event_num = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF) + Event_num;
245 
246  LvL1 = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF)+1 ;
247  EcrId = ((robFrag->rod_lvl1_id()) & 0xFF000000) >> 24;
248 
249  if(l==1) Event_num_max=Event_num;
250 
251  Event_num = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF)+1 + Event_num_max;
252 
253  Count_evt++;
254  //if (Count_evt == maxEvt) break;
255 
256  msg(MSG::DEBUG) << " Event_num " << Event_num << " Count_evt " << Count_evt << endmsg;
257 
258 
259 
260 
262  {
263  msg(MSG::DEBUG) << " Found the beginning of buffer "<< endmsg;
264  // Check that Lvl1d matches the one from the ROD header. this is the number of event.it corresponds to m_ALFA_RawDataReadOut->ecnt_BOT() and m_ALFA_RawDataReadOut->ecnt_EOT()
265  msg(MSG::DEBUG) << " Level 1 Id : " << m_ALFA_RawDataCollectionReadOut->lvl1Id()<< endmsg;
266  }
267  else
268  {
269  msg(MSG::DEBUG) << " Beginning of block not found BOB "<< endmsg;
270  } // BOB
271 
272 
274  {
275 
276  //Check for corrupted data
277 
279  {
280  wordPos += 1;
281  if (wordPos >= size)
282  {
283  msg(MSG::WARNING)<<" Error: data corrupted" << endmsg;
284  if (!eventInfo->updateErrorState(EventInfo::ForwardDet, EventInfo::Error))
285  msg(MSG::WARNING) <<"Cannot set ALFA error state"<< endmsg;
286  if (!eventInfo->updateEventFlagBit(EventInfo::ForwardDet, ALFAEventBitInfo::CORRUPTION))
287  msg(MSG::WARNING) <<"Cannot set event bit info for ALFA"<< endmsg;
288 
289  return StatusCode::SUCCESS;
290  }
292  }
293 
294 
296  {
297  msg(MSG::DEBUG) << " Found the beginning of Link BOL"<< endmsg;
298  msg(MSG::DEBUG) << " MrodNum BOL : " << m_ALFA_RawDataCollectionReadOut->MrodNum()<< " RODinput BOL : " <<m_ALFA_RawDataCollectionReadOut->RODinput()<< endmsg;
299 
300  } // is_BOL()
301 
303  {
304  msg(MSG::WARNING)<<" Error: collection not found " << endmsg;
305  if (!eventInfo->updateErrorState(EventInfo::ForwardDet, EventInfo::Error))
306  msg(MSG::WARNING) <<"Cannot set ALFA error state"<< endmsg;
307  if (!eventInfo->updateEventFlagBit(EventInfo::ForwardDet, ALFAEventBitInfo::COLL_NOT_FOUND))
308  msg(MSG::WARNING) <<"Cannot set event bit info for ALFA"<< endmsg;
309 
310  return StatusCode::SUCCESS;
311  } // is_EOB()
312 
313 
314  wordPos += 1;
315  if (wordPos >= size)
316  {
317  msg(MSG::WARNING)<<" Error: data corrupted"<< endmsg;
318  if (!eventInfo->updateErrorState(EventInfo::ForwardDet, EventInfo::Error))
319  msg(MSG::WARNING) <<"Cannot set ALFA error state"<< endmsg;
320  if (!eventInfo->updateEventFlagBit(EventInfo::ForwardDet, ALFAEventBitInfo::CORRUPTION))
321  msg(MSG::WARNING) <<"Cannot set event bit info for ALFA"<< endmsg;
322  return StatusCode::SUCCESS;
323  }
324 
325 
327  m_ALFA_RawDataReadOut->decodeWord(vint[wordPos]);
328 
330  {
331 
332  uint16_t slotIdNum = m_ALFA_RawDataReadOut->SlotId();
333 
334  msg(MSG::DEBUG)<<" Decoding data from Slot Id number : " << slotIdNum << endmsg;
335 
336  ALFA_RawData* rawData;
337 
338  // Loop on the TDC data words and create the corresponding RDO's
339 
340  while (!m_ALFA_RawDataReadOut->is_EOT())
341  {
342  wordPos += 1;
343  if (wordPos >= size)
344  {
345  msg(MSG::WARNING)<<" Error: data corrupted" << endmsg;
346  if (!eventInfo->updateErrorState(EventInfo::ForwardDet, EventInfo::Error))
347  msg(MSG::WARNING) <<"Cannot set ALFA error state"<< endmsg;
348  if (!eventInfo->updateEventFlagBit(EventInfo::ForwardDet, ALFAEventBitInfo::CORRUPTION))
349  msg(MSG::WARNING) <<"Cannot set event bit info for ALFA"<< endmsg;
350 
351  return StatusCode::SUCCESS;
352  }
353 
354  m_ALFA_RawDataReadOut->decodeWord(vint[wordPos]);
355 
356  uint16_t PMFIdNum;
357  uint16_t WordIdNum;
358  uint16_t FiberNum;
359 
361  {
362 
363  //msg(MSG::DEBUG)<<" DECODER : PMFId " << m_ALFA_RawDataReadOut->PMFId() << " MBId " << m_ALFA_RawDataReadOut->MBId() << endmsg;
364 
365 
366  if(m_ALFA_RawDataReadOut->PMFId() ==0 && m_ALFA_RawDataReadOut->WordId() ==0) //PMF0 contains the information on wich MB is readen
367  {
368 
369  msg(MSG::DEBUG) << " Creation of the new collection"<< endmsg;
370 
371  tmpMB = m_ALFA_RawDataReadOut->fiber();
372 
373 
374  for (unsigned int i=0;i<8;i++)
375  {
376 
377  thisMB = (char) tmpMB & 0x00000001;
378  tmpMB>>=1;
379 
380  if(thisMB==1)
381  {
382  MBIdNum=i+1;
383 
384  collection = getCollection(MBIdNum,rdoCont );
385  if(collection) collection->SetMBId_POT(MBIdNum);
386 
387  msg(MSG::DEBUG)<<" DECODER : MBIdNum " << MBIdNum << endmsg;
388 
389 
390  }
391 
392 
393  } // loop over 8 Mother Boards
394 
395  } // PMFId() ==0 & WordId() ==0
396 
397 
398 
399 
401  {
402 
403 
404  tmpFiber = m_ALFA_RawDataReadOut->fiber();
405 
406  WordIdNum = m_ALFA_RawDataReadOut->WordId();
407  PMFIdNum = m_ALFA_RawDataReadOut->PMFId();
408 
409  rawData = new ALFA_RawData(PMFIdNum);
410 
411  rawData->SetWordId_PMF(WordIdNum);
412 
413  rawData->SetPMFId_PMF(PMFIdNum);
414  rawData->SetMBId_PMF(MBIdNum);
415 
417 
418  std::vector<uint16_t> hitId;
419 
420  for (unsigned int i=0;i<16;i++)
421  {
422 
423  FiberNum=100;
424  fiber_hit = (char) tmpFiber & 0x00000001;
425  tmpFiber>>=1;
426 
427  if(fiber_hit==1)
428  {
429  FiberNum=m_ALFA_RawDataReadOut->WordId()*16+i;
430  hitId.push_back(FiberNum);
431  //msg(MSG::DEBUG)<<" fiberNum = " << FiberNum <<", fiber_hit = " << fiber_hit << " PMFIdNum = " << PMFIdNum <<" WordIdNum = " << WordIdNum <<endmsg;
432  }
433  else hitId.push_back(100);
434 
435  } // loop over 16 fibers
436 
437 
438  rawData->SetMarocChan_PMF(hitId);
439 
440  rawData->addData(vint[wordPos]);
441  rawData->PushBack_PMF(FiberNum);
442  if(collection) collection->push_back(rawData);
443  else delete rawData;
444 
445  } // PMFIdNum >0 && <24
446 
447 
448 
449 
450 
451  if(m_ALFA_RawDataReadOut->PMFId()==24) // PMF 24 contains trigger and charge infos
452  {
453 
454 
455  if(m_ALFA_RawDataReadOut->WordId()==0)
456  {
457  const auto& tmpPattern=m_ALFA_RawDataReadOut->pattern();
458  if(collection) collection->Set_pattern_POT(tmpPattern);
459 
460  // // TEST of the readed trigger pattern
461  // std::vector<bool> testpattern = m_ALFA_RawDataReadOut->pattern();
462  // //uint16_t testMBid = m_ALFA_RawDataReadOut->MBId();
463  // uint16_t testPMFid = m_ALFA_RawDataReadOut->PMFId();
464  // msg() << MSG::DEBUG << "MB : " << MBIdNum << endmsg;
465  // msg(MSG::DEBUG) << "PMF : " << testPMFid << endmsg;
466  // for (unsigned int i = 0; i < (unsigned int) testpattern.size(); i++)
467  // {
468  // msg(MSG::DEBUG) << "Trig pattern " << i << " : " << testpattern[i] << endmsg;
469  // }
470  // // end of TEST of the readed trigger pattern
471 
472 
473  } // m_ALFA_RawDataReadOut->WordId()==0
474 
475 
476  else
477  if(m_ALFA_RawDataReadOut->WordId()==1)
478  {
479  tmpScaler=m_ALFA_RawDataReadOut->scaler();
480  if(collection) collection->Set_scaler_POT(tmpScaler);
481  }
482  else
483  if(m_ALFA_RawDataReadOut->WordId()==2)
484  {
485  tmpADC1=m_ALFA_RawDataReadOut->ADC();
486  if(collection) collection->Set_ADC1_POT(tmpADC1);
487  if(collection) msg(MSG::DEBUG) <<" tmpADC1 = " << tmpADC1 << endmsg;
488  }
489  else
490  if(m_ALFA_RawDataReadOut->WordId()==3)
491  {
492  tmpADC2=m_ALFA_RawDataReadOut->ADC();
493  if(collection) collection->Set_ADC2_POT(tmpADC2);
494  if(collection) msg(MSG::DEBUG)<<" tmpADC2 = " << tmpADC2 << endmsg;
495  }
496 
497  if(collection) collection->SetTrigSyncErr(m_ALFA_RawDataReadOut->error_bit17());
498 
499  } //TSM PMF24
500 
501 
502  } // TSM
503 
504 
505  } // End of loop on AMTs (EOT)
506 
507 
509  {
510  msg(MSG::DEBUG) << " Event Counter EOT : " << m_ALFA_RawDataReadOut->ecnt_EOT()<< endmsg;
511  }
512 
513  wordPos += 1;
514  if (wordPos >= size)
515  {
516  msg(MSG::WARNING)<<" Error: data corrupted" << endmsg;
517  if (!eventInfo->updateErrorState(EventInfo::ForwardDet, EventInfo::Error))
518  msg(MSG::WARNING) <<"Cannot set ALFA error state"<< endmsg;
519  if (!eventInfo->updateEventFlagBit(EventInfo::ForwardDet, ALFAEventBitInfo::CORRUPTION))
520  msg(MSG::WARNING) <<"Cannot set event bit info for ALFA"<< endmsg;
521 
522  return StatusCode::SUCCESS;
523  }
524 
525 
527  m_ALFA_RawDataReadOut->decodeWord(vint[wordPos]);
528 
529  } // End of loop on TDCs (TWC)
530 
531  wordPos += 1;
532  if (wordPos >= size)
533  {
534  msg(MSG::WARNING)<<" Error: data corrupted" << endmsg;
535  if (!eventInfo->updateErrorState(EventInfo::ForwardDet, EventInfo::Error))
536  msg(MSG::WARNING) <<"Cannot set ALFA error state"<< endmsg;
537  if (!eventInfo->updateEventFlagBit(EventInfo::ForwardDet, ALFAEventBitInfo::CORRUPTION))
538  msg(MSG::WARNING) <<"Cannot set event bit info for ALFA"<< endmsg;
539 
540  return StatusCode::SUCCESS;
541  }
542 
544 
545  } //EOB
546 
547 
548  // take full event
549  const eformat::FullEventFragment<const uint32_t*> * event = m_robDataProvider->getEvent(Gaudi::Hive::currentContext());
550 
551  msg(MSG::DEBUG) << "========FULL=============" << std::endl;
552  msg(MSG::DEBUG) << "Event time (sec): " << (uint32_t)event->bc_time_seconds() << std::endl;
553  msg(MSG::DEBUG) << "Event time (ns): " << (uint32_t)event->bc_time_nanoseconds() << std::endl;
554  msg(MSG::DEBUG) << "Global ID: " << (uint32_t)event->global_id() << std::endl;
555  msg(MSG::DEBUG) << "Run Type: " << (uint32_t)event->run_type() << std::endl;
556  msg(MSG::DEBUG) << "Run Number: " << (uint32_t)event->run_no() << std::endl;
557  msg(MSG::DEBUG) << "Lumi Block: " << (uint32_t)event->lumi_block() << std::endl;
558  msg(MSG::DEBUG) << "Level1 ID: " << (uint32_t)event->lvl1_id() << std::endl;
559  msg(MSG::DEBUG) << "BCID: " << (uint32_t)event->bc_id() << std::endl;
560  msg(MSG::DEBUG) << "Level1 trig type: " << (uint32_t)event->lvl1_trigger_type() << std::endl;
561  msg(MSG::DEBUG) << "Level1 Nwords: " << (uint32_t)event->nlvl1_trigger_info() << std::endl;
562  msg(MSG::DEBUG) << "Level2 Nwords: " << (uint32_t)event->nlvl2_trigger_info() << std::endl;
563  msg(MSG::DEBUG) << "EF Nwords: " << (uint32_t)event->nevent_filter_info() << std::endl;
564  msg(MSG::DEBUG) << "============================" << std::endl;
565 
566  uint32_t Time_StampID = event->bc_time_seconds();
567  uint32_t Time_StampnsID = event->bc_time_nanoseconds();
568  uint32_t BC_ID = event->bc_id();
569  uint32_t LumiBlock_ID = event->lumi_block();
570 
571  if(rdoCont) rdoCont->SetTimeStamp(Time_StampID);
572  if(rdoCont) rdoCont->SetTimeStampns(Time_StampnsID);
573  if(rdoCont) rdoCont->SetBCId(BC_ID);
574  if(rdoCont) rdoCont->SetLumiBlock(LumiBlock_ID);
575 
576  /*
577  For the LVL1 trigger there are three consecutive blocks of 256 bits (8 ints):
578  256 bits for the TBP (trigger before prescale)
579  256 bits for the TAP (trigger after prescale
580  256 bits for the TAV (trigger after veto)
581  */
582  const uint32_t *point_lvl1 = event->lvl1_trigger_info();
583  uint32_t point_lvl1_end = event->nlvl1_trigger_info();
584  for(uint32_t i = 0; i <= point_lvl1_end; ++i)
585  {
586  wo = *(point_lvl1 + i);
587  for(uint32_t j = 0; j < 32; ++j)
588  {
589  tmpLvl1Pattern.push_back((wo & 0x1));
590  wo >>= 1;
591  }
592  }
593  if(rdoCont) rdoCont->SetLvl1Pattern(tmpLvl1Pattern);
594 
595  wo=0;
596 
597  //It's not defined how many LVL2 and EF words are there
598  const uint32_t *point_lvl2 = event->lvl2_trigger_info();
599  uint32_t point_lvl2_end = event->nlvl2_trigger_info();
600  for(uint32_t i = 0; i <= point_lvl2_end; ++i)
601  {
602  wo = *(point_lvl2 + i);
603  for(uint32_t j = 0; j < 32; ++j)
604  {
605  tmpLvl2Pattern.push_back((wo & 0x1));
606  wo >>= 1;
607  }
608  }
609  //std::cout << std::dec << std::endl;
610  if(rdoCont) rdoCont->SetLvl2Pattern(tmpLvl2Pattern);
611 
612  wo=0;
613 
614  //std::cout << "Event num " << event->global_id() << std::endl;
615  //std::cout << "EF pat:" << std::endl;
616  const uint32_t *point_ef = event->event_filter_info();
617  uint32_t point_ef_end = event->nevent_filter_info();
618  for(uint32_t i = 0; i <= point_ef_end; ++i)
619  {
620  wo = *(point_ef + i);
621  //std::cout << std::dec << i << ": ";
622  //std::cout << std::hex << wo << " ";
623  for(uint32_t j = 0; j < 32; ++j)
624  {
625  tmpEFPattern.push_back((wo & 0x1));
626  wo >>= 1;
627  }
628  }
629  //std::cout << std::dec << std::endl;
630  if(rdoCont) rdoCont->SetEFPattern(tmpEFPattern);
631 
632 
633 
635  {
636  msg(MSG::DEBUG) << " Found the end of block EOB ---------------------- "<< endmsg;
637  }
638 
639  wordPos += 1;
641 
642  return StatusCode::SUCCESS;
643 
644 }
645 
646 
648 // getCollection() - return collection corresponding to a particular channel
649 // if it exists in container, or create it if it doesn't
651 
653 {
654 
655  msg(MSG::DEBUG) << " ALFA_RoDDecoder::getCollection" << endmsg;
656 
658 
660  bool collExists = false;
663 
664 
665  for (; it!=itE; ++it)
666  {
667  if ((*it)->GetMBId_POT() == MBIdNum)
668  {
669  collExists = true;
670  cont_it = it;
671  }
672  }
673  if (collExists)
674  {
675  msg(MSG::DEBUG) << " Collection exists " << endmsg;
676  return nullptr;
677 
678  }
679  else // if collection does not exist create it
680  {
681  coll = new ALFA_RawDataCollection(MBIdNum);
682  msg(MSG::DEBUG) << " create collection; MBId " << MBIdNum <<endmsg;
683  cont->push_back(coll); // add collection to container
684 
685 
686  }
687 
688 
689  return coll;
690 }
EventInfo::Error
@ Error
Definition: EventInfo/EventInfo/EventInfo.h:67
ALFA_RawDataReadOut::bit16
bool bit16() const
Definition: ALFA_RawDataReadOut.h:114
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
ALFA_RawDataReadOut
Definition: ALFA_RawDataReadOut.h:26
ALFA_RawDataReadOut::fiber
uint16_t fiber() const
Definition: ALFA_RawDataReadOut.h:110
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
ALFA_RawDataCollection::Set_ADC2_POT
void Set_ADC2_POT(uint16_t ADC2_number)
Definition: ALFA_RawDataCollection.cxx:84
ALFA_RawDataReadOut::is_EOT
bool is_EOT() const
Definition: ALFA_RawDataReadOut.h:95
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition: IEventInfoCnvTool.h:17
ALFA_RawData::Set_error_bit17
void Set_error_bit17(bool bit)
Definition: ALFA_RawData.cxx:81
ALFA_RawData::SetPMFId_PMF
void SetPMFId_PMF(uint16_t PMF_number)
Definition: ALFA_RawData.cxx:49
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
ALFA_RawDataContainerReadOut::decodeWord
void decodeWord(uint32_t dataWord)
Definition: ALFA_RawDataContainerReadOut.cxx:26
ALFA_RawData::addData
void addData(uint32_t dataWord)
Definition: ALFA_RawData.cxx:76
ALFA_Decoder::m_robDataProvider
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
Service for reading bytestream.
Definition: ALFA_Decoder.h:74
ALFA_Decoder::m_ALFA_RawDataCollectionReadOut
ALFA_RawDataCollectionReadOut * m_ALFA_RawDataCollectionReadOut
Definition: ALFA_Decoder.h:78
ALFA_Decoder::initialize
virtual StatusCode initialize()
Definition: ALFA_Decoder.cxx:45
ALFA_Decoder::m_ALFA_RawDataReadOut
ALFA_RawDataReadOut * m_ALFA_RawDataReadOut
Definition: ALFA_Decoder.h:77
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ALFA_Decoder::ALFA_Decoder
ALFA_Decoder(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ALFA_Decoder.cxx:23
ALFA_RawDataReadOut::bit26_27
uint16_t bit26_27() const
Definition: ALFA_RawDataReadOut.h:118
ALFAEventBitInfo::CORRUPTION
@ CORRUPTION
data corrupted
Definition: ALFAEventBitInfo.h:11
Issue
Configuration Issue
Definition: PscIssues.h:31
ALFA_Decoder::fillCollection
StatusCode fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, ALFA_RawDataContainer *rdoCont, std::vector< unsigned int > *vecHash=NULL)
Definition: ALFA_Decoder.cxx:103
initialize
void initialize()
Definition: run_EoverP.cxx:894
ALFA_RawDataContainer::SetTimeStamp
void SetTimeStamp(uint32_t tmpTimeStamp)
Definition: ALFA_RawDataContainer.cxx:78
xAOD::char
char
Definition: TrigDecision_v1.cxx:38
ALFA_RawDataCollectionReadOut::is_TWC
bool is_TWC() const
Definition: ALFA_RawDataCollectionReadOut.h:91
skel.it
it
Definition: skel.GENtoEVGEN.py:396
ALFA_RawDataReadOut::ADC
uint16_t ADC() const
Definition: ALFA_RawDataReadOut.h:111
ALFA_RawDataReadOut::SlotId
uint16_t SlotId() const
Definition: ALFA_RawDataReadOut.h:103
ALFA_RawDataCollection::Set_ADC1_POT
void Set_ADC1_POT(uint16_t ADC1_number)
Definition: ALFA_RawDataCollection.cxx:79
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
ALFA_RawDataReadOut::WordId
uint16_t WordId() const
Definition: ALFA_RawDataReadOut.h:108
ALFA_RawData::SetMBId_PMF
void SetMBId_PMF(uint16_t MB_number)
Definition: ALFA_RawData.cxx:54
ALFAEventBitInfo.h
ALFAEventBitInfo::COLL_NOT_FOUND
@ COLL_NOT_FOUND
collection not found
Definition: ALFAEventBitInfo.h:12
ALFA_RawDataCollectionReadOut::is_BOL
bool is_BOL() const
Definition: ALFA_RawDataCollectionReadOut.h:89
ALFA_RawDataCollection::SetTrigSyncErr
void SetTrigSyncErr(bool bit)
Definition: ALFA_RawDataCollection.cxx:89
ALFA_Decoder::m_fragment_number
unsigned int m_fragment_number
Definition: ALFA_Decoder.h:71
TruthTest.itE
itE
Definition: TruthTest.py:25
ALFA_RawDataReadOut::bit18
bool bit18() const
Definition: ALFA_RawDataReadOut.h:116
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
ALFA_RawDataContainer::SetTimeStampns
void SetTimeStampns(uint32_t tmpTimeStampns)
Definition: ALFA_RawDataContainer.cxx:83
ALFA_RawData::PushBack_PMF
void PushBack_PMF(uint16_t fiber_hit)
Definition: ALFA_RawData.cxx:72
ALFA_RawDataReadOut::decodeWord
void decodeWord(uint32_t dataWord)
Definition: ALFA_RawDataReadOut.cxx:33
ALFA_RawDataCollection::Set_scaler_POT
void Set_scaler_POT(uint16_t scaler_number)
Definition: ALFA_RawDataCollection.cxx:74
EventInfo::ForwardDet
@ ForwardDet
Definition: EventInfo/EventInfo/EventInfo.h:61
ALFA_RawData
Definition: ALFA_RawData.h:21
ALFA_RawDataReadOut::ecnt_EOT
uint16_t ecnt_EOT() const
Definition: ALFA_RawDataReadOut.h:106
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
ALFA_RawDataReadOut::PMFId
uint16_t PMFId() const
Definition: ALFA_RawDataReadOut.h:109
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
OFFLINE_FRAGMENTS_NAMESPACE::PointerType
const DataType * PointerType
Definition: RawEvent.h:25
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
ALFA_Decoder::interfaceID
static const InterfaceID & interfaceID()
Definition: ALFA_Decoder.cxx:14
ALFA_RawData::SetMarocChan_PMF
void SetMarocChan_PMF(const std::vector< uint16_t > &MarocChan)
Definition: ALFA_RawData.cxx:65
eformat::ROBFragment
Definition: L1CaloBsDecoderUtil.h:12
lumiFormat.i
int i
Definition: lumiFormat.py:85
ALFA_RawDataCollection::SetMBId_POT
void SetMBId_POT(uint16_t MB_number)
Definition: ALFA_RawDataCollection.cxx:52
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ALFA_Decoder::~ALFA_Decoder
virtual ~ALFA_Decoder()
Definition: ALFA_Decoder.cxx:37
ALFA_RawDataCollectionReadOut::decodeWord
void decodeWord(uint32_t dataWord)
Definition: ALFA_RawDataCollectionReadOut.cxx:27
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ALFA_RawDataCollection
RDOs : Chamber Service Module, collection of RawData.
Definition: ALFA_RawDataCollection.h:19
ALFA_RawDataCollectionReadOut::lvl1Id
uint32_t lvl1Id() const
Definition: ALFA_RawDataCollectionReadOut.h:95
ALFA_RawDataContainer::SetLumiBlock
void SetLumiBlock(uint32_t tmpLumiBlock)
Definition: ALFA_RawDataContainer.cxx:88
ALFA_RawDataContainer::SetLvl2Pattern
void SetLvl2Pattern(const std::vector< bool > &tmplvl2_pattern)
Definition: ALFA_RawDataContainer.cxx:103
ALFA_RawDataContainer::SetEFPattern
void SetEFPattern(const std::vector< bool > &tmpef_pattern)
Definition: ALFA_RawDataContainer.cxx:108
ALFA_RawData::SetWordId_PMF
void SetWordId_PMF(uint16_t Word_number)
Definition: ALFA_RawData.cxx:44
ALFA_RawDataCollectionReadOut
Definition: ALFA_RawDataCollectionReadOut.h:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ALFA_Decoder::getCollection
ALFA_RawDataCollection * getCollection(unsigned int MotherBoardId, ALFA_RawDataContainer *cont)
Definition: ALFA_Decoder.cxx:652
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:43
ALFA_RawDataCollection::Set_pattern_POT
void Set_pattern_POT(const std::vector< bool > &pattern_number)
Definition: ALFA_RawDataCollection.cxx:69
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
EventInfo.h
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
ALFA_RawDataCollectionReadOut::RODinput
uint16_t RODinput() const
Definition: ALFA_RawDataCollectionReadOut.h:105
ALFA_RawDataReadOut::bit24_27
uint16_t bit24_27() const
Definition: ALFA_RawDataReadOut.h:119
ALFA_RawDataCollectionReadOut::MrodNum
uint16_t MrodNum() const
Definition: ALFA_RawDataCollectionReadOut.h:104
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ALFA_RawDataReadOut::pattern
const std::vector< bool > & pattern() const
Definition: ALFA_RawDataReadOut.h:112
ALFA_Decoder::finalize
virtual StatusCode finalize()
Definition: ALFA_Decoder.cxx:83
ALFA_RawDataCollectionReadOut::is_EOB
bool is_EOB() const
Definition: ALFA_RawDataCollectionReadOut.h:92
ALFA_RawDataContainer
This container provides acces to the PMF RDOs.
Definition: ALFA_RawDataContainer.h:21
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
ALFA_RawDataContainer::SetLvl1Pattern
void SetLvl1Pattern(const std::vector< bool > &tmplvl1_pattern)
Definition: ALFA_RawDataContainer.cxx:98
ALFA_Decoder.h
ALFA_RawDataContainer::SetBCId
void SetBCId(uint32_t tmpBCId)
Definition: ALFA_RawDataContainer.cxx:93
ALFAEventBitInfo::ROB_ERROR
@ ROB_ERROR
ROB status error.
Definition: ALFAEventBitInfo.h:10
AthAlgTool
Definition: AthAlgTool.h:26
ALFA_RawDataReadOut::error_bit17
bool error_bit17() const
Definition: ALFA_RawDataReadOut.h:115
ALFA_RawDataReadOut::is_TDCt
bool is_TDCt() const
Definition: ALFA_RawDataReadOut.h:97
ALFA_RawDataCollectionReadOut::is_BOB
bool is_BOB() const
Definition: ALFA_RawDataCollectionReadOut.h:87
ALFA_RawDataContainerReadOut
Definition: ALFA_RawDataContainerReadOut.h:31
ALFA_Decoder::m_ALFA_RawDataContainerReadOut
ALFA_RawDataContainerReadOut * m_ALFA_RawDataContainerReadOut
Definition: ALFA_Decoder.h:79
ALFA_RawDataReadOut::scaler
uint16_t scaler() const
Definition: ALFA_RawDataReadOut.h:113
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.