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                  'static:caloStage2Params_2017_v1_4_inconsistent_cfi.py',
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                  'L1TCaloParams_Stage2v3_hlt',
0026                  VarParsing.VarParsing.multiplicity.singleton,
0027                  VarParsing.VarParsing.varType.string,
0028                  "Run (IOV)"
0029 )
0030 
0031 options.parseArguments()
0032 
0033 if "static" in options.db :
0034     process.load("L1Trigger.L1TCalorimeter." + options.db[7:])
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('L1TCaloParamsRcd'),
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.l1cpv = cms.EDAnalyzer("L1TCaloParamsViewer",
0062                                useStage2Rcd = cms.untracked.bool(False),
0063                                printPUSParams = cms.untracked.bool(False),
0064                                printTauCalibLUT = cms.untracked.bool(False),
0065                                printTauCompressLUT = cms.untracked.bool(False),
0066                                printJetCalibLUT = cms.untracked.bool(False),
0067                                printJetCalibPar = cms.untracked.bool(False),
0068                                printJetPUSPar = cms.untracked.bool(False),
0069                                printJetCompressPtLUT = cms.untracked.bool(False),
0070                                printJetCompressEtaLUT = cms.untracked.bool(False),
0071                                printEgCalibLUT = cms.untracked.bool(False),
0072                                printEgIsoLUT = cms.untracked.bool(False),
0073                                printEtSumMetPUSLUT = cms.untracked.bool(False),
0074                                printHfSF = cms.untracked.bool(False),
0075                                printHcalSF = cms.untracked.bool(False),
0076                                printEcalSF = cms.untracked.bool(False),
0077                                printEtSumEttPUSLUT = cms.untracked.bool(False),
0078                                printEtSumEcalSumPUSLUT = cms.untracked.bool(False),
0079                                printMetCalibrationLUT = cms.untracked.bool(False),
0080                                printMetHFCalibrationLUT = cms.untracked.bool(False),
0081                                printEtSumEttCalibrationLUT = cms.untracked.bool(False),
0082                                printEtSumEcalSumCalibrationLUT = cms.untracked.bool(False)
0083 )
0084 
0085 process.p = cms.Path(process.l1cpv)
0086