Skip to content

Commit

Permalink
Merge pull request #32961 from fwyzard/Update_HLT_customisations_11.3.x
Browse files Browse the repository at this point in the history
Extend the functionality of the hltGetConfiguration --hilton option
  • Loading branch information
cmsbuild committed Feb 24, 2021
2 parents f17886c + c16d9d4 commit 0232339
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions HLTrigger/Configuration/python/Tools/confdb.py
Expand Up @@ -86,7 +86,9 @@ def getRawConfigurationFromDB(self):
args = ['--runNumber', self.config.menu.run]
else:
args = ['--configName', self.config.menu.name ]
args.append('--noedsources')
if not self.config.hilton:
# keep the original Source when running on Hilton
args.append('--noedsources')
for key, vals in six.iteritems(self.options):
if vals:
args.extend(('--'+key, ','.join(vals)))
Expand Down Expand Up @@ -181,6 +183,9 @@ def specificCustomize(self):
from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
fragment = customizeHLTforAll(fragment,"%s")
""" % (self.config.type)
elif self.config.hilton:
# do not apply the STORM-specific customisation
pass
else:
if self.config.type=="Fake":
prefix = "run1"
Expand Down Expand Up @@ -232,6 +237,7 @@ def specificCustomize(self):
self.data += "from "+customiseValues[0]+" import "+customiseValues[1]+"\n"
self.data += "process = "+customiseValues[1]+"(process)\n"


# customize the configuration according to the options
def customize(self):

Expand Down Expand Up @@ -268,7 +274,7 @@ def customize(self):

if self.config.fragment:
self.data += """
# dummyfy hltGetConditions in cff's
# dummify hltGetConditions in cff's
if 'hltGetConditions' in %(dict)s and 'HLTriggerFirstPath' in %(dict)s :
%(process)s.hltDummyConditions = cms.EDFilter( "HLTBool",
result = cms.bool( True )
Expand Down Expand Up @@ -326,7 +332,6 @@ def addGlobalOptions(self):
wantSummary = cms.untracked.bool( True ),
numberOfThreads = cms.untracked.uint32( 4 ),
numberOfStreams = cms.untracked.uint32( 0 ),
sizeOfStackForThreadsInKB = cms.untracked.uint32( 10*1024 )
)
"""

Expand Down Expand Up @@ -460,12 +465,13 @@ def runL1Emulator(self):
self.data += text

def overrideOutput(self):
# override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
self.data = re.sub(
r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
r'%(process)s.hltOutput\2 = cms.OutputModule( "PoolOutputModule",\n fileName = cms.untracked.string( "output\2.root" ),\n fastCloning = cms.untracked.bool( False ),\n dataset = cms.untracked.PSet(\n filterName = cms.untracked.string( "" ),\n dataTier = cms.untracked.string( "RAW" )\n ),',
self.data
)
# if not runnign on Hilton, override the "online" ShmStreamConsumer output modules with "offline" PoolOutputModule's
if not self.config.hilton:
self.data = re.sub(
r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
r'%(process)s.hltOutput\2 = cms.OutputModule( "PoolOutputModule",\n fileName = cms.untracked.string( "output\2.root" ),\n fastCloning = cms.untracked.bool( False ),\n dataset = cms.untracked.PSet(\n filterName = cms.untracked.string( "" ),\n dataTier = cms.untracked.string( "RAW" )\n ),',
self.data
)

if not self.config.fragment and self.config.output == 'minimal':
# add a single output to keep the TriggerResults and TriggerEvent
Expand Down Expand Up @@ -541,11 +547,12 @@ def updateMessageLogger(self):
# request summary informations from the MessageLogger
self.data += """
if 'MessageLogger' in %(dict)s:
%(process)s.MessageLogger.TriggerSummaryProducerAOD=cms.untracked.PSet()
%(process)s.MessageLogger.L1GtTrigReport=cms.untracked.PSet()
%(process)s.MessageLogger.L1TGlobalSummary=cms.untracked.PSet()
%(process)s.MessageLogger.HLTrigReport=cms.untracked.PSet()
%(process)s.MessageLogger.FastReport=cms.untracked.PSet()
%(process)s.MessageLogger.TriggerSummaryProducerAOD = cms.untracked.PSet()
%(process)s.MessageLogger.L1GtTrigReport = cms.untracked.PSet()
%(process)s.MessageLogger.L1TGlobalSummary = cms.untracked.PSet()
%(process)s.MessageLogger.HLTrigReport = cms.untracked.PSet()
%(process)s.MessageLogger.FastReport = cms.untracked.PSet()
%(process)s.MessageLogger.ThroughputService = cms.untracked.PSet()
"""


Expand Down Expand Up @@ -852,6 +859,10 @@ def expand_filenames(self, input):
return files

def build_source(self):
if self.config.hilton:
# use the DAQ source
return

if self.config.input:
# if a dataset or a list of input files was given, use it
self.source = self.expand_filenames(self.config.input)
Expand Down

0 comments on commit 0232339

Please sign in to comment.