Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-27 03:17:58

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("tester")
0004 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0005 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0006 process.MessageLogger.cout.threshold = cms.untracked.string('DEBUG')
0007 process.MessageLogger.debugModules = cms.untracked.vstring('*')
0008 
0009 import FWCore.ParameterSet.VarParsing as VarParsing
0010 options = VarParsing.VarParsing()
0011 options.register('db',
0012                  'static',
0013                  VarParsing.VarParsing.multiplicity.singleton,
0014                  VarParsing.VarParsing.varType.string,
0015                  "Source DB: prod/prep/static/sqlite"
0016 )
0017 options.register('run',
0018                  1,
0019                  VarParsing.VarParsing.multiplicity.singleton,
0020                  VarParsing.VarParsing.varType.int,
0021                  "Run (IOV)"
0022 )
0023 options.parseArguments()
0024 
0025 if options.db == "static" :
0026     process.load('L1Trigger.L1TGlobal.PrescalesVetos_cff')
0027     #process.L1TGlobalPrescalesVetos.PrescaleXMLFile   = cms.string('UGT_BASE_RS_PRESCALES.xml')
0028     #process.L1TGlobalPrescalesVetos.AlgoBxMaskXMLFile = cms.string('UGT_BASE_RS_ALGOBX_MASK.xml')
0029     #process.L1TGlobalPrescalesVetos.FinOrMaskXMLFile  = cms.string('UGT_BASE_RS_FINOR_MASK.xml')
0030     #process.L1TGlobalPrescalesVetos.VetoMaskXMLFile   = cms.string('UGT_BASE_RS_VETO_MASK.xml')
0031 else :
0032     if   options.db == "prod" :
0033         sourceDB = "frontier://FrontierProd/CMS_CONDITIONS"
0034     elif options.db == "prep" :
0035         sourceDB = "frontier://FrontierPrep/CMS_CONDITIONS"
0036     elif "sqlite" in options.db :
0037         sourceDB = options.db
0038     else :
0039         print("Unknown input DB: ", options.db, " should be static/prod/prep/sqlite:...")
0040         exit(0)
0041 
0042     from CondCore.CondDB.CondDB_cfi import CondDB
0043     CondDB.connect = cms.string(sourceDB)
0044     process.l1conddb = cms.ESSource("PoolDBESSource",
0045        CondDB,
0046        toGet   = cms.VPSet(
0047             cms.PSet(
0048                  record = cms.string('L1TGlobalPrescalesVetosRcd'),
0049                  tag = cms.string("L1TGlobalPrescalesVetos_passThrough_mc")
0050 #                 tag = cms.string("L1TGlobalPrescalesVetos_Stage2v0_hlt")
0051             )
0052        )
0053     )
0054 
0055 process.source = cms.Source("EmptySource", firstRun = cms.untracked.uint32(options.run))
0056 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0057 
0058 process.l1gpv = cms.EDAnalyzer("L1TGlobalPrescalesVetosViewer",
0059     prescale_table_verbosity = cms.untracked.int32(0),
0060     bxmask_map_verbosity     = cms.untracked.int32(0),
0061     veto_verbosity           = cms.untracked.int32(0)
0062 )
0063 
0064 process.p = cms.Path(process.l1gpv)
0065