70 ATH_MSG_DEBUG(
"AFP_ByteStream2RawCnv::fillColelction rob_source_id: in decimal="<<std::dec<<robFrag->rob_source_id()<<
", in hex=0x"<<std::hex<<robFrag->rob_source_id()<<std::dec);
76 return StatusCode::SUCCESS;
79 const uint32_t nStat = robFrag->nstatus();
85 return StatusCode::SUCCESS;
91 return StatusCode::SUCCESS;
97 robFrag->rod_data(vint);
99 if (robFrag->rod_nstatus() <= 0) {
101 return StatusCode::SUCCESS;
104 const eformat::FullEventFragment<const uint32_t*> *
event =
m_robDataProvider->getEvent(Gaudi::Hive::currentContext());
113 rawContainer->
setBCId(event->bc_id());
115 rawContainer->
setLvl1Id(event->lvl1_id());
123 std::array<uint32_t, 16> picoTDC_data = {};
125 const uint32_t size = robFrag->rod_ndata();
126 for (
unsigned i = 0; i < size; i++) {
127 uint32_t the_word=vint[i];
136 collectionHead = collectionToF;
142 collectionHead = collectionSi;
145 ATH_MSG_ERROR(
"Unidentified value of link="<<the_link<<
" for header record.");
146 return StatusCode::FAILURE;
149 if (!collectionHead) {
151 << the_link <<
", robID = " << robFrag->rob_source_id() <<
")");
152 return StatusCode::SUCCESS;
157 collectionHead->
setLink(the_link);
160 collectionHead->
setRobId(robFrag->rob_source_id());
167 if ( !collectionToF ) {
169 return StatusCode::SUCCESS;
191 ATH_MSG_DEBUG(
"This is not a ToF measurement, bit23 = "<<bit23<<
", bits22_21 "<<bits22_21<<
", ignoring word = "<<the_word);
197 if (bits23_22==0b10) {
201 if (bits21_20==0b10) {
207 if (picoTDC_data[channel] == 0) {
208 picoTDC_data[channel] = the_word;
210 if (
m_wordReadout->getBits(picoTDC_data[channel], 18, 18) == 1) {
211 uint32_t fine_word = the_word;
212 uint32_t coarse_word = picoTDC_data[channel];
223 picoTDC_data[channel] = 0;
225 ATH_MSG_WARNING(
"Fine time word for channel "<<channel<<
" is already set to "<<picoTDC_data[channel]<<
", cannot set it to "<<the_word<<
", will not overwrite");
230 if (picoTDC_data[channel] == 0) {
231 picoTDC_data[channel] = the_word;
233 if (
m_wordReadout->getBits(picoTDC_data[channel], 18, 18) == 0) {
234 uint32_t fine_word = picoTDC_data[channel];
235 uint32_t coarse_word = the_word;
246 picoTDC_data[channel] = 0;
248 ATH_MSG_WARNING(
"Coarse time word for channel "<<channel<<
" is already set to "<<picoTDC_data[channel]<<
", cannot set it to "<<the_word<<
", will not overwrite");
254 ATH_MSG_DEBUG(
"This is not a ToF measurement, bits23_22 = "<<bits23_22<<
", bits21_20 "<<bits21_20<<
", ignoring word = "<<the_word);
258 ATH_MSG_WARNING(
"Unexpected pattern in bits 22-23 = "<<bits23_22<<
", ignoring word = "<<the_word);
266 if ( !collectionSi ) {
267 ATH_MSG_WARNING(
"No silicon detector collection available to fill data.");
268 return StatusCode::SUCCESS;
292 ATH_MSG_ERROR(
"Not recognised value of link="<<the_link<<
" for data record.");
293 return StatusCode::FAILURE;
300 for (std::size_t channel=0;channel<picoTDC_data.size();++channel) {
301 uint32_t word = picoTDC_data[channel];
304 ATH_MSG_WARNING(
"Incomplete picoTDC data for channel "<<channel<<
", fine word "<<word<<
" could not be paired");
306 ATH_MSG_WARNING(
"Incomplete picoTDC data for channel "<<channel<<
", coarse word "<<word<<
" could not be paired");
311 return StatusCode::SUCCESS;