Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-03 22:28:24

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process('HLT')
0004 
0005 # define the Prescaler service, and set the scale factors
0006 process.PrescaleService = cms.Service('PrescaleService',
0007     prescaleTable = cms.VPSet(
0008         cms.PSet(
0009             pathName  = cms.string('Path_1'),
0010             prescales = cms.vuint32( 2 )
0011         ),
0012         cms.PSet(
0013             pathName  = cms.string('Path_2'),
0014             prescales = cms.vuint32( 3 )
0015         ),
0016         cms.PSet(
0017             pathName  = cms.string('Path_3'),
0018             prescales = cms.vuint32( 5 )
0019         )
0020     ),
0021     lvl1Labels = cms.vstring('any'),
0022     lvl1DefaultLabel = cms.string('any')
0023 )    
0024 
0025 # load conditions from the global tag
0026 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0027 from Configuration.AlCa.GlobalTag import GlobalTag
0028 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0029 
0030 # define an empty source, and ask for 100 events
0031 process.source = cms.Source('EmptySource')
0032 
0033 process.maxEvents = cms.untracked.PSet(
0034     input = cms.untracked.int32(1000)
0035 )
0036 
0037 # define 3 prescalers, one per path
0038 process.scale_1 = cms.EDFilter('HLTPrescaler')
0039 process.scale_2 = cms.EDFilter('HLTPrescaler')
0040 process.scale_3 = cms.EDFilter('HLTPrescaler')
0041 process.fail    = cms.EDFilter('HLTBool', result = cms.bool(False))
0042 process.success = cms.EDFilter('HLTBool', result = cms.bool(True))
0043 
0044 process.Path_1  = cms.Path(process.scale_1)
0045 process.Path_2  = cms.Path(process.scale_2)
0046 process.Path_3  = cms.Path(process.scale_3)
0047 process.AlwaysTrue    = cms.Path(process.success)
0048 process.AlwaysFalse   = cms.Path(process.fail)
0049 process.L1_Path = cms.Path(process.success)
0050 
0051 # define and EndPath to analyze all other path results
0052 process.hltTrigReport = cms.EDAnalyzer( 'HLTrigReport',
0053     HLTriggerResults = cms.InputTag( 'TriggerResults','','HLT' )
0054 )
0055 process.HLTAnalyzerEndpath = cms.EndPath( process.hltTrigReport )
0056 
0057 # define the PoolOutputModule
0058 process.poolOutput = cms.OutputModule('PoolOutputModule',
0059     fileName = cms.untracked.string('file:trigger.root')
0060 )
0061 process.output = cms.EndPath(process.poolOutput)