From c7c9ec2184e309044bbae0833d36642756c480b6 Mon Sep 17 00:00:00 2001
From: Marcelo Vogel <mavogel@cern.ch>
Date: Thu, 15 Mar 2018 13:52:29 +0100
Subject: [PATCH] Setting value of reco flag for trigger metadata in DESD/DAOD
 production (ATR-17519)

Setting reconstruction flag (doWriteDPD) to True for DESD and DAOD
production in RAWtoALL mode


Former-commit-id: ca1432e259e1a10ddafbfc0d05257f8fa7440ee8
---
 .../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 4fda2796bfa..a1bcccfc254 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 f7c75f371ae..48c156f330b 100644
--- a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoALL_tf.py
+++ b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoALL_tf.py
@@ -94,7 +94,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
@@ -105,9 +112,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