CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/Validation/Performance/python/MixingModule.py

Go to the documentation of this file.
00001 #G.Benelli
00002 #This fragment is used to add the SimpleMemoryCheck
00003 #and Timing services output to the log of the simulation
00004 #performance candles and add pile-up events at the DIGI level using the MixingModule.
00005 #It is meant to be used with the cmsDriver.py option
00006 #--customise in the following fashion:
00007 #E.g.
00008 #./cmsDriver.py MinBias.cfi -n 50 --step=GEN,SIM,DIGI --pileup LowLumiPileUp --customise=Validation/Performance/MixingModule.py >& MINBIAS_GEN,SIM,DIGI_PILEUP.log&
00009 
00010 import FWCore.ParameterSet.Config as cms
00011 def customise(process):
00012     #Renaming the process
00013     process.__dict__['_Process__name']=process.__dict__['_Process__name']+'-PILEUP'
00014     #Adding SimpleMemoryCheck service:
00015     process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
00016                                           ignoreTotal=cms.untracked.int32(1),
00017                                           oncePerEventMode=cms.untracked.bool(True))
00018     #Adding Timing service:
00019     process.Timing=cms.Service("Timing")
00020 
00021     #Add these 3 lines to put back the summary for timing information at the end of the logfile
00022     #(needed for TimeReport report)
00023     process.options = cms.untracked.PSet(
00024         wantSummary = cms.untracked.bool(True)
00025         )
00026             
00027     #Overwriting the fileNames to be used by the MixingModule
00028     #when invoking cmsDriver.py with the --PU option
00029     process.mix.input.fileNames = cms.untracked.vstring('file:../INPUT_PILEUP_EVENTS.root')
00030 
00031 
00032     #Add the configuration for the Igprof running to dump profile snapshots:
00033     process.IgProfService = cms.Service("IgProfService",
00034                                         reportFirstEvent            = cms.untracked.int32(1),
00035                                         reportEventInterval         = cms.untracked.int32(50),
00036                                         reportToFileAtPostEvent     = cms.untracked.string("| gzip -c > IgProf.%I.gz")
00037                                         )
00038 
00039 
00040     return(process)