Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --timing option in confdb.py (93X) #19720

Merged
merged 2 commits into from Jul 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
70 changes: 17 additions & 53 deletions HLTrigger/Configuration/python/Tools/confdb.py
Expand Up @@ -333,8 +333,7 @@ def addGlobalOptions(self):
)
""" % self.config.events

if not self.config.profiling:
self.data += """
self.data += """
# enable TrigReport, TimeReport and MultiThreading
%(process)s.options = cms.untracked.PSet(
wantSummary = cms.untracked.bool( True ),
Expand Down Expand Up @@ -617,78 +616,44 @@ def overrideParameters(self, module, parameters):


def instrumentTiming(self):
if self.config.profiling:
# instrument the menu for profiling: remove the HLTAnalyzerEndpath, add/override the HLTriggerFirstPath, with hltGetRaw and hltGetConditions
text = ''

if not 'hltGetRaw' in self.data:
# add hltGetRaw
text += """
%(process)s.hltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
RawDataCollection = cms.InputTag( "rawDataCollector" )
)
"""

if not 'hltGetConditions' in self.data:
# add hltGetConditions
text += """
%(process)s.hltGetConditions = cms.EDAnalyzer( 'EventSetupRecordDataGetter',
verbose = cms.untracked.bool( False ),
toGet = cms.VPSet( )
)
"""

if not 'hltBoolFalse' in self.data:
# add hltBoolFalse
text += """
%(process)s.hltBoolFalse = cms.EDFilter( "HLTBool",
result = cms.bool( False )
)
"""

# add the definition of HLTriggerFirstPath
# FIXME in a cff, should also update the HLTSchedule
text += """
%(process)s.HLTriggerFirstPath = cms.Path( %(process)s.hltGetRaw + %(process)s.hltGetConditions + %(process)s.hltBoolFalse )
"""
self.data = re.sub(r'.*cms\.(End)?Path.*', text + r'\g<0>', self.data, 1)


# instrument the menu with the Service, EDProducer and EndPath needed for timing studies
# FIXME in a cff, should also update the HLTSchedule
if self.config.timing:
self.data += """
# instrument the menu with the modules and EndPath needed for timing studies
"""

self.data += '\n# configure the FastTimerService\n'
if not 'FastTimerService' in self.data:
self.loadCff('HLTrigger.Timer.FastTimerService_cfi')
self.loadCff('HLTrigger.Timer.FastTimerService_cfi')

self.data += """# print a text summary at the end of the job
%(process)s.FastTimerService.printEventSummary = False
%(process)s.FastTimerService.printRunSummary = False
%(process)s.FastTimerService.printJobSummary = True

# enable DQM plots
%(process)s.FastTimerService.enableDQM = True

# disable per-module DQM plots
%(process)s.FastTimerService.enableDQMbyModule = False
# enable per-path DQM plots (starting with CMSSW 9.2.3-patch2)
%(process)s.FastTimerService.enableDQMbyPath = True

# enable per-module DQM plots
%(process)s.FastTimerService.enableDQMbyModule = True

# enable per-event DQM plots by lumisection
# enable per-event DQM plots vs lumisection
%(process)s.FastTimerService.enableDQMbyLumiSection = True
%(process)s.FastTimerService.dqmLumiSectionsRange = 2500

# set the time resolution of the DQM plots
%(process)s.FastTimerService.dqmTimeRange = 1000.
%(process)s.FastTimerService.dqmTimeResolution = 5.
%(process)s.FastTimerService.dqmPathTimeRange = 100.
%(process)s.FastTimerService.dqmPathTimeResolution = 0.5
%(process)s.FastTimerService.dqmModuleTimeRange = 40.
%(process)s.FastTimerService.dqmModuleTimeResolution = 0.2
%(process)s.FastTimerService.dqmTimeRange = 2000.
%(process)s.FastTimerService.dqmTimeResolution = 10.
%(process)s.FastTimerService.dqmPathTimeRange = 1000.
%(process)s.FastTimerService.dqmPathTimeResolution = 5.
%(process)s.FastTimerService.dqmModuleTimeRange = 200.
%(process)s.FastTimerService.dqmModuleTimeResolution = 1.

# set the base DQM folder for the plots
%(process)s.FastTimerService.dqmPath = 'HLT/TimerService'
%(process)s.FastTimerService.enableDQMbyProcesses = True
%(process)s.FastTimerService.enableDQMbyProcesses = False
"""


Expand Down Expand Up @@ -769,7 +734,6 @@ def buildPathList(self):

# drop unwanted paths for profiling (and timing studies)
if self.config.profiling:
paths.append( "-HLTriggerFirstPath" )
paths.append( "-HLTAnalyzerEndpath" )

# this should never be in any dump (nor online menu)
Expand Down