7 #include "eformat/Issue.h"
13 static const InterfaceID IID_IALFA_Decoder (
"ALFA_Decoder", 1, 0);
16 return IID_IALFA_Decoder;
25 m_robDataProvider (
"ROBDataProviderSvc",
name)
28 declareInterface<ALFA_Decoder>(
this);
52 if (
sc.isFailure())
return sc;
58 return StatusCode::FAILURE;
72 return StatusCode::SUCCESS;
95 return StatusCode::SUCCESS;
111 std::vector<uint32_t> VData;
129 std::vector<bool> tmpLvl1Pattern;
130 std::vector<bool> tmpLvl2Pattern;
131 std::vector<bool> tmpEFPattern;
145 if (
sc.isFailure()) {
146 ATH_MSG_WARNING (
" cannot retrieve EventInfo, will not set ALFA bit information ");
160 msg(MSG::WARNING) <<
"Cannot set ALFA error state"<<
endmsg;
161 return StatusCode::SUCCESS;
166 uint32_t nstat = robFrag->nstatus();
171 robFrag->status (
it);
176 msg(MSG::WARNING) <<
" Error in ROB status word: 0x" <<
endmsg;
178 msg(MSG::WARNING) <<
"Cannot set ALFA error state"<<
endmsg;
180 msg(MSG::WARNING) <<
"Cannot set event bit info for ALFA"<<
endmsg;
182 return StatusCode::SUCCESS;
190 robFrag->rod_data(vint);
196 uint32_t ROD_source_ID = robFrag->rod_source_id();
199 uint32_t ROD_LVL1_ID = robFrag->rod_lvl1_id();
201 msg(
MSG::DEBUG) <<
"============================" << std::endl;
208 msg(
MSG::DEBUG) <<
"============================" << std::endl;
213 uint32_t evt_Id = ((robFrag->rod_lvl1_id()) & 0xFF000000) >> 24;
214 uint32_t lvl1_Id = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF) ;
243 if (
n==0) Event_num = LvL1;
244 else Event_num = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF) + Event_num;
246 LvL1 = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF)+1 ;
247 EcrId = ((robFrag->rod_lvl1_id()) & 0xFF000000) >> 24;
249 if(
l==1) Event_num_max=Event_num;
251 Event_num = ((robFrag->rod_lvl1_id()) & 0x00FFFFFF)+1 + Event_num_max;
283 msg(MSG::WARNING)<<
" Error: data corrupted" <<
endmsg;
285 msg(MSG::WARNING) <<
"Cannot set ALFA error state"<<
endmsg;
287 msg(MSG::WARNING) <<
"Cannot set event bit info for ALFA"<<
endmsg;
289 return StatusCode::SUCCESS;
304 msg(MSG::WARNING)<<
" Error: collection not found " <<
endmsg;
306 msg(MSG::WARNING) <<
"Cannot set ALFA error state"<<
endmsg;
308 msg(MSG::WARNING) <<
"Cannot set event bit info for ALFA"<<
endmsg;
310 return StatusCode::SUCCESS;
317 msg(MSG::WARNING)<<
" Error: data corrupted"<<
endmsg;
319 msg(MSG::WARNING) <<
"Cannot set ALFA error state"<<
endmsg;
321 msg(MSG::WARNING) <<
"Cannot set event bit info for ALFA"<<
endmsg;
322 return StatusCode::SUCCESS;
345 msg(MSG::WARNING)<<
" Error: data corrupted" <<
endmsg;
347 msg(MSG::WARNING) <<
"Cannot set ALFA error state"<<
endmsg;
349 msg(MSG::WARNING) <<
"Cannot set event bit info for ALFA"<<
endmsg;
351 return StatusCode::SUCCESS;
374 for (
unsigned int i=0;
i<8;
i++)
377 thisMB = (
char) tmpMB & 0x00000001;
418 std::vector<uint16_t> hitId;
420 for (
unsigned int i=0;
i<16;
i++)
424 fiber_hit = (
char) tmpFiber & 0x00000001;
430 hitId.push_back(FiberNum);
433 else hitId.push_back(100);
440 rawData->
addData(vint[wordPos]);
442 if(collection) collection->
push_back(rawData);
516 msg(MSG::WARNING)<<
" Error: data corrupted" <<
endmsg;
518 msg(MSG::WARNING) <<
"Cannot set ALFA error state"<<
endmsg;
520 msg(MSG::WARNING) <<
"Cannot set event bit info for ALFA"<<
endmsg;
522 return StatusCode::SUCCESS;
534 msg(MSG::WARNING)<<
" Error: data corrupted" <<
endmsg;
536 msg(MSG::WARNING) <<
"Cannot set ALFA error state"<<
endmsg;
538 msg(MSG::WARNING) <<
"Cannot set event bit info for ALFA"<<
endmsg;
540 return StatusCode::SUCCESS;
549 const eformat::FullEventFragment<const uint32_t*> *
event =
m_robDataProvider->getEvent(Gaudi::Hive::currentContext());
564 msg(
MSG::DEBUG) <<
"============================" << std::endl;
566 uint32_t Time_StampID =
event->bc_time_seconds();
567 uint32_t Time_StampnsID =
event->bc_time_nanoseconds();
569 uint32_t LumiBlock_ID =
event->lumi_block();
573 if(rdoCont) rdoCont->
SetBCId(BC_ID);
582 const uint32_t *point_lvl1 =
event->lvl1_trigger_info();
583 uint32_t point_lvl1_end =
event->nlvl1_trigger_info();
586 wo = *(point_lvl1 +
i);
589 tmpLvl1Pattern.push_back((wo & 0
x1));
598 const uint32_t *point_lvl2 =
event->lvl2_trigger_info();
599 uint32_t point_lvl2_end =
event->nlvl2_trigger_info();
602 wo = *(point_lvl2 +
i);
605 tmpLvl2Pattern.push_back((wo & 0
x1));
616 const uint32_t *point_ef =
event->event_filter_info();
617 uint32_t point_ef_end =
event->nevent_filter_info();
620 wo = *(point_ef +
i);
625 tmpEFPattern.push_back((wo & 0
x1));
642 return StatusCode::SUCCESS;
660 bool collExists =
false;
667 if ((*it)->GetMBId_POT() == MBIdNum)