7 from pipe
import pipe
as _pipe
8 from options
import globalTag
9 from itertools
import islice
12 i = iterator.__iter__()
14 l =
list(islice(i, n))
41 if self.config.fragment:
42 self.
labels[
'process'] =
'fragment.'
43 self.
labels[
'dict'] =
'fragment.__dict__'
45 self.
labels[
'process'] =
'process.'
46 self.
labels[
'dict'] =
'process.__dict__'
48 if self.config.online:
49 self.
labels[
'connect'] =
'frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)'
51 self.
labels[
'connect'] =
'frontier://FrontierProd'
53 if self.config.prescale
and (self.config.prescale.lower() !=
'none'):
54 self.
labels[
'prescale'] = self.config.prescale
57 from confdbOfflineConverter
import OfflineConverter
58 self.
converter = OfflineConverter(version = self.config.menu.version, database = self.config.menu.database)
66 if self.config.menu.run:
67 args = [
'--runNumber', self.config.menu.run]
69 args = [
'--configName', self.config.menu.name ]
70 args.append(
'--noedsources')
71 for key, vals
in self.options.iteritems():
73 args.extend((
'--'+key,
','.
join(vals)))
75 data, err = self.converter.query( *args )
76 if 'ERROR' in err
or 'Exhausted Resultset' in err
or 'CONFIG_NOT_FOUND' in err:
77 sys.stderr.write(
"%s: error while retrieving the HLT menu\n\n" % os.path.basename(sys.argv[0]))
78 sys.stderr.write(err +
"\n\n")
84 if self.config.menu.run:
85 args = [
'--runNumber', self.config.menu.run]
87 args = [
'--configName', self.config.menu.name]
97 data, err = self.converter.query( *args )
98 if 'ERROR' in err
or 'Exhausted Resultset' in err
or 'CONFIG_NOT_FOUND' in err:
99 sys.stderr.write(
"%s: error while retrieving the list of paths from the HLT menu\n\n" % os.path.basename(sys.argv[0]))
100 sys.stderr.write(err +
"\n\n")
102 filter = re.compile(
r' *= *cms.(End)?Path.*')
103 paths = [ filter.sub(
'', line)
for line
in data.splitlines()
if filter.search(line) ]
118 filter = re.compile(
r'^' + glob.replace(
'?',
'.').
replace(
'*',
'.*').
replace(
'[!',
'[^') +
r'$')
119 matches.extend( negate + element
for element
in collection
if filter.match(element) )
128 for element
in elements:
129 if element[0] ==
'-':
130 result.add( element )
132 result.discard(
'-' + element )
133 return sorted( element
for element
in result )
140 for element
in elements:
141 if element[0] ==
'-':
142 result.discard( element[1:] )
144 result.add( element )
145 return sorted( element
for element
in result )
151 if self.config.fragment:
152 self.
data = re.sub(
r'\bprocess\b',
'fragment', self.
data )
153 self.
data = re.sub(
r'\bProcess\b',
'ProcessFragment', self.
data )
160 if self.config.fragment:
162 # add specific customizations
163 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
164 fragment = customizeHLTforAll(fragment)
167 if self.config.type==
"Fake":
171 _gtData =
"auto:"+prefix+
"_hlt_"+self.config.type
172 _gtMc =
"auto:"+prefix+
"_mc_" +self.config.type
174 # add specific customizations
176 _customInfo['menuType' ]= "%s"
177 _customInfo['globalTags']= {}
178 _customInfo['globalTags'][True ] = "%s"
179 _customInfo['globalTags'][False] = "%s"
180 _customInfo['inputFiles']={}
181 _customInfo['inputFiles'][True] = "file:RelVal_Raw_%s_DATA.root"
182 _customInfo['inputFiles'][False] = "file:RelVal_Raw_%s_MC.root"
183 _customInfo['maxEvents' ]= %s
184 _customInfo['globalTag' ]= "%s"
185 _customInfo['inputFile' ]= %s
186 _customInfo['realData' ]= %s
187 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
188 process = customizeHLTforAll(process,_customInfo)
189 """ % (self.config.type,_gtData,_gtMc,self.config.type,self.config.type,self.config.events,self.config.globaltag,self.
source,self.config.data)
196 if not self.config.fragment:
200 if self.config.type
in (
'HIon', ):
202 if not self.config.fragment:
203 self._fix_parameter( type =
'InputTag', value =
'rawDataCollector', replace =
'rawDataRepacker')
230 self.instrumentOpenMode()
233 self.instrumentErrorEventType()
236 self.instrumentTiming()
277 if self.config.fragment:
279 # dummyfy hltGetConditions in cff's
280 if 'hltGetConditions' in %(dict)s and 'HLTriggerFirstPath' in %(dict)s :
281 %(process)shltDummyConditions = cms.EDFilter( "HLTBool",
282 result = cms.bool( True )
284 %(process)sHLTriggerFirstPath.replace(%(process)shltGetConditions,%(process)shltDummyConditions)
290 self.overrideProcessName()
293 self.overrideOutput()
296 self.addGlobalOptions()
299 self.overrideGlobalTag()
302 self.overrideL1MenuXml()
305 self.switchToNewL1Skim()
311 self.updateMessageLogger()
343 # limit the number of events to be processed
344 %%(process)smaxEvents = cms.untracked.PSet(
345 input = cms.untracked.int32( %d )
347 """ % self.config.events
349 if not self.config.profiling:
351 # enable the TrigReport and TimeReport
352 %(process)soptions = cms.untracked.PSet(
353 wantSummary = cms.untracked.bool( True )
360 name: parameter name (optional)
361 type: parameter type (look for tracked and untracked variants)
362 value: original value
363 replace: replacement value
367 r'%(name)s = cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
368 r'%(name)s = cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
372 r'cms(?P<tracked>(?:\.untracked)?)\.%(type)s\( (?P<quote>["\']?)%(value)s(?P=quote)' % args,
373 r'cms\g<tracked>.%(type)s( \g<quote>%(replace)s\g<quote>' % args,
379 if self.options[
'paths']:
380 if self.options[
'paths'][0][0] ==
'-':
382 for minuspath
in self.options[
'paths']:
384 self.data = re.sub(
r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path,
'', self.data)
387 for path
in self.all_paths:
388 if path
not in self.options[
'paths']:
389 self.data = re.sub(
r' cms.PSet\( pathName = cms.string\( "%s" \),\n prescales = cms.vuint32\( .* \)\n \),?\n' % path,
'', self.data)
391 if self.config.prescale
and (self.config.prescale.lower() !=
'none'):
394 # force the use of a specific HLT prescale column
395 if 'PrescaleService' in %(dict)s:
396 %(process)sPrescaleService.forceDefault = True
397 %(process)sPrescaleService.lvl1DefaultLabel = '%(prescale)s'
404 filters = [ match[1]
for match
in re.findall(
r'(process\.)?\b(\w+) = cms.EDFilter', self.data) ]
405 re_sequence = re.compile(
r'cms\.(Path|Sequence)\((.*)\)' )
407 self.data = re_sequence.sub(
lambda line: re.sub(
r'cms\.ignore *\( *((process\.)?\b(\w+)) *\)',
r'\1', line.group(0) ), self.data )
408 self.data = re_sequence.sub(
lambda line: re.sub(
r'~',
'', line.group(0) ), self.data )
410 for some
in splitter(filters, 1000):
411 re_filters = re.compile(
r'\b((process\.)?(' +
r'|'.
join(some) +
r'))\b' )
412 self.data = re_sequence.sub(
lambda line: re_filters.sub(
r'cms.ignore( \1 )', line.group(0) ), self.data )
416 if self.config.errortype:
418 self._fix_parameter(name =
'SelectedTriggerType', type =
'int32', value =
'1', replace =
'0')
419 self._fix_parameter(name =
'SelectedTriggerType', type =
'int32', value =
'2', replace =
'0')
420 self._fix_parameter(name =
'SelectedTriggerType', type =
'int32', value =
'3', replace =
'0')
436 # override the GlobalTag, connection string and pfnPrefix
437 if 'GlobalTag' in %(dict)s:
441 if not self.config.data
and not self.config.globaltag:
442 if self.config.type
in globalTag:
443 self.config.globaltag = globalTag[self.config.type]
445 self.config.globaltag = globalTag[
'GRun']
448 if self.config.l1.override:
449 self.config.l1.record =
'L1GtTriggerMenuRcd'
450 self.config.l1.label =
''
451 self.config.l1.tag = self.config.l1.override
452 if not self.config.l1.connect:
453 self.config.l1.connect =
'%(connect)s/CMS_CONDITIONS'
454 self.config.l1cond =
'%(tag)s,%(record)s,%(connect)s' % self.config.l1.__dict__
456 self.config.l1cond =
None
458 if self.config.globaltag
or self.config.l1cond:
459 text +=
" from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag as customiseGlobalTag\n"
460 text +=
" %(process)sGlobalTag = customiseGlobalTag(%(process)sGlobalTag"
461 if self.config.globaltag:
462 text +=
", globaltag = %s" % repr(self.config.globaltag)
463 if self.config.l1cond:
464 text +=
", conditions = %s" % repr(self.config.l1cond)
467 text +=
""" %(process)sGlobalTag.connect = '%(connect)s/CMS_CONDITIONS'
468 %(process)sGlobalTag.pfnPrefix = cms.untracked.string('%(connect)s/')
469 for pset in process.GlobalTag.toGet.value():
470 pset.connect = pset.connect.value().replace('frontier://FrontierProd/', '%(connect)s/')
471 # fix for multi-run processing
472 %(process)sGlobalTag.RefreshEachRun = cms.untracked.bool( False )
473 %(process)sGlobalTag.ReconnectEachRun = cms.untracked.bool( False )
479 if self.config.l1Xml.XmlFile:
481 # override the L1 menu from an Xml file
482 %%(process)sl1GtTriggerMenuXml = cms.ESProducer("L1GtTriggerMenuXmlProducer",
483 TriggerMenuLuminosity = cms.string('%(LumiDir)s'),
484 DefXmlFile = cms.string('%(XmlFile)s'),
485 VmeXmlFile = cms.string('')
487 %%(process)sL1GtTriggerMenuRcdSource = cms.ESSource("EmptyESSource",
488 recordName = cms.string('L1GtTriggerMenuRcd'),
489 iovIsRunNotTime = cms.bool(True),
490 firstValid = cms.vuint32(1)
492 %%(process)ses_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
494 self.data += text % self.config.l1Xml.__dict__
498 if not self.config.emulator:
501 if self.config.emulator !=
'gt':
507 # run the L1 GT emulator, then repack the data into a new RAW collection, to be used by the HLT
509 if self.config.fragment:
511 text +=
"import Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff\n"
513 text +=
"process.load( 'Configuration.StandardSequences.SimL1EmulatorRepack_GT_cff' )\n"
515 if not 'hltBoolFalse' in self.data:
518 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
519 result = cms.bool( False )
522 text +=
"process.L1Emulator = cms.Path( process.SimL1Emulator + process.hltBoolFalse )\n\n"
524 self.data = re.sub(
r'.*cms\.(End)?Path.*', text +
r'\g<0>', self.data, 1)
529 if self.config.emulator:
538 emulator[
'RawToDigi'] =
'RawToDigi_Data_cff'
540 emulator[
'RawToDigi'] =
'RawToDigi_cff'
542 if self.config.emulator ==
'gt':
543 emulator[
'CustomL1T'] =
'customiseL1GtEmulatorFromRaw'
544 emulator[
'CustomHLT'] =
'switchToSimGtDigis'
545 elif self.config.emulator ==
'gct,gt':
546 emulator[
'CustomL1T'] =
'customiseL1CaloAndGtEmulatorsFromRaw'
547 emulator[
'CustomHLT'] =
'switchToSimGctGtDigis'
548 elif self.config.emulator ==
'gmt,gt':
550 emulator[
'CustomL1T'] =
'customiseL1MuonAndGtEmulatorsFromRaw'
551 emulator[
'CustomHLT'] =
'switchToSimGmtGtDigis'
552 elif self.config.emulator
in (
'gmt,gct,gt',
'gct,gmt,gt',
'all'):
553 emulator[
'CustomL1T'] =
'customiseL1EmulatorFromRaw'
554 emulator[
'CustomHLT'] =
'switchToSimGmtGctGtDigis'
555 elif self.config.emulator
in (
'stage1,gt'):
556 emulator[
'CustomL1T'] =
'customiseL1EmulatorFromRaw'
557 emulator[
'CustomHLT'] =
'switchToSimStage1Digis'
560 emulator[
'CustomL1T'] =
'customiseL1EmulatorFromRaw'
561 emulator[
'CustomHLT'] =
'switchToSimGmtGctGtDigis'
564 # customize the L1 emulator to run %(CustomL1T)s with HLT to %(CustomHLT)s
565 process.load( 'Configuration.StandardSequences.%(RawToDigi)s' )
566 process.load( 'Configuration.StandardSequences.SimL1Emulator_cff' )
567 import L1Trigger.Configuration.L1Trigger_custom
571 if (self.config.emulator).
find(
"stage1")>-1:
574 import L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT
575 process = L1Trigger.L1TCalorimeter.L1TCaloStage1_customForHLT.%(CustomL1T)s( process )
580 process = L1Trigger.Configuration.L1Trigger_custom.%(CustomL1T)s( process )
585 process = L1Trigger.Configuration.L1Trigger_custom.customiseResetPrescalesAndMasks( process )
586 # customize the HLT to use the emulated results
587 import HLTrigger.Configuration.customizeHLTforL1Emulator
588 process = HLTrigger.Configuration.customizeHLTforL1Emulator.switchToL1Emulator( process )
589 process = HLTrigger.Configuration.customizeHLTforL1Emulator.%(CustomHLT)s( process )
594 if self.config.l1skim:
596 # Customize the menu to use information from new L1 emulator in the L1 skim files
597 process.hltL2MuonSeeds.GMTReadoutCollection = cms.InputTag("simGmtDigis::L1SKIM" )
598 process.hltL1extraParticles.muonSource = cms.InputTag("simGmtDigis::L1SKIM" )
599 for module in process.__dict__.itervalues():
600 if isinstance(module, cms._Module):
601 for parameter in module.__dict__.itervalues():
602 if isinstance(parameter, cms.InputTag):
603 if parameter.moduleLabel == 'hltGtDigis':
604 parameter.moduleLabel = "gtDigisFromSkim"
605 elif parameter.moduleLabel == 'hltL1GtObjectMap':
606 parameter.moduleLabel = "gtDigisFromSkim"
607 elif parameter.moduleLabel == 'hltGctDigis':
608 parameter.moduleLabel ="simCaloStage1LegacyFormatDigis"
614 r'\b(process\.)?hltOutput(\w+) *= *cms\.OutputModule\( *"ShmStreamConsumer" *,',
615 r'%(process)shltOutput\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 ),',
619 if not self.config.fragment
and self.config.output ==
'full':
622 # add a single "keep *" output
623 %(process)shltOutputFULL = cms.OutputModule( "PoolOutputModule",
624 fileName = cms.untracked.string( "outputFULL.root" ),
625 fastCloning = cms.untracked.bool( False ),
626 dataset = cms.untracked.PSet(
627 dataTier = cms.untracked.string( 'RECO' ),
628 filterName = cms.untracked.string( '' )
630 outputCommands = cms.untracked.vstring( 'keep *' )
632 %(process)sFULLOutput = cms.EndPath( %(process)shltOutputFULL )
638 if self.config.name
is None:
642 self.config.name = self.config.name.replace(
"_",
"")
645 self.data = re.compile(
r'^(process\s*=\s*cms\.Process\(\s*' + quote +
r')\w+(' + quote +
r'\s*\).*)$', re.MULTILINE).sub(
r'\1%s\2' % self.config.name, self.data, 1)
649 # adapt HLT modules to the correct process name
650 if 'hltTrigReport' in %%(dict)s:
651 %%(process)shltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
653 if 'hltPreExpressCosmicsOutputSmart' in %%(dict)s:
654 %%(process)shltPreExpressCosmicsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
656 if 'hltPreExpressOutputSmart' in %%(dict)s:
657 %%(process)shltPreExpressOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
659 if 'hltPreDQMForHIOutputSmart' in %%(dict)s:
660 %%(process)shltPreDQMForHIOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
662 if 'hltPreDQMForPPOutputSmart' in %%(dict)s:
663 %%(process)shltPreDQMForPPOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
665 if 'hltPreHLTDQMResultsOutputSmart' in %%(dict)s:
666 %%(process)shltPreHLTDQMResultsOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
668 if 'hltPreHLTDQMOutputSmart' in %%(dict)s:
669 %%(process)shltPreHLTDQMOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
671 if 'hltPreHLTMONOutputSmart' in %%(dict)s:
672 %%(process)shltPreHLTMONOutputSmart.hltResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
674 if 'hltDQMHLTScalers' in %%(dict)s:
675 %%(process)shltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults', '', '%(name)s' )
676 %%(process)shltDQMHLTScalers.processname = '%(name)s'
678 if 'hltDQML1SeedLogicScalers' in %%(dict)s:
679 %%(process)shltDQML1SeedLogicScalers.processname = '%(name)s'
680 """ % self.config.__dict__
686 if 'MessageLogger' in %(dict)s:
687 %(process)sMessageLogger.categories.append('TriggerSummaryProducerAOD')
688 %(process)sMessageLogger.categories.append('L1GtTrigReport')
689 %(process)sMessageLogger.categories.append('HLTrigReport')
690 %(process)sMessageLogger.categories.append('FastReport')
698 if 'GlobalTag' in %%(dict)s:
700 for condition
in conditions:
701 self.data +=
""" %%(process)sGlobalTag.toGet.append(
703 record = cms.string( '%(record)s' ),
704 tag = cms.string( '%(tag)s' ),
705 label = cms.untracked.string( '%(label)s' ),
706 connect = cms.untracked.string( '%(connect)s' )
714 if self.config.fragment:
715 return 'from %s import *\n' % module
717 return 'process.load( "%s" )\n' % module
720 self.data += self.loadCffCommand(module)
725 self.data +=
"if '%s' in %%(dict)s:\n" % module
726 for (parameter, value)
in parameters:
727 self.data +=
" %%(process)s%s.%s = %s\n" % (module, parameter, value)
732 if self.config.profiling:
736 if not 'hltGetRaw' in self.data:
739 %(process)shltGetRaw = cms.EDAnalyzer( "HLTGetRaw",
740 RawDataCollection = cms.InputTag( "rawDataCollector" )
744 if not 'hltGetConditions' in self.data:
747 %(process)shltGetConditions = cms.EDAnalyzer( 'EventSetupRecordDataGetter',
748 verbose = cms.untracked.bool( False ),
753 if not 'hltBoolFalse' in self.data:
756 %(process)shltBoolFalse = cms.EDFilter( "HLTBool",
757 result = cms.bool( False )
764 %(process)sHLTriggerFirstPath = cms.Path( %(process)shltGetRaw + %(process)shltGetConditions + %(process)shltBoolFalse )
766 self.data = re.sub(
r'.*cms\.(End)?Path.*', text +
r'\g<0>', self.data, 1)
771 if self.config.timing:
773 # instrument the menu with the modules and EndPath needed for timing studies
776 if not 'FastTimerService' in self.data:
777 self.data +=
'\n# configure the FastTimerService\n'
778 self.loadCff(
'HLTrigger.Timer.FastTimerService_cfi')
780 self.data +=
'\n# configure the FastTimerService\n'
782 self.data +=
"""# this is currently ignored in CMSSW 7.x, always using the real time clock
783 %(process)sFastTimerService.useRealTimeClock = True
784 # enable specific features
785 %(process)sFastTimerService.enableTimingPaths = True
786 %(process)sFastTimerService.enableTimingModules = True
787 %(process)sFastTimerService.enableTimingExclusive = True
788 # print a text summary at the end of the job
789 %(process)sFastTimerService.enableTimingSummary = True
790 # skip the first path (disregard the time spent loading event and conditions data)
791 %(process)sFastTimerService.skipFirstPath = True
793 %(process)sFastTimerService.enableDQM = True
794 # enable most per-path DQM plots
795 %(process)sFastTimerService.enableDQMbyPathActive = True
796 %(process)sFastTimerService.enableDQMbyPathTotal = True
797 %(process)sFastTimerService.enableDQMbyPathOverhead = False
798 %(process)sFastTimerService.enableDQMbyPathDetails = True
799 %(process)sFastTimerService.enableDQMbyPathCounters = True
800 %(process)sFastTimerService.enableDQMbyPathExclusive = True
801 # disable per-module DQM plots
802 %(process)sFastTimerService.enableDQMbyModule = False
803 %(process)sFastTimerService.enableDQMbyModuleType = False
804 # enable per-event DQM sumary plots
805 %(process)sFastTimerService.enableDQMSummary = True
806 # enable per-event DQM plots by lumisection
807 %(process)sFastTimerService.enableDQMbyLumiSection = True
808 %(process)sFastTimerService.dqmLumiSectionsRange = 2500
809 # set the time resolution of the DQM plots
810 %(process)sFastTimerService.dqmTimeRange = 1000.
811 %(process)sFastTimerService.dqmTimeResolution = 5.
812 %(process)sFastTimerService.dqmPathTimeRange = 100.
813 %(process)sFastTimerService.dqmPathTimeResolution = 0.5
814 %(process)sFastTimerService.dqmModuleTimeRange = 40.
815 %(process)sFastTimerService.dqmModuleTimeResolution = 0.2
816 # set the base DQM folder for the plots
817 %(process)sFastTimerService.dqmPath = 'HLT/TimerService'
818 %(process)sFastTimerService.enableDQMbyProcesses = True
823 if not self.config.hilton:
825 if 'hltDQMFileSaver' in self.data:
826 self.data = re.sub(
r'\b(process\.)?hltDQMFileSaver \+ ',
'', self.data)
827 self.data = re.sub(
r' \+ \b(process\.)?hltDQMFileSaver',
'', self.data)
828 self.data = re.sub(
r'\b(process\.)?hltDQMFileSaver',
'', self.data)
831 dqmstore =
"\n# load the DQMStore and DQMRootOutputModule\n"
832 dqmstore += self.loadCffCommand(
'DQMServices.Core.DQMStore_cfi')
833 dqmstore +=
"%(process)sDQMStore.enableMultiThread = True\n"
835 %(process)sdqmOutput = cms.OutputModule("DQMRootOutputModule",
836 fileName = cms.untracked.string("DQMIO.root")
840 empty_path = re.compile(
r'.*\b(process\.)?DQMOutput = cms\.EndPath\( *\).*')
841 other_path = re.compile(
r'(.*\b(process\.)?DQMOutput = cms\.EndPath\()(.*)')
842 if empty_path.search(self.data):
844 self.data = empty_path.sub(dqmstore +
'\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n', self.data)
845 elif other_path.search(self.data):
847 self.data = other_path.sub(dqmstore +
r'\g<1> %(process)sdqmOutput +\g<3>', self.data)
850 self.data += dqmstore
851 self.data +=
'\n%(process)sDQMOutput = cms.EndPath( %(process)sdqmOutput )\n'
856 sys.stderr.write(
'Path selection:\n')
858 sys.stderr.write(
'\t%s\n' % path)
859 sys.stderr.write(
'\n\n')
862 self.all_paths = self.getPathList()
864 if self.config.paths:
866 paths = self.config.paths.split(
',')
871 if self.config.fragment
or self.config.output
in (
'none',
'full'):
873 if self.config.paths:
878 paths.append(
"-*Output" )
879 elif self.config.output ==
'minimal':
881 if self.config.paths:
882 paths.append(
"HLTDQMResultsOutput" )
884 paths.append(
"-*Output" )
885 paths.append(
"HLTDQMResultsOutput" )
888 if self.config.paths:
889 paths.append(
"*Output" )
894 if self.config.profiling:
895 paths.append(
"-HLTriggerFirstPath" )
896 paths.append(
"-HLTAnalyzerEndpath" )
899 paths.append(
"-OfflineOutput" )
902 paths = self.expandWildcards(paths, self.all_paths)
904 if self.config.paths:
906 self.options[
'paths'] = self.consolidatePositiveList(paths)
907 if not self.options[
'paths']:
908 raise RuntimeError(
'Error: option "--paths %s" does not select any valid paths' % self.config.paths)
911 self.options[
'paths'] = self.consolidateNegativeList(paths)
916 self.options[
'services'].
append(
"-DQM" )
917 self.options[
'services'].
append(
"-FUShmDQMOutputService" )
918 self.options[
'services'].
append(
"-MicroStateService" )
919 self.options[
'services'].
append(
"-ModuleWebRegistry" )
920 self.options[
'services'].
append(
"-TimeProfilerService" )
924 if not self.config.hilton:
925 self.options[
'services'].
append(
"-EvFDaqDirector" )
926 self.options[
'services'].
append(
"-FastMonitoringService" )
927 self.options[
'services'].
append(
"-DQMStore" )
928 self.options[
'modules'].
append(
"-hltDQMFileSaver" )
930 if self.config.fragment:
932 self.options[
'essources'].
append(
"-GlobalTag" )
933 self.options[
'essources'].
append(
"-HepPDTESSource" )
934 self.options[
'essources'].
append(
"-XMLIdealGeometryESSource" )
935 self.options[
'essources'].
append(
"-eegeom" )
936 self.options[
'essources'].
append(
"-es_hardcode" )
937 self.options[
'essources'].
append(
"-magfield" )
939 self.options[
'esmodules'].
append(
"-AutoMagneticFieldESProducer" )
940 self.options[
'esmodules'].
append(
"-SlaveField0" )
941 self.options[
'esmodules'].
append(
"-SlaveField20" )
942 self.options[
'esmodules'].
append(
"-SlaveField30" )
943 self.options[
'esmodules'].
append(
"-SlaveField35" )
944 self.options[
'esmodules'].
append(
"-SlaveField38" )
945 self.options[
'esmodules'].
append(
"-SlaveField40" )
946 self.options[
'esmodules'].
append(
"-VBF0" )
947 self.options[
'esmodules'].
append(
"-VBF20" )
948 self.options[
'esmodules'].
append(
"-VBF30" )
949 self.options[
'esmodules'].
append(
"-VBF35" )
950 self.options[
'esmodules'].
append(
"-VBF38" )
951 self.options[
'esmodules'].
append(
"-VBF40" )
952 self.options[
'esmodules'].
append(
"-CSCGeometryESModule" )
953 self.options[
'esmodules'].
append(
"-CaloGeometryBuilder" )
954 self.options[
'esmodules'].
append(
"-CaloTowerHardcodeGeometryEP" )
955 self.options[
'esmodules'].
append(
"-CastorHardcodeGeometryEP" )
956 self.options[
'esmodules'].
append(
"-DTGeometryESModule" )
957 self.options[
'esmodules'].
append(
"-EcalBarrelGeometryEP" )
958 self.options[
'esmodules'].
append(
"-EcalElectronicsMappingBuilder" )
959 self.options[
'esmodules'].
append(
"-EcalEndcapGeometryEP" )
960 self.options[
'esmodules'].
append(
"-EcalLaserCorrectionService" )
961 self.options[
'esmodules'].
append(
"-EcalPreshowerGeometryEP" )
962 self.options[
'esmodules'].
append(
"-HcalHardcodeGeometryEP" )
963 self.options[
'esmodules'].
append(
"-HcalTopologyIdealEP" )
964 self.options[
'esmodules'].
append(
"-MuonNumberingInitialization" )
965 self.options[
'esmodules'].
append(
"-ParametrizedMagneticFieldProducer" )
966 self.options[
'esmodules'].
append(
"-RPCGeometryESModule" )
967 self.options[
'esmodules'].
append(
"-SiStripGainESProducer" )
968 self.options[
'esmodules'].
append(
"-SiStripRecHitMatcherESProducer" )
969 self.options[
'esmodules'].
append(
"-SiStripQualityESProducer" )
970 self.options[
'esmodules'].
append(
"-StripCPEfromTrackAngleESProducer" )
971 self.options[
'esmodules'].
append(
"-TrackerDigiGeometryESModule" )
972 self.options[
'esmodules'].
append(
"-TrackerGeometricDetESModule" )
973 self.options[
'esmodules'].
append(
"-VolumeBasedMagneticFieldESProducer" )
974 self.options[
'esmodules'].
append(
"-ZdcHardcodeGeometryEP" )
975 self.options[
'esmodules'].
append(
"-hcal_db_producer" )
976 self.options[
'esmodules'].
append(
"-L1GtTriggerMaskAlgoTrigTrivialProducer" )
977 self.options[
'esmodules'].
append(
"-L1GtTriggerMaskTechTrigTrivialProducer" )
978 self.options[
'esmodules'].
append(
"-hltESPEcalTrigTowerConstituentsMapBuilder" )
979 self.options[
'esmodules'].
append(
"-hltESPGlobalTrackingGeometryESProducer" )
980 self.options[
'esmodules'].
append(
"-hltESPMuonDetLayerGeometryESProducer" )
981 self.options[
'esmodules'].
append(
"-hltESPTrackerRecoGeometryESProducer" )
982 self.options[
'esmodules'].
append(
"-trackerTopology" )
984 self.options[
'esmodules'].
append(
"-CaloTowerGeometryFromDBEP" )
985 self.options[
'esmodules'].
append(
"-CastorGeometryFromDBEP" )
986 self.options[
'esmodules'].
append(
"-EcalBarrelGeometryFromDBEP" )
987 self.options[
'esmodules'].
append(
"-EcalEndcapGeometryFromDBEP" )
988 self.options[
'esmodules'].
append(
"-EcalPreshowerGeometryFromDBEP" )
989 self.options[
'esmodules'].
append(
"-HcalGeometryFromDBEP" )
990 self.options[
'esmodules'].
append(
"-ZdcGeometryFromDBEP" )
991 self.options[
'esmodules'].
append(
"-XMLFromDBSource" )
992 self.options[
'esmodules'].
append(
"-sistripconn" )
994 self.options[
'services'].
append(
"-MessageLogger" )
996 self.options[
'psets'].
append(
"-maxEvents" )
997 self.options[
'psets'].
append(
"-options" )
999 if self.config.fragment
or (self.config.prescale
and (self.config.prescale.lower() ==
'none')):
1000 self.options[
'services'].
append(
"-PrescaleService" )
1002 if self.config.fragment
or self.config.timing:
1003 self.options[
'services'].
append(
"-FastTimerService" )
1007 if len(filenames) > 255:
1014 self.data +=
" %s = cms.untracked.vstring%s\n" % (name, token_open)
1015 for line
in filenames:
1016 self.data +=
" '%s',\n" % line
1017 self.data +=
" %s,\n" % (token_close)
1022 if input[0:8] ==
'dataset:':
1023 from dasFileQuery
import dasFileQuery
1029 files = self.config.input.split(
',')
1033 if self.config.input:
1035 self.source = self.expand_filenames(self.config.input)
1036 elif self.config.online:
1038 self.source = [
"file:/tmp/InputCollection.root" ]
1039 elif self.config.data:
1041 self.source = [
"file:RelVal_Raw_%s_DATA.root" % self.config.type ]
1044 self.source = [
"file:RelVal_Raw_%s_MC.root" % self.config.type ]
1046 if self.config.parent:
1048 self.parent = self.expand_filenames(self.config.parent)
1051 %(process)ssource = cms.Source( "PoolSource",
1053 self.append_filenames(
"fileNames", self.source)
1055 self.append_filenames(
"secondaryFileNames", self.parent)
1057 inputCommands = cms.untracked.vstring(
def loadAdditionalConditions
def instrumentErrorEventType
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
def consolidateNegativeList
def consolidatePositiveList
static std::string join(char **cmd)
def getRawConfigurationFromDB
def addGlobalOptions
Disable HF Noise filters in HIon menu if 'hltHfreco' in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( False ) """ else: self.data += """ Enable HF Noise filters in non-HIon menu if 'hltHfreco' in %(dict)s: %(process)shltHfreco.setNoiseFlags = cms.bool( True ) """.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run