Skip to content
Snippets Groups Projects
Commit 4265ea28 authored by Hangyi Wu's avatar Hangyi Wu
Browse files

fix RawBank order by sourceID instead of boardID

parent e5d2b2fd
No related branches found
No related tags found
1 merge request!4389New sourceID encoding and new UT ReadoutMap
Pipeline #7087202 passed
......@@ -252,9 +252,17 @@ namespace LHCb::UT {
// group the data by banks..
StatusCode sc = groupByBoard( *m_digits.get(), cache, digitVectors );
// sort digitVectors by sourceID as real data is sorted by sourceID
std::vector<unsigned int> indexBySourceIDOrder;
for ( unsigned int iBoard = 0u; iBoard < cache.nBoards; ++iBoard ) { indexBySourceIDOrder.push_back( iBoard ); }
std::sort( indexBySourceIDOrder.begin(), indexBySourceIDOrder.end(), [&]( unsigned int a, unsigned int b ) {
return LHCb::UTDAQ::sourceIDfromBoardID( cache.bankMapping.findBoard( a ).board() ) <
LHCb::UTDAQ::sourceIDfromBoardID( cache.bankMapping.findBoard( b ).board() );
} );
if ( sc.isFailure() ) return sc;
for ( unsigned int iBoard = 0u; iBoard < cache.nBoards; ++iBoard ) {
for ( auto const iBoard : indexBySourceIDOrder ) {
// get the data ....
const UTDAQID aBoardID = cache.bankMapping.findBoard( iBoard );
const auto& digits = digitVectors[iBoard];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment