Skip to content

Commit

Permalink
add a outputCommands similar to inputCommands
Browse files Browse the repository at this point in the history
  • Loading branch information
vlimant committed Apr 30, 2013
1 parent edc1343 commit dba2228
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Configuration/Applications/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python

__version__ = "$Revision: 1.13 $"
__version__ = "$Revision: 1.14 $"
__source__ = "$Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v $"

import FWCore.ParameterSet.Config as cms
Expand Down Expand Up @@ -57,6 +57,7 @@ class Options:
defaultOptions.beamspot=None
defaultOptions.outputDefinition =''
defaultOptions.inputCommands = None
defaultOptions.outputCommands = None
defaultOptions.inputEventContent = ''
defaultOptions.dropDescendant = False
defaultOptions.relval = None
Expand Down Expand Up @@ -586,6 +587,11 @@ def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+th
path=getattr(self.process,outputModuleName+'_step')
self.schedule.append(path)

if self._options.outputCommands and streamType!='DQM':
for evct in self._options.outputCommands.split(','):
if not evct: continue
self.executeAndRemember("process.%s.outputCommands.append('%s')"%(outputModuleName,evct.strip()))

if not self._options.inlineEventContent:
def doNotInlineEventContent(instance,label = "process."+streamType+"EventContent.outputCommands"):
return label
Expand Down Expand Up @@ -1883,7 +1889,7 @@ def prepare_FASTSIM(self, sequence = "all"):
def build_production_info(self, evt_type, evtnumber):
""" Add useful info for the production. """
self.process.configurationMetadata=cms.untracked.PSet\
(version=cms.untracked.string("$Revision: 1.13 $"),
(version=cms.untracked.string("$Revision: 1.14 $"),
name=cms.untracked.string("Applications"),
annotation=cms.untracked.string(evt_type+ " nevts:"+str(evtnumber))
)
Expand Down
4 changes: 4 additions & 0 deletions Configuration/Applications/python/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@
help="specify the input commands; i.e dropping products",
default=None,
dest="inputCommands")
expertSettings.add_option("--outputCommands",
help="specify the extra output commands;",
default=None,
dest="outputCommands")

expertSettings.add_option("--inputEventContent",
help="specify the input event content",
Expand Down

0 comments on commit dba2228

Please sign in to comment.