CMS 3D CMS Logo

Functions
TimeMemoryG4Info Namespace Reference

Functions

def customise (process)
 

Function Documentation

◆ customise()

def TimeMemoryG4Info.customise (   process)

Definition at line 2 of file TimeMemoryG4Info.py.

References mathSSE.return().

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