Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:31:45

0001 import FWCore.ParameterSet.Config as cms
0002 def customise(process):
0003 
0004     #Adding SimpleMemoryCheck service:
0005     process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
0006                                           ignoreTotal=cms.untracked.int32(1),
0007                                           oncePerEventMode=cms.untracked.bool(True))
0008     #Adding Timing service:
0009     process.Timing=cms.Service("Timing")
0010     
0011     #Tweak Message logger to dump G4cout and G4cerr messages in G4msg.log
0012     #print process.MessageLogger.__dict__
0013     #Configuring the G4msg.log output
0014     process.MessageLogger.files = dict(G4msg =  cms.untracked.PSet(
0015         noTimeStamps = cms.untracked.bool(True)
0016         #First eliminate unneeded output
0017         ,threshold = cms.untracked.string('INFO')
0018         ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
0019         ,FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
0020         ,FwkSummary = cms.untracked.PSet(limit = cms.untracked.int32(0))
0021         ,Root_NoDictionary = cms.untracked.PSet(limit = cms.untracked.int32(0))
0022         ,FwkJob = cms.untracked.PSet(limit = cms.untracked.int32(0))
0023         ,TimeReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
0024         ,TimeModule = cms.untracked.PSet(limit = cms.untracked.int32(0))
0025         ,TimeEvent = cms.untracked.PSet(limit = cms.untracked.int32(0))
0026         ,MemoryCheck = cms.untracked.PSet(limit = cms.untracked.int32(0))
0027         #TimeModule, TimeEvent, TimeReport are written to LogAsbolute instead of LogInfo with a category
0028         #so they cannot be eliminated from any destination (!) unless one uses the summaryOnly option
0029         #in the Timing Service... at the price of silencing the output needed for the TimingReport profiling
0030         #
0031         #Then add the wanted ones:
0032         ,PhysicsList = cms.untracked.PSet(limit = cms.untracked.int32(-1))
0033         ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
0034         ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
0035         )
0036     )
0037     #Add these 3 lines to put back the summary for timing information at the end of the logfile
0038     #(needed for TimeReport report)
0039     if hasattr(process,'options'):
0040         process.options.wantSummary = cms.untracked.bool(True)
0041     else:
0042         process.options = cms.untracked.PSet(
0043             wantSummary = cms.untracked.bool(True)
0044         )
0045 
0046     return(process)