Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:19

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("L1ConfigWritePayloadDummy")
0004 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0005 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0006 process.MessageLogger.cout.threshold = cms.untracked.string('INFO')
0007 process.MessageLogger.debugModules = cms.untracked.vstring('*')
0008 
0009 import FWCore.ParameterSet.VarParsing as VarParsing
0010 options = VarParsing.VarParsing()
0011 options.register('tagBase',
0012                  'IDEAL', #default value
0013                  VarParsing.VarParsing.multiplicity.singleton,
0014                  VarParsing.VarParsing.varType.string,
0015                  "IOV tags = object_{tagBase}")
0016 options.register('useO2OTags',
0017                  0, #default value
0018                  VarParsing.VarParsing.multiplicity.singleton,
0019                  VarParsing.VarParsing.varType.int,
0020                  "0 = use uniform tags, 1 = ignore tagBase and use O2O tags")
0021 options.register('outputDBConnect',
0022                  'sqlite_file:l1config.db', #default value
0023                  VarParsing.VarParsing.multiplicity.singleton,
0024                  VarParsing.VarParsing.varType.string,
0025                  "Connection string for output DB")
0026 options.register('outputDBAuth',
0027                  '.', #default value
0028                  VarParsing.VarParsing.multiplicity.singleton,
0029                  VarParsing.VarParsing.varType.string,
0030                  "Authentication path for output DB")
0031 options.register('startup',
0032                  0, #default value
0033                  VarParsing.VarParsing.multiplicity.singleton,
0034                  VarParsing.VarParsing.varType.int,
0035                  "Use L1StartupConfig_cff instead of L1DummyConfig_cff")
0036 options.parseArguments()
0037 
0038 # Generate dummy L1TriggerKey
0039 process.load("CondTools.L1TriggerExt.L1TriggerKeyDummyExt_cff")
0040 
0041 # Generate dummy configuration data
0042 if options.startup == 0:
0043     process.load("L1Trigger.Configuration.L1DummyConfig_cff")
0044     process.load("L1TriggerConfig.L1GtConfigProducers.Luminosity.lumi1031.L1Menu_MC2009_v4_L1T_Scales_20090624_Imp0_Unprescaled_cff")
0045 else:
0046     process.load("L1Trigger.Configuration.L1StartupConfig_cff")
0047     process.load("L1TriggerConfig.L1GtConfigProducers.Luminosity.startup.L1Menu_Commissioning2009_v5_L1T_Scales_20080926_startup_Imp0_Unprescaled_cff")
0048 
0049 # Define CondDB tags
0050 if options.useO2OTags == 0:
0051     from CondTools.L1TriggerExt.L1CondEnumExt_cfi import L1CondEnumExt
0052     from CondTools.L1TriggerExt.L1UniformTagsExt_cfi import initL1UniformTagsExt
0053     initL1UniformTagsExt( tagBase = options.tagBase )
0054     tagBaseVec = initL1UniformTagsExt.tagBaseVec
0055 else:
0056     from CondTools.L1TriggerExt.L1CondEnumExt_cfi import L1CondEnumExt
0057     from CondTools.L1TriggerExt.L1O2OTagsExt_cfi import initL1O2OTagsExt
0058     initL1O2OTagsExt()
0059     tagBaseVec = initL1O2OTagsExt.tagBaseVec
0060 
0061 # writer modules
0062 from CondTools.L1TriggerExt.L1CondDBPayloadWriterExt_cff import initPayloadWriterExt
0063 initPayloadWriterExt( process,
0064                    outputDBConnect = options.outputDBConnect,
0065                    outputDBAuth = options.outputDBAuth,
0066                    tagBaseVec = tagBaseVec )
0067 
0068 # Generate dummy L1TriggerKeyListExt
0069 process.L1CondDBPayloadWriterExt.newL1TriggerKeyListExt = True
0070 
0071 process.maxEvents = cms.untracked.PSet(
0072     input = cms.untracked.int32(1)
0073 )
0074 process.source = cms.Source("EmptySource")
0075 
0076 process.p = cms.Path(process.L1CondDBPayloadWriterExt)