def initIOVWriter(process,
                  outputDBConnect='sqlite_file:l1config.db',
                  outputDBAuth='.',
                  tagBaseVec=[],
                  tscKey='dummy'):
    import FWCore.ParameterSet.Config as cms
    from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum

    if len(tagBaseVec) == 0:
        from CondTools.L1Trigger.L1UniformTags_cfi import initL1UniformTags
        initL1UniformTags()
        tagBaseVec = initL1UniformTags.tagBaseVec

    process.load('CondTools.L1Trigger.L1CondDBIOVWriter_cfi')
    process.L1CondDBIOVWriter.tscKey = cms.string(tscKey)

    from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
    initIOVWriter.outputDB = cms.Service(
        "PoolDBOutputService",
        CondDBSetup,
        connect=cms.string(outputDBConnect),
        toPut=cms.VPSet(
            cms.PSet(record=cms.string("L1TriggerKeyRcd"),
                     tag=cms.string("L1TriggerKey_" +
                                    tagBaseVec[L1CondEnum.L1TriggerKey])),
            cms.PSet(record=cms.string("L1TriggerKeyListRcd"),
                     tag=cms.string("L1TriggerKeyList_" +
                                    tagBaseVec[L1CondEnum.L1TriggerKeyList]))))
    initIOVWriter.outputDB.DBParameters.authenticationPath = outputDBAuth

    from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
    initL1Subsystems(tagBaseVec=tagBaseVec)
    initIOVWriter.outputDB.toPut.extend(initL1Subsystems.params.recordInfo)
    process.add_(initIOVWriter.outputDB)
def initIOVWriter(process, outputDBConnect="sqlite_file:l1config.db", outputDBAuth=".", tagBaseVec=[], tscKey="dummy"):
    import FWCore.ParameterSet.Config as cms
    from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum

    if len(tagBaseVec) == 0:
        from CondTools.L1Trigger.L1UniformTags_cfi import initL1UniformTags

        initL1UniformTags()
        tagBaseVec = initL1UniformTags.tagBaseVec

    process.load("CondTools.L1Trigger.L1CondDBIOVWriter_cfi")
    process.L1CondDBIOVWriter.tscKey = cms.string(tscKey)

    from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup

    initIOVWriter.outputDB = cms.Service(
        "PoolDBOutputService",
        CondDBSetup,
        connect=cms.string(outputDBConnect),
        toPut=cms.VPSet(
            cms.PSet(
                record=cms.string("L1TriggerKeyRcd"),
                tag=cms.string("L1TriggerKey_" + tagBaseVec[L1CondEnum.L1TriggerKey]),
            ),
            cms.PSet(
                record=cms.string("L1TriggerKeyListRcd"),
                tag=cms.string("L1TriggerKeyList_" + tagBaseVec[L1CondEnum.L1TriggerKeyList]),
            ),
        ),
    )
    initIOVWriter.outputDB.DBParameters.authenticationPath = outputDBAuth

    from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems

    initL1Subsystems(tagBaseVec=tagBaseVec)
    initIOVWriter.outputDB.toPut.extend(initL1Subsystems.params.recordInfo)
    process.add_(initIOVWriter.outputDB)
Exemple #3
0
from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
inputDB = cms.Service("PoolDBOutputService",
                      CondDBSetup,
                      connect = cms.string(connectStr),
                      toPut = cms.VPSet(cms.PSet(
    record = cms.string("L1TriggerKeyRcd"),
    tag = cms.string("L1TriggerKey_" + initL1O2OTags.tagBaseVec[ L1CondEnum.L1TriggerKey ])),
                                        cms.PSet(
    record = cms.string("L1TriggerKeyListRcd"),
    tag = cms.string("L1TriggerKeyList_" + initL1O2OTags.tagBaseVec[ L1CondEnum.L1TriggerKeyList ]))
                                        ))
inputDB.DBParameters.authenticationPath = authPath

from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
initL1Subsystems( tagBaseVec = initL1O2OTags.tagBaseVec )
inputDB.toPut.extend(initL1Subsystems.params.recordInfo)
process.add_(inputDB)
                        
