CMS 3D CMS Logo

Functions
L1CondDBSourceExt_cff Namespace Reference

Functions

def initCondDBSourceExt (process, inputDBConnect='frontier://FrontierProd/CMS_CONDITIONS', inputDBAuth='.', tagBase="", tagBaseVec=[], includeAllTags=False, includeRSTags=False, applyESPrefer=True)
 

Function Documentation

◆ initCondDBSourceExt()

def L1CondDBSourceExt_cff.initCondDBSourceExt (   process,
  inputDBConnect = 'frontier://FrontierProd/CMS_CONDITIONS',
  inputDBAuth = '.',
  tagBase = "",
  tagBaseVec = [],
  includeAllTags = False,
  includeRSTags = False,
  applyESPrefer = True 
)

Definition at line 16 of file L1CondDBSourceExt_cff.py.

References L1O2OTagsExt_cfi.initL1O2OTagsExt(), L1RSSubsystemParamsExt_cfi.initL1RSSubsystemsExt(), L1SubsystemParamsExt_cfi.initL1SubsystemsExt(), and L1UniformTagsExt_cfi.initL1UniformTagsExt().

16  applyESPrefer = True ):
17  import FWCore.ParameterSet.Config as cms
18  from CondTools.L1TriggerExt.L1CondEnumExt_cfi import L1CondEnumExt
19 
20  if len( tagBaseVec ) == 0:
21  if len( tagBase ) != 0:
22  from CondTools.L1TriggerExt.L1UniformTagsExt_cfi import initL1UniformTagsExt
23  initL1UniformTagsExt( tagBase )
24  tagBaseVec = initL1UniformTagsExt.tagBaseVec
25  else:
26  from CondTools.L1TriggerExt.L1O2OTagsExt_cfi import initL1O2OTagsExt
28  tagBaseVec = initL1O2OTagsExt.tagBaseVec
29 
30  from CondCore.CondDB.CondDB_cfi import CondDB
31  CondDB.connect = cms.string(inputDBConnect)
32 
33  process.l1conddb = cms.ESSource("PoolDBESSource",
34  CondDB,
35  toGet = cms.VPSet(cms.PSet(
36  record = cms.string('L1TriggerKeyListExtRcd'),
37  tag = cms.string('L1TriggerKeyListExt_' + tagBaseVec[ L1CondEnumExt.L1TriggerKeyListExt ])
38  ),
39  cms.PSet(
40  record = cms.string('L1TriggerKeyExtRcd'),
41  tag = cms.string('L1TriggerKeyExt_' + tagBaseVec[ L1CondEnumExt.L1TriggerKeyExt ])
42  ))
43  )
44  process.l1conddb.DBParameters.authenticationPath = inputDBAuth
45 
46  # The more records, the longer it takes PoolDBESSource to initialize, so be
47  # selective if possible.
48 
49  if includeAllTags == True:
50  from CondTools.L1TriggerExt.L1SubsystemParamsExt_cfi import initL1SubsystemsExt
51  initL1SubsystemsExt( tagBaseVec = tagBaseVec )
52  process.l1conddb.toGet.extend(initL1SubsystemsExt.params.recordInfo)
53  elif includeRSTags == True:
54  from CondTools.L1TriggerExt.L1RSSubsystemParamsExt_cfi import initL1RSSubsystemsExt
55  initL1RSSubsystemsExt( tagBaseVec = tagBaseVec )
56  process.l1conddb.toGet.extend(initL1RSSubsystemsExt.params.recordInfo)
57 
58  if applyESPrefer == True:
59  process.es_prefer_l1conddb = cms.ESPrefer("PoolDBESSource","l1conddb")
60 
def initL1SubsystemsExt(tagBaseVec=[], objectKey='dummy')
def initL1UniformTagsExt(tagBase="IDEAL")