11 static const InterfaceID IID_IMuCTPIByteStreamTool(
"MuCTPIByteStreamTool", 1, 1 );
18 return IID_IMuCTPIByteStreamTool;
29 declareInterface<MuCTPIByteStreamTool>(
this );
55 const std::vector< uint32_t >& multiWord =
result->getAllCandidateMultiplicities();
56 std::vector< uint32_t >::const_iterator
it = multiWord.begin();
57 std::vector< uint32_t >::const_iterator it_e = multiWord.end();
58 for( ;
it != it_e; ++
it ) {
59 theROD->push_back( *
it );
61 << std::setw( 8 ) << ( *
it ) <<
" (candidate multiplicity)");
65 const std::vector< uint32_t >& dataWord =
result->dataWord();
66 it = dataWord.begin();
67 it_e = dataWord.end();
68 for( ;
it != it_e; ++
it ) {
69 theROD->push_back( *
it );
71 << std::setw( 8 ) << ( *
it ) <<
" (candidate word)");
75 ATH_MSG_DEBUG(
"Now filling the event with the MuCTPI fragment");
78 return StatusCode::SUCCESS;
93 const uint32_t rodId = rob->rod_source_id();
98 ATH_MSG_DEBUG(
" expected ROD sub-detector ID: " << std::hex << miRodId
99 <<
" ID found: " << std::hex << rodId << std::dec);
101 if( rodId == miRodId || rodId == 0x7501 ) {
104 if( rodId == 0x7501 ) {
106 << std::hex << rodId << std::dec);
112 rob->rod_data( it_data );
113 const uint32_t ndata = rob->rod_ndata();
117 std::vector< uint32_t > candidateMultiplicity;
119 std::vector< uint32_t > dataWord;
121 if( *it_data >> LVL1::MuCTPIBits::MULT_WORD_FLAG_SHIFT ) {
122 candidateMultiplicity.push_back(
static_cast< uint32_t >( *it_data ) );
123 ATH_MSG_VERBOSE(
" 0x" << MSG::hex << std::setw( 8 ) << std::setfill(
'0' )
124 << ( *it_data ) <<
" (candidate multiplicity)");
126 dataWord.push_back(
static_cast< uint32_t >( *it_data ) );
127 ATH_MSG_VERBOSE(
" 0x" << MSG::hex << std::setw( 8 ) << std::setfill(
'0' )
128 << ( *it_data ) <<
" (candidate word)");
133 result =
new MuCTPI_RDO( std::move(candidateMultiplicity), std::move(dataWord) );
134 return StatusCode::SUCCESS;
138 ATH_MSG_ERROR(
"Wrong ROD ID found in the MuCTPI ROB fragment!");
139 return StatusCode::FAILURE;