CMS 3D CMS Logo

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.out_step.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.outpath)
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     #Tweak Message logger to dump G4cout and G4cerr messages in G4msg.log
00030     #print process.MessageLogger.__dict__
00031     process.MessageLogger.destinations=cms.untracked.vstring('warnings'
00032                                                              , 'errors'
00033                                                              , 'infos'
00034                                                              , 'debugs'
00035                                                              , 'cout'
00036                                                              , 'cerr'
00037                                                              , 'G4msg'
00038                                                              )
00039     process.MessageLogger.categories=cms.untracked.vstring('FwkJob'
00040                                                            ,'FwkReport'
00041                                                            ,'FwkSummary'
00042                                                            ,'Root_NoDictionary'
00043                                                            ,'G4cout'
00044                                                            ,'G4cerr'
00045                                                            )
00046     process.MessageLogger.cerr = cms.untracked.PSet(
00047         noTimeStamps = cms.untracked.bool(True)
00048         )
00049     process.MessageLogger.G4msg =  cms.untracked.PSet(
00050         noTimeStamps = cms.untracked.bool(True)
00051         ,threshold = cms.untracked.string('INFO')
00052         ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
00053         ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
00054         ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
00055         )
00056     return(process)

Generated on Tue Jun 9 17:49:25 2009 for CMSSW by  doxygen 1.5.4