Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:25

0001 import FWCore.ParameterSet.Config as cms
0002 def customise(process):
0003         #Adding SimpleMemoryCheck service:
0004     process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
0005                                           ignoreTotal=cms.untracked.int32(1),
0006                                           oncePerEventMode=cms.untracked.bool(True))
0007     #Adding Timing service:
0008     process.Timing=cms.Service("Timing")
0009     
0010     #Tweak Message logger to dump G4cout and G4cerr messages in G4msg.log
0011     #print process.MessageLogger.__dict__
0012     #Configuring the G4msg.log output
0013     process.MessageLogger.files = dict(G4msg =  cms.untracked.PSet(
0014         noTimeStamps = cms.untracked.bool(True)
0015         #First eliminate unneeded output
0016         ,threshold = cms.untracked.string('INFO')
0017         ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
0018         ,FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
0019         ,FwkSummary = cms.untracked.PSet(limit = cms.untracked.int32(0))
0020         ,Root_NoDictionary = cms.untracked.PSet(limit = cms.untracked.int32(0))
0021         ,FwkJob = cms.untracked.PSet(limit = cms.untracked.int32(0))
0022         ,TimeReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
0023         ,TimeModule = cms.untracked.PSet(limit = cms.untracked.int32(0))
0024         ,TimeEvent = cms.untracked.PSet(limit = cms.untracked.int32(0))
0025         ,MemoryCheck = cms.untracked.PSet(limit = cms.untracked.int32(0))
0026         #TimeModule, TimeEvent, TimeReport are written to LogAsbolute instead of LogInfo with a category
0027         #so they cannot be eliminated from any destination (!) unless one uses the summaryOnly option
0028         #in the Timing Service... at the price of silencing the output needed for the TimingReport profiling
0029         #
0030         #Then add the wanted ones:
0031         ,PhysicsList = cms.untracked.PSet(limit = cms.untracked.int32(-1))
0032         ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
0033         ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
0034         )
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     process.options = cms.untracked.PSet(
0040         wantSummary = cms.untracked.bool(True)
0041         )
0042 
0043     process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0044         type = cms.string('G4StepStatistics'),
0045         verbose = cms.untracked.bool(True)
0046         ))
0047 
0048     process.TFileService = cms.Service("TFileService", 
0049       fileName = cms.string("G4StepStatistics.root"),
0050       closeFileFast = cms.untracked.bool(True)
0051     )
0052     return(process)
0053