CMS 3D CMS Logo

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

Functions

def customise
 

Function Documentation

def TimeMemoryG4Info.customise (   process)

Definition at line 14 of file TimeMemoryG4Info.py.

References mathSSE.return().

14 
15 def customise(process):
16  #Adding SimpleMemoryCheck service:
17  process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
18  ignoreTotal=cms.untracked.int32(1),
19  oncePerEventMode=cms.untracked.bool(True))
20  #Adding Timing service:
21  process.Timing=cms.Service("Timing")
22 
23  #Tweak Message logger to dump G4cout and G4cerr messages in G4msg.log
24  #print process.MessageLogger.__dict__
25  process.MessageLogger.destinations=cms.untracked.vstring('cout'
26  ,'cerr'
27  ,'G4msg'
28  )
29  process.MessageLogger.categories=cms.untracked.vstring('FwkJob'
30  ,'FwkReport'
31  ,'FwkSummary'
32  ,'Root_NoDictionary'
33  ,'TimeReport'
34  ,'TimeModule'
35  ,'TimeEvent'
36  ,'MemoryCheck'
37  ,'PhysicsList'
38  ,'G4cout'
39  ,'G4cerr'
40  )
41  #Configuring the G4msg.log output
42  process.MessageLogger.G4msg = cms.untracked.PSet(
43  noTimeStamps = cms.untracked.bool(True)
44  #First eliminate unneeded output
45  ,threshold = cms.untracked.string('INFO')
46  ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
47  ,FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
48  ,FwkSummary = cms.untracked.PSet(limit = cms.untracked.int32(0))
49  ,Root_NoDictionary = cms.untracked.PSet(limit = cms.untracked.int32(0))
50  ,FwkJob = cms.untracked.PSet(limit = cms.untracked.int32(0))
51  ,TimeReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
52  ,TimeModule = cms.untracked.PSet(limit = cms.untracked.int32(0))
53  ,TimeEvent = cms.untracked.PSet(limit = cms.untracked.int32(0))
54  ,MemoryCheck = cms.untracked.PSet(limit = cms.untracked.int32(0))
55  #TimeModule, TimeEvent, TimeReport are written to LogAsbolute instead of LogInfo with a category
56  #so they cannot be eliminated from any destination (!) unless one uses the summaryOnly option
57  #in the Timing Service... at the price of silencing the output needed for the TimingReport profiling
58  #
59  #Then add the wanted ones:
60  ,PhysicsList = cms.untracked.PSet(limit = cms.untracked.int32(-1))
61  ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
62  ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
63  )
64 
65  #Add these 3 lines to put back the summary for timing information at the end of the logfile
66  #(needed for TimeReport report)
67  process.options = cms.untracked.PSet(
68  wantSummary = cms.untracked.bool(True)
69  )
70 
71  #Add the configuration for the Igprof running to dump profile snapshots:
72  process.IgProfService = cms.Service("IgProfService",
73  reportFirstEvent = cms.untracked.int32(1), #Dump first event for baseline studies
74  reportEventInterval = cms.untracked.int32(50),#Dump every 50 events (51,101,151,201)->Will run 201 events for Step1, GEN-SIM,DIGI tests (5 profiles + end of job one)
75  reportToFileAtPostEvent = cms.untracked.string("| gzip -c > IgProf.%I.gz")
76  )
77 
78  return(process)
return((rh^lh)&mask)