From 3f58e82488aaf80628c5785a220b5ad4825a334d Mon Sep 17 00:00:00 2001
From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch>
Date: Tue, 18 Jun 2019 07:07:46 +0200
Subject: [PATCH] Fix ByteStream converter for xAOD::EventInfo

The following values were implicitly set by the BS converter of the legacy EventInfo:
MCChannelNumber(0), MCEventNumber(0), MCEventWeights(std::vector<float>(1,1));
Now they are set in the BS converted of the xAOD::EventInfo too.

Fixes ATR-19871
---
 Event/ByteStreamCnvSvc/src/EventInfoByteStreamAuxCnv.cxx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Event/ByteStreamCnvSvc/src/EventInfoByteStreamAuxCnv.cxx b/Event/ByteStreamCnvSvc/src/EventInfoByteStreamAuxCnv.cxx
index af7bea61ebc..d12ea084e81 100644
--- a/Event/ByteStreamCnvSvc/src/EventInfoByteStreamAuxCnv.cxx
+++ b/Event/ByteStreamCnvSvc/src/EventInfoByteStreamAuxCnv.cxx
@@ -203,6 +203,12 @@ StatusCode EventInfoByteStreamAuxCnv::createObj(IOpaqueAddress* pAddr, DataObjec
   evtInfo.setDetectorMask(detMask0,detMask1);
   evtInfo.setDetectorMaskExt(detMask2,detMask3);
 
+  // The following values were implicitly set by the BS converter of the legacy EventInfo
+  // Setting them here too
+  evtInfo.setMCChannelNumber(0);
+  evtInfo.setMCEventNumber(0);
+  evtInfo.setMCEventWeights(std::vector<float>(1,1));
+
   // Set Event Type
   uint32_t eventTypeBitmask{0};
   if (m_isSimulation) {
-- 
GitLab