From 4113086e654fdf00c3be13daaf9f0a7cccf38ddf Mon Sep 17 00:00:00 2001
From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch>
Date: Fri, 16 Oct 2020 08:04:39 +0200
Subject: [PATCH] Enable LumiBlockMuWriter in jobs that read RDO but do not
 write ESD (e.g. RDOtoBS)

Addresses ATR-21701
---
 .../RecExCommon/share/RecExCommon_topOptions.py        | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index 770684779cf..f415d63c80f 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -594,7 +594,7 @@ if globalflags.InputFormat.is_bytestream():
     pass
 
 ### write mu values into xAOD::EventInfo
-if rec.doESD() and rec.readRDO():
+if rec.readRDO():
     if globalflags.DataSource()=='geant4':
         include_muwriter = (globalflags.InputFormat.is_bytestream() or
                             hasattr( condSeq, "xAODMaker::EventInfoCnvAlg" ) or
@@ -603,12 +603,8 @@ if rec.doESD() and rec.readRDO():
         include_muwriter = not athenaCommonFlags.isOnline()
 
     if include_muwriter:
-        try:
-            include ("LumiBlockComps/LumiBlockMuWriter_jobOptions.py")
-        except Exception:
-            treatException("Could not load LumiBlockMuWriter_jobOptions.py")
-            pass
-        pass
+        from LumiBlockComps.LumiBlockMuWriterDefault import LumiBlockMuWriterDefault
+        LumiBlockMuWriterDefault()
 
 if rec.doMonitoring():
     try:
-- 
GitLab