From 9e41cdfb2c4ed47bd6e5ee03be2ecf17d7049e18 Mon Sep 17 00:00:00 2001 From: James Catmore <james.catmore@cern.ch> Date: Mon, 23 May 2016 15:38:07 +0200 Subject: [PATCH] Changing name TEST0 to PASSTHR (DerivationFrameworkExamples-00-01-12) * Changing name TEST0 to PASSTHR * Tagged as DerivationFrameworkExamples-00-01-12 2016-05-23 James Catmore <james.catmore@cern.ch> * Adding pass through example, TEST0 * Tagged as DerivationFrameworkExamples-00-01-11 2015-07-14 Thibault Guillemin <thibault.guillemin@cern.ch> * Added BTagging_AntiKt*Track inputs * Tagged as DerivationFrameworkExamples-00-01-10 Former-commit-id: c4ada170d602d7c51dbae845932cfe6567f4373a --- .../share/PassThroughExample.py | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkExamples/share/PassThroughExample.py diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExamples/share/PassThroughExample.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExamples/share/PassThroughExample.py new file mode 100644 index 000000000000..6986a83294a9 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkExamples/share/PassThroughExample.py @@ -0,0 +1,44 @@ +#==================================================================== +# PassThroughExample.py +# This an example job options script showing how to set up a +# derivation that neither skims, thins or slims: all events are written +# in full to the output. +# If an AODFix is scheduled in the release, this will be run, +# so it will not be an exact copy of the input +# It requires the reductionConf flag PASSTHR in Reco_tf.py +#==================================================================== + +# Set up common services and job object. +# This should appear in ALL derivation job options +from DerivationFrameworkCore.DerivationFrameworkMaster import * + +#==================================================================== +# CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS +#==================================================================== + +# The name of the kernel (LooseSkimKernel in this case) must be unique to this derivation +from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel +DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("PASSTHRKernel") + +#==================================================================== +# SET UP STREAM +#==================================================================== + +# SKIMMING +# The base name (DAOD_PASSTHR here) must match the string in +# DerivationFrameworkProdFlags (in DerivationFrameworkCore) +streamName = derivationFlags.WriteDAOD_PASSTHRStream.StreamName +fileName = buildFileName( derivationFlags.WriteDAOD_PASSTHRStream ) +PASSTHRStream = MSMgr.NewPoolRootStream( streamName, fileName ) +# Only events that pass the filters listed below are written out. +# Name must match that of the kernel above +# AcceptAlgs = logical OR of filters +# RequireAlgs = logical AND of filters +PASSTHRStream.AcceptAlgs(["PASSTHRKernel"]) + +#==================================================================== +# CONTENT LIST +#==================================================================== +from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput +excludeList = [] +dpdOutput.addAllItemsFromInputExceptExcludeList( streamName, excludeList ) -- GitLab