Skip to content
Snippets Groups Projects

Add support for realistic RICH PMT encoding and decoding

Compare and Show latest version
1 file
+ 6
6
Compare changes
  • Side-by-side
  • Inline
@@ -336,9 +336,8 @@ OutData RawBankDecoder::operator()( const LHCb::RawEvent& rawEvent, //
}
// Finally, fill the output data from the list of SmartIDs
fillDecodedData( decodedIDs, decodedData );
// clear ID vector for next bank
decodedIDs.clear();
}
// catch and report any exceptions during decoding
catch ( const GaudiException& expt ) {
// count errors
@@ -419,10 +418,8 @@ void RawBankDecoder::decodeToSmartIDs_MaPMT1( const LHCb::RawBank& bank,
" != DecodedSize:" + std::to_string( nPackedSizeW + nPayloadWords ) );
}
// Guess at reserve size for ID vector based on payload size
// Note this is only correct for all ZS frames.
// For frames with NZS can be an underestimate, so add a scale factor to compensate
// decodedIDs.reserve( nPayloadWords * 2 );
// Clear ID vector for this bank
decodedIDs.clear();
// finally loop over payload words and decode hits
// note iterator starts from where the above header loop ended...
@@ -560,6 +557,9 @@ void RawBankDecoder::decodeToSmartIDs_StreamIDs( const LHCb::RawBank& bank,
// Data bank size in 32 bit words
const auto bankSize = bank.size() / 4;
// Clear ID vector for this bank
decodedIDs.clear();
// reserve size in ID vector for number of hits (bank size here)
decodedIDs.reserve( bankSize );
Loading