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 from CondCore.ESSources.PoolDBESSource_cfi import GlobalTag
0004 
0005 options = VarParsing.VarParsing()
0006 options.register('runNumber',
0007                  4294967294, #default value
0008                  VarParsing.VarParsing.multiplicity.singleton,
0009                  VarParsing.VarParsing.varType.int,
0010                  "Run number; default gives latest IOV")
0011 options.register('globalTag',
0012                  'GR_P_V50', #default value
0013                  VarParsing.VarParsing.multiplicity.singleton,
0014                  VarParsing.VarParsing.varType.string,
0015                  "GlobalTag")
0016 options.parseArguments()
0017 
0018 import FWCore.ParameterSet.Config as cms
0019 
0020 
0021 process = cms.Process("TEST")
0022 
0023 #process.add_(cms.Service("PrintEventSetupDataRetrieval", printProviders=cms.untracked.bool(True)))
0024 
0025 CondDBSetup = cms.PSet( DBParameters = cms.PSet(
0026                                                 messageLevel = cms.untracked.int32(3),
0027                                                 )
0028                         )
0029 
0030 process.GlobalTag = cms.ESSource("PoolDBESSource",
0031                                  CondDBSetup,
0032                                  #connect = cms.string('oracle://cms_orcon_adg/CMS_CONDITIONS'),
0033                                  connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'),
0034                                  #    connect = cms.string('sqlite_fip:CondCore/TagCollection/data/GlobalTag.db'), #For use during release integration
0035                                  globaltag = cms.string(''),
0036                                  snapshotTime = cms.string('2012-01-20 23:59:59.000'),
0037                                  RefreshEachRun=cms.untracked.bool(False),
0038                                  DumpStat=cms.untracked.bool(False),
0039                                  pfnPrefix=cms.untracked.string(''),   
0040                                  pfnPostfix=cms.untracked.string('')
0041                                  )
0042 
0043 
0044 process.GlobalTag.globaltag = options.globalTag
0045 process.GlobalTag.DumpStat =  True
0046 process.GlobalTag.toGet = cms.VPSet()
0047 process.GlobalTag.toGet.append(
0048    cms.PSet(record = cms.string("BeamSpotObjectsRcd"),
0049             snapshotTime = cms.string('2014-01-01 00:00:00.000'),
0050            )
0051 )
0052 
0053 
0054 
0055 process.source = cms.Source("EmptyIOVSource",
0056                             lastValue = cms.uint64(options.runNumber+1),
0057                             timetype = cms.string('runnumber'),
0058                             firstValue = cms.uint64(options.runNumber-1),
0059                             interval = cms.uint64(1)
0060                             )
0061 
0062 
0063 process.get = cms.EDAnalyzer("EventSetupRecordDataGetter",
0064                              toGet =  cms.VPSet(),
0065                              verbose = cms.untracked.bool(True)
0066                              )
0067 
0068 process.p = cms.Path(process.get)