File indexing completed on 2024-04-06 12:22:28
0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003
0004 process = cms.Process("tester")
0005 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0006 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0007 process.MessageLogger.cout.threshold = cms.untracked.string('DEBUG')
0008 process.MessageLogger.debugModules = cms.untracked.vstring('*')
0009
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011 options = VarParsing.VarParsing()
0012 options.register('db',
0013 'prod',
0014 VarParsing.VarParsing.multiplicity.singleton,
0015 VarParsing.VarParsing.varType.string,
0016 "Source DB: prod/prep/sqlite"
0017 )
0018 options.register('run',
0019 1,
0020 VarParsing.VarParsing.multiplicity.singleton,
0021 VarParsing.VarParsing.varType.int,
0022 "Run (IOV)"
0023 )
0024 options.parseArguments()
0025
0026 if options.db == "prod" :
0027 sourceDB = "frontier://FrontierProd/CMS_CONDITIONS"
0028 elif options.db == "prep" :
0029 sourceDB = "frontier://FrontierPrep/CMS_CONDITIONS"
0030 elif "sqlite" in options.db :
0031 sourceDB = options.db
0032 else :
0033 print("Unknown input DB: ", options.db, " should be static/prod/prep/sqlite:...")
0034 exit(0)
0035
0036 from CondCore.CondDB.CondDB_cfi import CondDB
0037 CondDB.connect = cms.string(sourceDB)
0038 process.l1conddb = cms.ESSource("PoolDBESSource",
0039 CondDB,
0040 toGet = cms.VPSet(
0041 cms.PSet(
0042 record = cms.string('L1TriggerKeyExtRcd'),
0043 tag = cms.string("L1TriggerKeyExt_Stage2v0_hlt")
0044 )
0045 )
0046 )
0047
0048 process.source = cms.Source("EmptySource", firstRun = cms.untracked.uint32(options.run))
0049 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0050
0051 process.l1cr = cms.EDAnalyzer("L1TriggerKeyExtReader", label = cms.string("") )
0052
0053 process.p = cms.Path(process.l1cr)
0054