CMS 3D CMS Logo

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

Functions

def customise
 

Function Documentation

def G4StepStatistics.customise (   process)

Definition at line 2 of file G4StepStatistics.py.

2 
3 def customise(process):
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 
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  process.options = cms.untracked.PSet(
41  wantSummary = cms.untracked.bool(True)
42  )
43 
44  process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
45  type = cms.string('G4StepStatistics'),
46  verbose = cms.untracked.bool(True)
47  ))
48 
49  process.TFileService = cms.Service("TFileService",
50  fileName = cms.string("G4StepStatistics.root"),
51  closeFileFast = cms.untracked.bool(True)
52  )
53  return(process)
54