Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:19

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                  'static',
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.parseArguments()
0025 
0026 if options.db == "static" :
0027     process.load("L1Trigger.L1TMuonEndCap.fakeEmtfParams_cff")
0028 else :
0029     if   options.db == "prod" :
0030         sourceDB = "frontier://FrontierProd/CMS_CONDITIONS"
0031     elif options.db == "prep" :
0032         sourceDB = "frontier://FrontierPrep/CMS_CONDITIONS"
0033     elif "sqlite" in options.db :
0034         sourceDB = options.db
0035     else :
0036         print("Unknown input DB: ", options.db, " should be static/prod/prep/sqlite:...")
0037         exit(0)
0038 
0039     from CondCore.CondDB.CondDB_cfi import CondDB
0040     CondDB.connect = cms.string(sourceDB)
0041     process.l1conddb = cms.ESSource("PoolDBESSource",
0042        CondDB,
0043        toGet   = cms.VPSet(
0044             cms.PSet(
0045                  record = cms.string('L1TMuonEndCapParamsRcd'),
0046                  tag = cms.string("L1TMuonEndCapParams_Stage2v1_hlt")
0047             )
0048        )
0049     )
0050 
0051 
0052 process.source = cms.Source("EmptySource", firstRun = cms.untracked.uint32(options.run))
0053 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0054 
0055 process.l1ecv = cms.EDAnalyzer("L1TMuonEndCapParamsViewer")
0056 
0057 process.p = cms.Path(process.l1ecv)
0058