From 2d4533ba80659676f3d1cef9945cc7a8351aa185 Mon Sep 17 00:00:00 2001
From: James Beacham <j.beacham@cern.ch>
Date: Sun, 18 Mar 2018 20:05:16 +0000
Subject: [PATCH] Merge branch '21.0-recoFlag-for-trigMetaData' into '21.0'

Setting value of reco flag for trigger metadata in DESD/DAOD production (ATR-17519)

See merge request atlas/athena!9721

(cherry picked from commit 71817f760eb79da07239a718a01666fbd3142645 [formerly 87938b084e89c3c379cd2239944a6aa43a1d7a59])

ca1432e2 Setting value of reco flag for trigger metadata in DESD/DAOD production (ATR-17519)

Former-commit-id: aacd1105a0e1a31760d6c6429fbfc745b5173598
---
 .../RecExample/RecExConfig/python/RecFlags.py        |  2 +-
 .../RecJobTransforms/share/skeleton.RAWtoALL_tf.py   | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/Reconstruction/RecExample/RecExConfig/python/RecFlags.py b/Reconstruction/RecExample/RecExConfig/python/RecFlags.py
index 38577943531..3a9c643fbf9 100755
--- a/Reconstruction/RecExample/RecExConfig/python/RecFlags.py
+++ b/Reconstruction/RecExample/RecExConfig/python/RecFlags.py
@@ -472,7 +472,7 @@ class doWriteDPD(JobProperty):
     """
     statusOn=True
     allowedTypes=['bool']
-    StoredValue=True
+    StoredValue=False
 
 #
 class doWriteBS(JobProperty):
diff --git a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoALL_tf.py b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoALL_tf.py
index 8808aa7785d..a33f1f71dae 100644
--- a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoALL_tf.py
+++ b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoALL_tf.py
@@ -97,7 +97,14 @@ if hasattr(runArgs,"outputNTUP_MUONCALIBFile"):
 if hasattr(runArgs, 'outputTXT_JIVEXMLTGZFile'):
     jp.Rec.doJiveXML.set_Value_and_Lock(True)
 
-# DESD and DRAW
+# DESD, DAOD and DRAW
+DRAWOutputs = [ prop for prop in dir(runArgs) if prop.startswith('outputDRAW') and prop.endswith('File')]
+DAODOutputs = [ prop for prop in dir(runArgs) if prop.startswith('outputDAOD') and prop.endswith('File')]
+DESDOutputs = [ prop for prop in dir(runArgs) if prop.startswith('outputDESD') and prop.endswith('File')]
+
+if len(DESDOutputs) > 0 or len(DAODOutputs) > 0:
+    rec.doWriteDPD.set_Value_and_Lock(True)
+
 listOfFlags=[]
 try:
     from PrimaryDPDMaker.PrimaryDPDFlags import primDPD
@@ -108,9 +115,6 @@ except ImportError:
 from RecJobTransforms.DPDUtils import SetupOutputDPDs
 rec.DPDMakerScripts.append(SetupOutputDPDs(runArgs,listOfFlags))
 
-DRAWOutputs = [ prop for prop in dir(runArgs) if prop.startswith('outputDRAW') and prop.endswith('File')]
-
-
 # Need to handle this properly in RecExCommon top options
 rec.OutputFileNameForRecoStep="RAWtoALL"
 
-- 
GitLab