From 40c709f6901d3962b1280eeec7baf4dd5f75639f Mon Sep 17 00:00:00 2001 From: Josh Bendavid Date: Mon, 23 Mar 2015 03:00:32 +0100 Subject: [PATCH] automatically drop LHEXMLStringProduct on input from cmsDriver where appropriate (to save memory) --- Configuration/Applications/python/ConfigBuilder.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Configuration/Applications/python/ConfigBuilder.py b/Configuration/Applications/python/ConfigBuilder.py index e44fed20a497c..711627ee1ed9a 100644 --- a/Configuration/Applications/python/ConfigBuilder.py +++ b/Configuration/Applications/python/ConfigBuilder.py @@ -411,7 +411,14 @@ def filesFromOption(self): self.process.source=cms.Source("PoolSource", fileNames = cms.untracked.vstring(),secondaryFileNames = cms.untracked.vstring()) filesFromDASQuery(self._options.dasquery,self.process.source) - if self._options.inputCommands: + ##drop LHEXMLStringProduct on input to save memory if appropriate + if 'GEN' in self.stepMap.keys(): + if self._options.inputCommands: + self._options.inputCommands+=',drop LHEXMLStringProduct_*_*_*,' + else: + self._options.inputCommands='keep *, drop LHEXMLStringProduct_*_*_*,' + + if self.process.source and self._options.inputCommands: if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring() for command in self._options.inputCommands.split(','): # remove whitespace around the keep/drop statements