CMS 3D CMS Logo

Functions
MinimizeSourceAndOutputTime Namespace Reference

Functions

def customise_min_source_output (process, nEventsToCache=10)
 

Function Documentation

◆ customise_min_source_output()

def MinimizeSourceAndOutputTime.customise_min_source_output (   process,
  nEventsToCache = 10 
)

Definition at line 3 of file MinimizeSourceAndOutputTime.py.

References mps_monitormerge.items.

3 def customise_min_source_output(process, nEventsToCache=10):
4  from IOPool.Input.modules import RepeatingCachedRootSource
5  from FWCore.Modules.modules import AsciiOutputModule
6 
7  process.source = RepeatingCachedRootSource(fileName = process.source.fileNames[0],
8  repeatNEvents = nEventsToCache)
9 
10  for k,v in process.outputModules_().items():
11  if v.type_() == 'PoolOutputModule':
12  setattr(process,k, AsciiOutputModule(verbosity= 0, outputCommands = v.outputCommands))
13  if hasattr(k,'SelectEvents'):
14  getattr(process,k).SelectEvents = k.SelectEvents
15 
16  #decrease messages as events are processed quickly
17  process.MessageLogger.cerr.FwkReport.reportEvery = 100
18 
19  #avoid warning messages each event if running on empty events
20  if hasattr(process, 'manystripclus53X'):
21  process.manystripclus53X.multiplicityConfig = dict(firstMultiplicityConfig=dict(warnIfModuleMissing=cms.untracked.bool(False)),
22  secondMultiplicityConfig=dict(warnIfModuleMissing=cms.untracked.bool(False)))
23  if hasattr(process, 'toomanystripclus53X'):
24  process.toomanystripclus53X.multiplicityConfig = dict(firstMultiplicityConfig=dict(warnIfModuleMissing=cms.untracked.bool(False)),
25  secondMultiplicityConfig=dict(warnIfModuleMissing=cms.untracked.bool(False)))
26 
27  return process
28 
def customise_min_source_output(process, nEventsToCache=10)