Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:14: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',
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.L1TGlobal.PrescalesVetos_cff')
0028     #process.L1TGlobalPrescalesVetos.PrescaleXMLFile   = cms.string('UGT_BASE_RS_PRESCALES.xml')
0029     #process.L1TGlobalPrescalesVetos.AlgoBxMaskXMLFile = cms.string('UGT_BASE_RS_ALGOBX_MASK.xml')
0030     #process.L1TGlobalPrescalesVetos.FinOrMaskXMLFile  = cms.string('UGT_BASE_RS_FINOR_MASK.xml')
0031     #process.L1TGlobalPrescalesVetos.VetoMaskXMLFile   = cms.string('UGT_BASE_RS_VETO_MASK.xml')
0032 else :
0033     if   options.db == "prod" :
0034         sourceDB = "frontier://FrontierProd/CMS_CONDITIONS"
0035     elif options.db == "prep" :
0036         sourceDB = "frontier://FrontierPrep/CMS_CONDITIONS"
0037     elif "sqlite" in options.db :
0038         sourceDB = options.db
0039     else :
0040         print("Unknown input DB: ", options.db, " should be static/prod/prep/sqlite:...")
0041         exit(0)
0042 
0043     from CondCore.CondDB.CondDB_cfi import CondDB
0044     CondDB.connect = cms.string(sourceDB)
0045     process.l1conddb = cms.ESSource("PoolDBESSource",
0046        CondDB,
0047        toGet   = cms.VPSet(
0048             cms.PSet(
0049                  record = cms.string('L1TGlobalPrescalesVetosRcd'),
0050                  tag = cms.string("L1TGlobalPrescalesVetos_passThrough_mc")
0051 #                 tag = cms.string("L1TGlobalPrescalesVetos_Stage2v0_hlt")
0052             )
0053        )
0054     )
0055 
0056 process.source = cms.Source("EmptySource", firstRun = cms.untracked.uint32(options.run))
0057 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0058 
0059 process.l1gpv = cms.EDAnalyzer("L1TGlobalPrescalesVetosViewer",
0060     prescale_table_verbosity = cms.untracked.int32(0),
0061     bxmask_map_verbosity     = cms.untracked.int32(0),
0062     veto_verbosity           = cms.untracked.int32(0)
0063 )
0064 
0065 process.p = cms.Path(process.l1gpv)
0066