Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:14

0001 def initIOVWriterExt( process,
0002                    outputDBConnect = 'sqlite_file:l1config.db',
0003                    outputDBAuth = '.',
0004                    tagBaseVec = [],
0005                    tscKey = 'dummy',
0006                    rsKey  = 'dummy' ):
0007     import FWCore.ParameterSet.Config as cms
0008     from CondTools.L1TriggerExt.L1CondEnumExt_cfi import L1CondEnumExt
0009 
0010     if len( tagBaseVec ) == 0:
0011         from CondTools.L1TriggerExt.L1UniformTagsExt_cfi import initL1UniformTagsExt
0012         initL1UniformTagsExt()
0013         tagBaseVec = initL1UniformTagsExt.tagBaseVec                                
0014 
0015     process.load('CondTools.L1TriggerExt.L1CondDBIOVWriterExt_cfi')
0016     process.L1CondDBIOVWriterExt.tscKey = cms.string( tscKey )
0017     process.L1CondDBIOVWriterExt.rsKey  = cms.string( rsKey )
0018 
0019     from CondCore.CondDB.CondDB_cfi import CondDB
0020     CondDB.connect = cms.string(outputDBConnect)
0021 
0022     initIOVWriterExt.outputDB = cms.Service("PoolDBOutputService",
0023                                          CondDB,
0024                                          toPut = cms.VPSet(cms.PSet(
0025         record = cms.string("L1TriggerKeyExtRcd"),
0026         tag = cms.string("L1TriggerKeyExt_" + tagBaseVec[ L1CondEnumExt.L1TriggerKeyExt ])),
0027                                                            cms.PSet(
0028         record = cms.string("L1TriggerKeyListExtRcd"),
0029         tag = cms.string("L1TriggerKeyListExt_" + tagBaseVec[ L1CondEnumExt.L1TriggerKeyListExt ]))
0030                                                            ))
0031     initIOVWriterExt.outputDB.DBParameters.authenticationPath = outputDBAuth
0032 
0033     from CondTools.L1TriggerExt.L1SubsystemParamsExt_cfi import initL1SubsystemsExt
0034     initL1SubsystemsExt( tagBaseVec = tagBaseVec )
0035     initIOVWriterExt.outputDB.toPut.extend(initL1SubsystemsExt.params.recordInfo)
0036     process.add_(initIOVWriterExt.outputDB)