File indexing completed on 2024-04-06 12:03:13
0001 import FWCore.ParameterSet.Config as cms
0002
0003 process = cms.Process("L1ConfigValidation")
0004 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0005 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0006 process.MessageLogger.cout.threshold = cms.untracked.string('DEBUG')
0007 process.MessageLogger.debugModules = cms.untracked.vstring('*')
0008
0009 import FWCore.ParameterSet.VarParsing as VarParsing
0010 options = VarParsing.VarParsing()
0011 options.register('prescalesKey',
0012 '',
0013 VarParsing.VarParsing.multiplicity.singleton,
0014 VarParsing.VarParsing.varType.string,
0015 "Key for GT prescale factors" )
0016 options.register('maskAlgoKey',
0017 '',
0018 VarParsing.VarParsing.multiplicity.singleton,
0019 VarParsing.VarParsing.varType.string,
0020 "Key for L1GtTriggerMaskAlgoTrigRcd" )
0021 options.register('maskTechKey',
0022 '',
0023 VarParsing.VarParsing.multiplicity.singleton,
0024 VarParsing.VarParsing.varType.string,
0025 "Key for L1GtTriggerMaskTechTrigRcd" )
0026 options.register('maskVetoAlgoKey',
0027 '',
0028 VarParsing.VarParsing.multiplicity.singleton,
0029 VarParsing.VarParsing.varType.string,
0030 "Key for L1GtTriggerMaskVetoAlgoTrigRcd" )
0031 options.register('maskVetoTechKey',
0032 '',
0033 VarParsing.VarParsing.multiplicity.singleton,
0034 VarParsing.VarParsing.varType.string,
0035 "Key for L1GtTriggerMaskVetoTechTrigRcd" )
0036 options.register('online',
0037 0,
0038 VarParsing.VarParsing.multiplicity.singleton,
0039 VarParsing.VarParsing.varType.int,
0040 "1 := use online connection string")
0041 options.parseArguments()
0042
0043
0044 from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum
0045 from CondTools.L1Trigger.L1O2OTags_cfi import initL1O2OTags
0046 initL1O2OTags()
0047
0048 if options.online != 1:
0049 connectStr = 'oracle://cms_orcoff_prod/CMS_COND_31X_L1T'
0050 authPath = '/afs/cern.ch/cms/DB/conddb'
0051 else:
0052 connectStr = 'oracle://cms_orcon_prod/CMS_COND_31X_L1T'
0053 authPath = '/nfshome0/popcondev/conddb_taskWriters/L1T'
0054
0055 from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
0056 inputDB = cms.Service("PoolDBOutputService",
0057 CondDBSetup,
0058 connect = cms.string(connectStr),
0059 toPut = cms.VPSet(cms.PSet(
0060 record = cms.string("L1TriggerKeyRcd"),
0061 tag = cms.string("L1TriggerKey_" + initL1O2OTags.tagBaseVec[ L1CondEnum.L1TriggerKey ])),
0062 cms.PSet(
0063 record = cms.string("L1TriggerKeyListRcd"),
0064 tag = cms.string("L1TriggerKeyList_" + initL1O2OTags.tagBaseVec[ L1CondEnum.L1TriggerKeyList ]))
0065 ))
0066 inputDB.DBParameters.authenticationPath = authPath
0067
0068 from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
0069 initL1Subsystems( tagBaseVec = initL1O2OTags.tagBaseVec )
0070 inputDB.toPut.extend(initL1Subsystems.params.recordInfo)
0071 process.add_(inputDB)
0072
0073
0074 process.maxEvents = cms.untracked.PSet(
0075 input = cms.untracked.int32(1)
0076 )
0077 process.source = cms.Source("EmptyIOVSource",
0078 timetype = cms.string('runnumber'),
0079 firstValue = cms.uint64(1),
0080 lastValue = cms.uint64(1),
0081 interval = cms.uint64(1)
0082 )
0083
0084
0085 process.load('CondTools.L1Trigger.L1GtRunSettingsViewer_cfi')
0086 process.L1GtRunSettingsViewer.prescalesKey = options.prescalesKey
0087 process.L1GtRunSettingsViewer.maskAlgoKey = options.maskAlgoKey
0088 process.L1GtRunSettingsViewer.maskTechKey = options.maskTechKey
0089 process.L1GtRunSettingsViewer.maskVetoAlgoKey = options.maskVetoAlgoKey
0090 process.L1GtRunSettingsViewer.maskVetoTechKey = options.maskVetoTechKey
0091
0092 process.p = cms.Path(process.L1GtRunSettingsViewer)