CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
TimeMemoryG4Info Namespace Reference

Functions

def customise
 

Function Documentation

def TimeMemoryG4Info.customise (   process)

Definition at line 2 of file TimeMemoryG4Info.py.

References gpuVertexFinder.return.

2 
3 def customise(process):
4 
5  #Adding SimpleMemoryCheck service:
6  process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
7  ignoreTotal=cms.untracked.int32(1),
8  oncePerEventMode=cms.untracked.bool(True))
9  #Adding Timing service:
10  process.Timing=cms.Service("Timing")
11 
12  #Tweak Message logger to dump G4cout and G4cerr messages in G4msg.log
13  #print process.MessageLogger.__dict__
14  #Configuring the G4msg.log output
15  process.MessageLogger.files = dict(G4msg = cms.untracked.PSet(
16  noTimeStamps = cms.untracked.bool(True)
17  #First eliminate unneeded output
18  ,threshold = cms.untracked.string('INFO')
19  ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
20  ,FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
21  ,FwkSummary = cms.untracked.PSet(limit = cms.untracked.int32(0))
22  ,Root_NoDictionary = cms.untracked.PSet(limit = cms.untracked.int32(0))
23  ,FwkJob = cms.untracked.PSet(limit = cms.untracked.int32(0))
24  ,TimeReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
25  ,TimeModule = cms.untracked.PSet(limit = cms.untracked.int32(0))
26  ,TimeEvent = cms.untracked.PSet(limit = cms.untracked.int32(0))
27  ,MemoryCheck = cms.untracked.PSet(limit = cms.untracked.int32(0))
28  #TimeModule, TimeEvent, TimeReport are written to LogAsbolute instead of LogInfo with a category
29  #so they cannot be eliminated from any destination (!) unless one uses the summaryOnly option
30  #in the Timing Service... at the price of silencing the output needed for the TimingReport profiling
31  #
32  #Then add the wanted ones:
33  ,PhysicsList = cms.untracked.PSet(limit = cms.untracked.int32(-1))
34  ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
35  ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
36  )
37  )
38  #Add these 3 lines to put back the summary for timing information at the end of the logfile
39  #(needed for TimeReport report)
40  if hasattr(process,'options'):
41  process.options.wantSummary = cms.untracked.bool(True)
42  else:
43  process.options = cms.untracked.PSet(
44  wantSummary = cms.untracked.bool(True)
45  )
46 
47  return(process)