From 16adc5e9e6c6b01b3d403b371ebc552bfc15744d Mon Sep 17 00:00:00 2001
From: Pavol Strizenec <pavol.strizenec@cern.ch>
Date: Mon, 5 Oct 2020 17:15:45 +0000
Subject: [PATCH] Protect against Latome ROB fragments in bytestream

---
 .../LArByteStream/LArRawDataContByteStreamTool.icc          | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/LArRawDataContByteStreamTool.icc b/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/LArRawDataContByteStreamTool.icc
index 2f4b3472faa..0995b390c82 100644
--- a/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/LArRawDataContByteStreamTool.icc
+++ b/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/LArRawDataContByteStreamTool.icc
@@ -47,7 +47,13 @@ StatusCode LArRawDataContByteStreamTool::convert(const RawEvent* re, COLLECTION*
             try {
               OFFLINE_FRAGMENTS_NAMESPACE::PointerType p;
 	      OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag(*rob_add);
+              uint32_t fragSourceID = robFrag.rod_source_id();
             
+              if( fragSourceID & 0x1000 ){
+                  ATH_MSG_DEBUG(" skip Latome fragment with source ID "<< std::hex << fragSourceID);
+                  continue;
+              }
+
 	      if (!m_decoder->check_valid (&robFrag, msg())) {
 	        ATH_MSG_WARNING ( "Error reading bytestream event: "
                                   << "Invalid ROB fragment for source ID " << robFrag.rod_source_id() );
-- 
GitLab