CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Validation/Performance/python/SaveRandomSeedsDigi.py

Go to the documentation of this file.
00001 #G.Benelli Feb 7 2008
00002 #This fragment is used to have the random generator seeds saved to test
00003 #simulation reproducibility. Anothe fragment then allows to run on the
00004 #root output of cmsDriver.py to test reproducibility.
00005 
00006 import FWCore.ParameterSet.Config as cms
00007 def customise(process):
00008     #Renaming the process
00009     process.__dict__['_Process__name']='DIGISavingSeeds'
00010     #Storing the random seeds
00011     process.rndmStore=cms.EDProducer("RandomEngineStateProducer")
00012     #Adding the RandomEngine seeds to the content
00013     process.output.outputCommands.append("keep RandomEngineStates_*_*_*")
00014     process.rndmStore_step=cms.Path(process.rndmStore)
00015     #Modifying the schedule:
00016     #First delete the current one:
00017     del process.schedule[:]
00018     #Then add the wanted sequences
00019     process.schedule.append(process.digitisation_step)
00020     process.schedule.append(process.rndmStore_step)
00021     process.schedule.append(process.out_step)
00022     #Adding SimpleMemoryCheck service:
00023     process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
00024                                           ignoreTotal=cms.untracked.int32(1),
00025                                           oncePerEventMode=cms.untracked.bool(True))
00026     #Adding Timing service:
00027     process.Timing=cms.Service("Timing")
00028     
00029     #Add these 3 lines to put back the summary for timing information at the end of the logfile
00030     #(needed for TimeReport report)
00031     process.options = cms.untracked.PSet(
00032         wantSummary = cms.untracked.bool(True)
00033         )
00034     
00035     return(process)