From 20075df728ea3e7254124e948e592ca7cf50ff32 Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Fri, 16 Jun 2023 20:45:03 +0200
Subject: [PATCH] fix really bad bug: do not include last header word in sort

---
 Hlt/HltDAQ/src/component/HltDecReportsWriter.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Hlt/HltDAQ/src/component/HltDecReportsWriter.cpp b/Hlt/HltDAQ/src/component/HltDecReportsWriter.cpp
index 36fae3c2270..df9b7f6703a 100644
--- a/Hlt/HltDAQ/src/component/HltDecReportsWriter.cpp
+++ b/Hlt/HltDAQ/src/component/HltDecReportsWriter.cpp
@@ -101,8 +101,8 @@ namespace LHCb::Hlt::DAQ {
 
       // order according to the values, essentially orders by intDecisionID
       // this is important since it will put "*Global" reports at the beginning of the bank
-      // NOTE: we must skip the first two words (configuredTCK, taskID)
-      std::sort( std::next( std::begin( bankBody ), 2 ), std::end( bankBody ) );
+      // NOTE: we must skip the first three words (encoding key, configuredTCK, taskID)
+      std::sort( std::next( std::begin( bankBody ), 3 ), std::end( bankBody ) );
 
       // shift bits in sourceID for the same convention as in HltSelReports
       outputrawevent.addBank( shift<SourceIDMasks::Process>( m_sourceID ), RawBank::HltDecReports, kVersionNumber,
-- 
GitLab