Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-06 04:00:39

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing 
0003 
0004 process = cms.Process("READ")
0005 
0006 options = VarParsing.VarParsing()
0007 options.register( "inputDB", 
0008                   "frontier://FrontierProd/CMS_CONDITIONS",  #default value
0009                   VarParsing.VarParsing.multiplicity.singleton, 
0010                   VarParsing.VarParsing.varType.string,
0011                   "the input DB"
0012                   )
0013 
0014 options.register( "inputTag", 
0015                   "AlCaRecoHLTpaths8e29_1e31_v7_hlt",  #default value
0016                   VarParsing.VarParsing.multiplicity.singleton, 
0017                   VarParsing.VarParsing.varType.string,
0018                   "the input tag"
0019                   )
0020 
0021 options.parseArguments()
0022 
0023 
0024 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0025 process.MessageLogger.cerr.FwkReport.reportEvery = 1000000
0026 
0027 # the module writing to DB
0028 from CondTools.HLT.alCaRecoTriggerBitsRcdRead_cfi import alCaRecoTriggerBitsRcdRead as _alCaRecoTriggerBitsRcdRead
0029 process.AlCaRecoTriggerBitsRcdRead = _alCaRecoTriggerBitsRcdRead.clone()
0030 # 'twiki' is default - others are text, python (future: html?)
0031 #process.AlCaRecoTriggerBitsRcdRead.outputType = 'twiki'
0032 # If rawFileName stays empty (default), use the message logger for output.
0033 # Otherwise use the file name specified, adding a suffix according to outputType:
0034 process.AlCaRecoTriggerBitsRcdRead.rawFileName = 'triggerBits'+options.inputTag
0035 
0036 # No data, but might want to specify the 'firstRun' to check (default is 1):
0037 process.source = cms.Source("EmptySource",
0038                             numberEventsInRun = cms.untracked.uint32(1), # do not change!
0039                             firstRun = cms.untracked.uint32(1)
0040                             )
0041 # With 'numberEventsInRun = 1' above,
0042 # this will check IOVs until run (!) number specified as 'input' here,
0043 # so take care to choose a one that is not too small...:
0044 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(500000) )
0045 
0046 # Input for AlCaRecoTriggerBitsRcd,
0047 # either via GlobalTag
0048 # (loading of Configuration.StandardSequences.CondDBESSource_cff equivalent to CondCore.ESSources.CondDBESSource_cfi
0049 # as entry point for condition records in the EventSetup,
0050 # but sufficient and faster than Configuration.StandardSequences.FrontierConditions_GlobalTag_cff):
0051 #from Configuration.AlCa.autoCond import autoCond
0052 #process.load("Configuration.StandardSequences.CondDBESSource_cff")
0053 #process.GlobalTag.globaltag = autoCond['run2_data'] #choose your tag
0054 
0055 # ...or specify database and tag:  
0056 from CondCore.CondDB.CondDB_cfi import *
0057 #CondDBTriggerBits = CondDB.clone(connect = cms.string('frontier://FrontierProd/CMS_COND_31X_HLT'))
0058 CondDBTriggerBits = CondDB.clone(connect = cms.string(options.inputDB))
0059 process.dbInput = cms.ESSource("PoolDBESSource",
0060                               CondDBTriggerBits,
0061                               toGet = cms.VPSet(cms.PSet(record = cms.string('AlCaRecoTriggerBitsRcd'),
0062                                                          tag = cms.string(options.inputTag) # choose tag you want
0063                                                          )
0064                                                 )
0065                               )
0066 
0067 # Put module in path:
0068 process.p = cms.Path(process.AlCaRecoTriggerBitsRcdRead)