CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
L1CondDBSource_cff Namespace Reference

Functions

def initCondDBSource
 

Function Documentation

def L1CondDBSource_cff.initCondDBSource (   process,
  inputDBConnect = 'frontier://FrontierProd/CMS_COND_31X_L1T',
  inputDBAuth = '.',
  tagBaseVec = [],
  includeAllTags = False,
  includeRSTags = False,
  use30XTagList = False,
  applyESPrefer = True 
)

Definition at line 8 of file L1CondDBSource_cff.py.

References L1O2OTags_cfi.initL1O2OTags(), L1RSSubsystemParams_cfi.initL1RSSubsystems(), and L1SubsystemParams30X_cfi.initL1Subsystems().

8 
9  applyESPrefer = True ):
10  import FWCore.ParameterSet.Config as cms
11  from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
12  from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum
13 
14  if len( tagBaseVec ) == 0:
15  from CondTools.L1Trigger.L1O2OTags_cfi import initL1O2OTags
17  tagBaseVec = initL1O2OTags.tagBaseVec
18 
19  process.l1conddb = cms.ESSource("PoolDBESSource",
20  CondDBSetup,
21  connect = cms.string(inputDBConnect),
22  toGet = cms.VPSet(cms.PSet(
23  record = cms.string('L1TriggerKeyListRcd'),
24  tag = cms.string('L1TriggerKeyList_' + tagBaseVec[ L1CondEnum.L1TriggerKeyList ])
25  ),
26  cms.PSet(
27  record = cms.string('L1TriggerKeyRcd'),
28  tag = cms.string('L1TriggerKey_' + tagBaseVec[ L1CondEnum.L1TriggerKey ])
29  ))
30  )
31  process.l1conddb.DBParameters.authenticationPath = inputDBAuth
32 
33  # The more records, the longer it takes PoolDBESSource to initialize, so be
34  # selective if possible.
35 
36  if includeAllTags == True:
37  if use30XTagList == True:
38  from CondTools.L1Trigger.L1SubsystemParams30X_cfi import initL1Subsystems
39  else:
40  from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
41  initL1Subsystems( tagBaseVec = tagBaseVec )
42  process.l1conddb.toGet.extend(initL1Subsystems.params.recordInfo)
43  elif includeRSTags == True:
44  from CondTools.L1Trigger.L1RSSubsystemParams_cfi import initL1RSSubsystems
45  initL1RSSubsystems( tagBaseVec = tagBaseVec )
46  process.l1conddb.toGet.extend(initL1RSSubsystems.params.recordInfo)
47 
48  if applyESPrefer == True:
49  process.es_prefer_l1conddb = cms.ESPrefer("PoolDBESSource","l1conddb")