# Source of events, run number is irrelevant
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(1)
)
process.source = cms.Source("EmptyIOVSource",
    timetype = cms.string('runnumber'),
    firstValue = cms.uint64(1),
    lastValue = cms.uint64(1),
    interval = cms.uint64(1)
)

# Viewer module
import FWCore.ParameterSet.Config as cms

L1TriggerKeyDummy = cms.ESProducer("L1TriggerKeyDummyProd",
                                   objectKeys=cms.VPSet(),
                                   tscKey=cms.string('dummy'),
                                   csctfKey=cms.string('dummy'),
                                   dttfKey=cms.string('dummy'),
                                   rpcKey=cms.string('dummy'),
                                   gmtKey=cms.string('dummy'),
                                   rctKey=cms.string('dummy'),
                                   gctKey=cms.string('dummy'),
                                   gtKey=cms.string('dummy'),
                                   tsp0Key=cms.string('dummy'),
                                   label=cms.string(''))

from CondTools.L1Trigger.L1UniformTags_cfi import initL1UniformTags
initL1UniformTags(tagBase='IDEAL')
from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
initL1Subsystems(tagBaseVec=initL1UniformTags.tagBaseVec, objectKey='dummy')
L1TriggerKeyDummy.objectKeys.extend(initL1Subsystems.params.recordInfo)
process = cms.Process("L1GtTriggerMenuTest")
process.l1GtTriggerMenuTest = cms.EDAnalyzer("L1GtTriggerMenuTester")

# number of events and source
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(1)
)
process.source = cms.Source("EmptySource")

# configuration
process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')

# L1 db
from CondCore.DBCommon.CondDBCommon_cfi import *
from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
initL1Subsystems()

process.l1pooldb = cms.ESSource("PoolDBESSource",
    CondDBCommon,
    toGet = initL1Subsystems.params.recordInfo
)
process.l1pooldb.connect = cms.string('sqlite_file:l1config.db')

# Other statements
process.GlobalTag.globaltag = 'IDEAL_V5::All'

# path to be run
process.p = cms.Path(process.l1GtTriggerMenuTest)

# services
Exemple #6
0
process = cms.Process("L1GtTriggerMenuTest")
process.l1GtTriggerMenuTest = cms.EDAnalyzer("L1GtTriggerMenuTester")

# number of events and source
process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(1))
process.source = cms.Source("EmptySource")

# configuration
process.load(
    'Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')

# L1 db
from CondCore.DBCommon.CondDBCommon_cfi import *
from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems

initL1Subsystems()

process.l1pooldb = cms.ESSource("PoolDBESSource",
                                CondDBCommon,
                                toGet=initL1Subsystems.params.recordInfo)
process.l1pooldb.connect = cms.string('sqlite_file:l1config.db')

# Other statements
process.GlobalTag.globaltag = 'IDEAL_V5::All'

# path to be run
process.p = cms.Path(process.l1GtTriggerMenuTest)

# services

# Message Logger
import FWCore.ParameterSet.Config as cms

L1TriggerKeyDummy = cms.ESProducer(
    "L1TriggerKeyDummyProd",
    objectKeys=cms.VPSet(),
    tscKey=cms.string("dummy"),
    csctfKey=cms.string("dummy"),
    dttfKey=cms.string("dummy"),
    rpcKey=cms.string("dummy"),
    gmtKey=cms.string("dummy"),
    rctKey=cms.string("dummy"),
    gctKey=cms.string("dummy"),
    gtKey=cms.string("dummy"),
    tsp0Key=cms.string("dummy"),
    label=cms.string(""),
)

from CondTools.L1Trigger.L1UniformTags_cfi import initL1UniformTags

initL1UniformTags(tagBase="IDEAL")
from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems

initL1Subsystems(tagBaseVec=initL1UniformTags.tagBaseVec, objectKey="dummy")
L1TriggerKeyDummy.objectKeys.extend(initL1Subsystems.params.recordInfo)