Skip to content
Snippets Groups Projects
Commit b4cda718 authored by Dominik Smith's avatar Dominik Smith Committed by Volker Friese
Browse files

Added vector memory reservation to unpackers in cbm::algo.

parent 5d21d245
No related branches found
No related tags found
1 merge request!1237Added vector memory reservation to unpackers in cbm::algo.
Pipeline #23125 passed
......@@ -44,6 +44,9 @@ namespace cbm::algo
// --- Interpret MS content as sequence of SMX messages
auto message = reinterpret_cast<const critof001::Message*>(msContent);
const uint32_t maxDigis = numMessages - 2; // -2 for the TS_MSB and EPOCH messages
result.first.reserve(maxDigis);
// --- The first message in the MS is expected to be of type EPOCH.
if (message[0].getMessageType() != critof001::MSG_EPOCH) {
result.second.fNumErrInvalidFirstMessage++;
......
......@@ -49,6 +49,9 @@ namespace cbm::algo
return result;
}
const uint32_t maxDigis = numMessages - 2; // -2 for the TS_MSB and EPOCH messages
result.first.reserve(maxDigis);
// --- Interpret MS content as sequence of SMX messages
auto message = reinterpret_cast<const stsxyter::Message*>(msContent);
......
......@@ -44,6 +44,9 @@ namespace cbm::algo
// --- Interpret MS content as sequence of Critof messages
auto message = reinterpret_cast<const critof001::Message*>(msContent);
const uint32_t maxDigis = numMessages - 2; // -2 for the TS_MSB and EPOCH messages
result.first.reserve(maxDigis);
// --- The first message in the MS is expected to be of type EPOCH.
if (message[0].getMessageType() != critof001::MSG_EPOCH) {
result.second.fNumErrInvalidFirstMessage++;
......
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