26 const IInterface* parent )
29 declareInterface<MuCTPIByteStreamTool>(
this );
50 theROD =
m_fea.getRodData( rodId );
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;
90 const uint32_t miRodId =
m_srcIdMap.getRodID();
93 const uint32_t rodId = rob->rod_source_id();
96 const uint32_t
bcId = rob->rod_bc_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;
120 for( uint32_t i = 0; i < ndata; ++i, ++it_data ) {
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;
const boost::regex re(r_e)
#define ATH_MSG_VERBOSE(x)
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
uint16_t bcId(uint32_t data)
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
Class representing the readout data of the MuCTPI hardware and simulation.
static constexpr uint32_t MULT_WORD_FLAG_SHIFT
Position of the bit turned on for the multiplicity words that distinguishes them from the data words.
const DataType * PointerType