Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update of HLTriggerJSONMonitoring for DatasetPaths
- Loading branch information
Showing
4 changed files
with
188 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<test name="testHLTriggerJSONMonitoring" command="testHLTriggerJSONMonitoring.sh"/> |
151 changes: 151 additions & 0 deletions
151
HLTrigger/JSONMonitoring/test/testHLTriggerJSONMonitoring.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("TEST") | ||
process.options.numberOfThreads = 1 | ||
process.options.wantSummary = True | ||
process.maxEvents.input = 100 | ||
|
||
process.source = cms.Source('EmptySource') | ||
|
||
process.datasets = cms.PSet( | ||
TestDatasetX = cms.vstring( | ||
'HLT_TestPathA_v1', | ||
'HLT_TestPathB_v1' | ||
), | ||
TestDatasetY = cms.vstring( | ||
'HLT_TestPathC_v1' | ||
) | ||
) | ||
|
||
process.PrescaleService = cms.Service( "PrescaleService", | ||
lvl1Labels = cms.vstring( | ||
"PSColumn0", | ||
"PSColumn1" | ||
), | ||
lvl1DefaultLabel = cms.string( "PSColumn0" ), | ||
forceDefault = cms.bool( False ), | ||
prescaleTable = cms.VPSet( | ||
cms.PSet( | ||
pathName = cms.string( "HLT_TestPathA_v1" ), | ||
prescales = cms.vuint32( 1, 5 ) | ||
), | ||
cms.PSet( | ||
pathName = cms.string( "HLT_TestPathB_v1" ), | ||
prescales = cms.vuint32( 1, 5 ) | ||
), | ||
cms.PSet( | ||
pathName = cms.string( "HLT_TestPathC_v1" ), | ||
prescales = cms.vuint32( 1, 5 ) | ||
), | ||
cms.PSet( | ||
pathName = cms.string( "Dataset_TestDatasetY" ), | ||
prescales = cms.vuint32( 4, 1 ) | ||
) | ||
) | ||
) | ||
|
||
process.hltPSetMap = cms.EDProducer( "ParameterSetBlobProducer" ) | ||
|
||
process.hltBoolFalse = cms.EDFilter( "HLTBool", | ||
result = cms.bool( False ) | ||
) | ||
|
||
process.hltBoolEnd = cms.EDFilter( "HLTBool", | ||
result = cms.bool( True ) | ||
) | ||
|
||
process.hltTriggerSummaryAOD = cms.EDProducer( "TriggerSummaryProducerAOD", | ||
throw = cms.bool( False ), | ||
processName = cms.string( "@" ), | ||
moduleLabelPatternsToMatch = cms.vstring( 'hlt*' ), | ||
moduleLabelPatternsToSkip = cms.vstring( ) | ||
) | ||
|
||
process.hltTriggerSummaryRAW = cms.EDProducer( "TriggerSummaryProducerRAW", | ||
processName = cms.string( "@" ) | ||
) | ||
|
||
process.hltHLTriggerJSONMonitoring = cms.EDAnalyzer( "HLTriggerJSONMonitoring", | ||
triggerResults = cms.InputTag( 'TriggerResults::@currentProcess' ) | ||
) | ||
|
||
process.hltDatasetTestDatasetX = cms.EDFilter( "TriggerResultsFilter", | ||
usePathStatus = cms.bool( True ), | ||
hltResults = cms.InputTag( "" ), | ||
l1tResults = cms.InputTag( "" ), | ||
l1tIgnoreMaskAndPrescale = cms.bool( False ), | ||
throw = cms.bool( True ), | ||
triggerConditions = cms.vstring( | ||
'HLT_TestPathA_v1 / 50', | ||
'HLT_TestPathB_v1 / 25' | ||
) | ||
) | ||
|
||
process.hltPreDatasetTestDatasetX = cms.EDFilter( "HLTPrescaler", | ||
offset = cms.uint32( 0 ), | ||
L1GtReadoutRecordTag = cms.InputTag( "" ) | ||
) | ||
|
||
process.hltDatasetTestDatasetY = cms.EDFilter( "TriggerResultsFilter", | ||
usePathStatus = cms.bool( True ), | ||
hltResults = cms.InputTag( "" ), | ||
l1tResults = cms.InputTag( "" ), | ||
l1tIgnoreMaskAndPrescale = cms.bool( False ), | ||
throw = cms.bool( True ), | ||
triggerConditions = cms.vstring( | ||
'HLT_TestPathC_v1 / 25' | ||
) | ||
) | ||
|
||
process.hltPreDatasetTestDatasetY = cms.EDFilter( "HLTPrescaler", | ||
offset = cms.uint32( 0 ), | ||
L1GtReadoutRecordTag = cms.InputTag( "" ) | ||
) | ||
|
||
process.hltPreTestPathA = cms.EDFilter( "HLTPrescaler", | ||
offset = cms.uint32( 0 ), | ||
L1GtReadoutRecordTag = cms.InputTag( "" ) | ||
) | ||
|
||
process.hltPreTestPathB = cms.EDFilter( "HLTPrescaler", | ||
offset = cms.uint32( 0 ), | ||
L1GtReadoutRecordTag = cms.InputTag( "" ) | ||
) | ||
|
||
process.hltPreTestPathC = cms.EDFilter( "HLTPrescaler", | ||
offset = cms.uint32( 0 ), | ||
L1GtReadoutRecordTag = cms.InputTag( "" ) | ||
) | ||
|
||
process.HLTDatasetPathBeginSequence = cms.Sequence( ) | ||
|
||
process.HLTBeginSequence = cms.Sequence( ) | ||
|
||
process.HLTEndSequence = cms.Sequence( process.hltBoolEnd ) | ||
|
||
process.HLTriggerFirstPath = cms.Path( process.hltPSetMap + process.hltBoolFalse ) | ||
|
||
process.HLT_TestPathA_v1 = cms.Path( process.HLTBeginSequence + process.hltPreTestPathA + process.HLTEndSequence ) | ||
|
||
process.HLT_TestPathB_v1 = cms.Path( process.HLTBeginSequence + process.hltPreTestPathB + process.HLTEndSequence ) | ||
|
||
process.HLT_TestPathC_v1 = cms.Path( process.HLTBeginSequence + process.hltPreTestPathC + process.HLTEndSequence ) | ||
|
||
process.HLTriggerFinalPath = cms.Path( process.hltTriggerSummaryAOD + process.hltTriggerSummaryRAW + process.hltBoolFalse ) | ||
|
||
process.RatesMonitoring = cms.EndPath( process.hltHLTriggerJSONMonitoring ) | ||
|
||
process.Dataset_TestDatasetX = cms.Path( process.HLTDatasetPathBeginSequence + process.hltDatasetTestDatasetX + process.hltPreDatasetTestDatasetX ) | ||
|
||
process.Dataset_TestDatasetY = cms.Path( process.HLTDatasetPathBeginSequence + process.hltDatasetTestDatasetY + process.hltPreDatasetTestDatasetY ) | ||
|
||
process.schedule = cms.Schedule( *( | ||
process.HLTriggerFirstPath, | ||
process.HLT_TestPathA_v1, | ||
process.HLT_TestPathB_v1, | ||
process.HLT_TestPathC_v1, | ||
process.HLTriggerFinalPath, | ||
process.RatesMonitoring, | ||
process.Dataset_TestDatasetX, | ||
process.Dataset_TestDatasetY | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Pass in name and status | ||
function die { echo $1: status $2 ; echo === Log file === ; cat ${3:-/dev/null} ; echo === End log file === ; exit $2; } | ||
|
||
TESTDIR="${LOCALTOP}"/src/HLTrigger/JSONMonitoring/test | ||
|
||
cmsRun "${TESTDIR}"/testHLTriggerJSONMonitoring.py &> log_HLTriggerJSONMonitoring \ | ||
|| die "Failure using testHLTriggerJSONMonitoring.py" $? log_HLTriggerJSONMonitoring |