CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
customiseMultithreadedSim.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4  # Set numberOfStreams to allow cmsRun/cmsDriver.py -n to control
5  # also the number of streams
6  if not hasattr(process, "options"):
7  process.options = cms.PSet()
8  if not hasattr(process.options, "numberOfStreams"):
9  process.options.numberOfStreams = cms.untracked.uint32(0)
10 
11  for label, prod in process.producers_().iteritems():
12  if prod.type_() == "OscarProducer":
13  # ugly hack
14  prod.__dict__['_TypedParameterizable__type'] = "OscarMTProducer"
15 
16  return process
17