Back to home page

Project CMSSW displayed by LXR

 
 

    


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                  'sqlite:l1config.db',
0014                  VarParsing.VarParsing.multiplicity.singleton,
0015                  VarParsing.VarParsing.varType.string,
0016                  "Source DB: prod/prep/static:.../sqlite:..."
0017 )
0018 options.register('run',
0019                  1,
0020                  VarParsing.VarParsing.multiplicity.singleton,
0021                  VarParsing.VarParsing.varType.int,
0022                  "Run (IOV)"
0023 )
0024 options.register('tag',
0025                  'L1TMuonBarrelKalmanParamsPrototype_Stage2v0_hlt',
0026                  VarParsing.VarParsing.multiplicity.singleton,
0027                  VarParsing.VarParsing.varType.string,
0028                  "Tag for selecting the Rcd from db"
0029 )
0030 
0031 options.parseArguments()
0032 
0033 if "static" in options.db :
0034     process.load("L1Trigger.L1TMuonBarrel.staticKBmtfParams_cff")
0035 else :
0036     if   options.db == "prod" :
0037         sourceDB = "frontier://FrontierProd/CMS_CONDITIONS"
0038     elif options.db == "prep" :
0039         sourceDB = "frontier://FrontierPrep/CMS_CONDITIONS"
0040     elif "sqlite" in options.db :
0041         sourceDB = options.db
0042     else :
0043         print("Unknown input DB: ", options.db, " should be static:.../prod/prep/sqlite:...")
0044         exit(0)
0045 
0046     from CondCore.CondDB.CondDB_cfi import CondDB
0047     CondDB.connect = cms.string(sourceDB)
0048     process.l1conddb = cms.ESSource("PoolDBESSource",
0049        CondDB,
0050        toGet   = cms.VPSet(
0051             cms.PSet(
0052                  record = cms.string('L1TMuonBarrelKalmanParamsRcd'),
0053                  tag = cms.string(options.tag)
0054             )
0055        )
0056    )
0057 
0058 process.source = cms.Source("EmptySource", firstRun = cms.untracked.uint32(options.run))
0059 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0060 
0061 process.l1bkpv = cms.EDAnalyzer("L1TMuonBarrelKalmanParamsViewer",
0062 )
0063 
0064 process.p = cms.Path(process.l1bkpv)
0065 
0066 print(process.es_sources.viewitems())