Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:35

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 options = VarParsing.VarParsing()
0004 options.register('runNumber',
0005                  186234, #default value
0006                  VarParsing.VarParsing.multiplicity.singleton,
0007                  VarParsing.VarParsing.varType.int,
0008                  "Run number; default gives latest IOV")
0009 options.register('globalTag',
0010                  'GR_P_V50', #default value
0011                  VarParsing.VarParsing.multiplicity.singleton,
0012                  VarParsing.VarParsing.varType.string,
0013                  "GlobalTag")
0014 options.parseArguments()
0015 
0016 
0017 process = cms.Process("TEST")
0018 
0019 process.load("CondCore.ESSources.CondDBESSource_cfi")
0020 process.GlobalTag.globaltag = options.globalTag
0021 process.GlobalTag.RefreshEachRun=cms.untracked.bool(False)
0022 process.GlobalTag.DumpStat=cms.untracked.bool(True)
0023 process.GlobalTag.pfnPrefix=cms.untracked.string('')
0024 process.GlobalTag.pfnPostfix=cms.untracked.string('')
0025 
0026 
0027 process.GlobalTag.toGet = cms.VPSet()
0028 process.GlobalTag.toGet.append(
0029    cms.PSet(record = cms.string("BeamSpotObjectsRcd"),
0030             tag = cms.string("firstcollisions"),
0031            )
0032 )
0033 
0034 
0035 
0036 process.source = cms.Source("EmptyIOVSource",
0037                             lastValue = cms.uint64(options.runNumber+1),
0038                             timetype = cms.string('runnumber'),
0039                             firstValue = cms.uint64(options.runNumber-1),
0040                             interval = cms.uint64(1)
0041                             )
0042 
0043 
0044 process.get = cms.EDAnalyzer("EventSetupRecordDataGetter",
0045                              toGet =  cms.VPSet(),
0046                              verbose = cms.untracked.bool(True)
0047                              )
0048 
0049 process.p = cms.Path(process.get)