test
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 = '.',
  tagBase = "",
  tagBaseVec = [],
  includeAllTags = False,
  includeRSTags = False,
  use30XTagList = False,
  applyESPrefer = True 
)

Definition at line 17 of file L1CondDBSource_cff.py.

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

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