CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
dropNonMTSafe.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 def _dropFromPaths(process,name):
4  if hasattr(process,name):
5  m = getattr(process,name)
6  for p in process.paths.itervalues():
7  p.remove(m)
8  delattr(process,name)
9 
10 def dropNonMTSafe(process):
11  process.options = cms.untracked.PSet(numberOfThreads = cms.untracked.uint32(4),
12  sizeOfStackForThreadsInKB = cms.untracked.uint32(10*1024),
13  numberOfStreams = cms.untracked.uint32(0))
14  if ( x for x in process.producers.itervalues() if x.type_() == "OscarProducer" ) :
15  from SimG4Core.Application.customiseMultithreadedSim import customiseMultithreadedSim
17 
18  return process