Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-13 13:13:46

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 options = VarParsing.VarParsing()
0005 options.register('runNumber',
0006                  1, #default value, int limit -3                                                                                                                              
0007                  VarParsing.VarParsing.multiplicity.singleton,
0008                  VarParsing.VarParsing.varType.int,
0009                  "Run number")
0010 options.register('transDelay',
0011                  0, #default value, int limit -3                                                                                                                            
0012                  VarParsing.VarParsing.multiplicity.singleton,
0013                  VarParsing.VarParsing.varType.int,
0014                  "delay in seconds for the commit of the db transaction")
0015 options.parseArguments()
0016 
0017 process = cms.Process("TEST")
0018 
0019 process.source = cms.Source("EmptySource",
0020                             firstRun = cms.untracked.uint32( options.runNumber ),
0021                             firstLuminosityBlock = cms.untracked.uint32( 1 ),
0022                             numberEventsInRun = cms.untracked.uint32( 30 ),
0023                             numberEventsInLuminosityBlock = cms.untracked.uint32(3),
0024 )
0025 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(30))
0026 
0027 process.MessageLogger = cms.Service("MessageLogger",
0028                                     cout = cms.untracked.PSet(threshold = cms.untracked.string('INFO')),
0029                                     destinations = cms.untracked.vstring('cout')
0030                                     )
0031 
0032 process.OnlineDBOutputService = cms.Service("OnlineDBOutputService",
0033     DBParameters = cms.PSet(
0034         messageLevel = cms.untracked.int32(1),
0035         authenticationPath = cms.untracked.string('.')
0036     ),
0037     jobName = cms.untracked.string("TestLumiBasedUpdate"),
0038     connect = cms.string('oracle://cms_orcoff_prep/CMS_CONDITIONS'),
0039     preLoadConnectionString = cms.untracked.string('frontier://FrontierPrep/CMS_CONDITIONS'),
0040     runNumber = cms.untracked.uint64(options.runNumber),
0041     lastLumiFile = cms.untracked.string('last_lumi.txt'),
0042     frontierKey = cms.untracked.string('test'),
0043     writeTransactionDelay = cms.untracked.uint32(options.transDelay),
0044     autoCommit = cms.untracked.bool(True),
0045     saveLogsOnDB = cms.untracked.bool(True),
0046     toPut = cms.VPSet(cms.PSet(
0047         record = cms.string('PedestalsRcd'),
0048         tag = cms.string('BeamSpot_test_updateByLumi_01'),
0049         timetype = cms.untracked.string('Lumi'),
0050         refreshTime = cms.untracked.uint32( 2 ),
0051         onlyAppendUpdatePolicy = cms.untracked.bool(True)
0052     ))
0053 )
0054 
0055 process.mytest = cms.EDAnalyzer("LumiBasedUpdateAnalyzer",
0056     record = cms.untracked.string('PedestalsRcd'),
0057     iovSize = cms.untracked.uint32(4),
0058     lastLumiFile = cms.untracked.string('last_lumi.txt'),
0059 )
0060 
0061 process.p = cms.Path(process.mytest)
0062 
0063 
0064