CMS 3D CMS Logo

Functions

SaveRandomSeedsSim Namespace Reference

Functions

def customise

Function Documentation

def SaveRandomSeedsSim::customise (   process)

Definition at line 7 of file SaveRandomSeedsSim.py.

00008                       :
00009     #Renaming the process
00010     process.__dict__['_Process__name']='SIMSavingSeeds'
00011     #Storing the random seeds
00012     #This would no more be necessary, randomEngineStateProducer is always in the configuration
00013     #But I prefer to delete it and call it rndStore:
00014     #del process.randomEngineStateProducer
00015     process.rndmStore=cms.EDProducer("RandomEngineStateProducer")
00016     #Adding the RandomEngine seeds to the content
00017     process.output.outputCommands.append("keep RandomEngineStates_*_*_*")
00018     process.rndmStore_step=cms.Path(process.rndmStore)
00019     #Modifying the schedule:
00020     #First delete the current one:
00021     del process.schedule[:]
00022     #Then add the wanted sequences
00023     process.schedule.append(process.simulation_step)
00024     process.schedule.append(process.rndmStore_step)
00025     process.schedule.append(process.out_step)
00026     #Adding SimpleMemoryCheck service:
00027     process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
00028                                           ignoreTotal=cms.untracked.int32(1),
00029                                           oncePerEventMode=cms.untracked.bool(True))
00030     #Adding Timing service:
00031     process.Timing=cms.Service("Timing")
00032     
00033     #Tweak Message logger to dump G4cout and G4cerr messages in G4msg.log
00034     process.MessageLogger.destinations=cms.untracked.vstring('warnings'
00035                                                              , 'errors'
00036                                                              , 'infos'
00037                                                              , 'debugs'
00038                                                              , 'cout'
00039                                                              , 'cerr'
00040                                                              , 'G4msg'
00041                                                              )
00042     process.MessageLogger.categories=cms.untracked.vstring('FwkJob'
00043                                                            ,'FwkReport'
00044                                                            ,'FwkSummary'
00045                                                            ,'Root_NoDictionary'
00046                                                            ,'G4cout'
00047                                                            ,'G4cerr'
00048                                                            )
00049     process.MessageLogger.cerr = cms.untracked.PSet(
00050         noTimeStamps = cms.untracked.bool(True)
00051         )
00052     process.MessageLogger.G4msg =  cms.untracked.PSet(
00053         noTimeStamps = cms.untracked.bool(True)
00054         ,threshold = cms.untracked.string('INFO')
00055         ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
00056         ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
00057         ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
00058         )
00059     return(process)