Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-16 23:25:23

0001 
0002 from __future__ import print_function
0003 import time
0004 
0005 import FWCore.ParameterSet.Config as cms
0006 import FWCore.ParameterSet.VarParsing as VarParsing
0007 from Configuration.AlCa.autoCond import autoCond
0008 
0009 options = VarParsing.VarParsing()
0010 options.register('connectionString',
0011                  'sqlite_file:cms_conditions.db', #default value
0012                  VarParsing.VarParsing.multiplicity.singleton,
0013                  VarParsing.VarParsing.varType.string,
0014                  "CondDB Connection string")
0015 options.register('tag',
0016                  'BeamSpot_test_updateByLumi_00',
0017                  VarParsing.VarParsing.multiplicity.singleton,
0018                  VarParsing.VarParsing.varType.string,
0019                  "tag for record BeamSpotObjectsRcd")
0020 options.register('runNumber',
0021                  250000, #default value, int limit -3
0022                  VarParsing.VarParsing.multiplicity.singleton,
0023                  VarParsing.VarParsing.varType.int,
0024                  "Run number; default gives latest IOV")
0025 options.register('messageLevel',
0026                  0, #default value
0027                  VarParsing.VarParsing.multiplicity.singleton,
0028                  VarParsing.VarParsing.varType.int,
0029                  "Message level; default to 0")
0030 
0031 options.parseArguments()
0032 
0033 process = cms.Process("TEST")
0034 
0035 process.MessageLogger = cms.Service("MessageLogger",
0036                                     cout = cms.untracked.PSet(threshold = cms.untracked.string('INFO')),
0037                                     destinations = cms.untracked.vstring('cout')
0038                                     )
0039 
0040 CondDBParameters = cms.PSet( 
0041                              messageLevel = cms.untracked.int32( 3 ),
0042                              )
0043 
0044 process.source = cms.Source( "EmptySource",
0045                              firstRun = cms.untracked.uint32( 1 ),
0046                              firstLuminosityBlock = cms.untracked.uint32( 1 ),
0047                              numberEventsInRun = cms.untracked.uint32( 1 ), 
0048                              numberEventsInLuminosityBlock = cms.untracked.uint32( 1 )
0049                              )
0050 
0051 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1))
0052 
0053 process.prod = cms.EDAnalyzer("LumiTestWriteAnalyzer",
0054                               connectionString = cms.untracked.string(options.connectionString ),
0055                               tagName = cms.untracked.string(options.tag),
0056                               runNumber = cms.untracked.uint32(options.runNumber),
0057                               numberOfLumis = cms.untracked.uint32(24),
0058                               iovSize = cms.untracked.uint32(4)
0059 )
0060 
0061 process.p = cms.Path( process.prod )
0062 
0063 for name, module in process.es_sources_().items():
0064     print("ESModules> provider:%s '%s'" % ( name, module.type_() ))
0065 for name, module in process.es_producers_().items():
0066     print("ESModules> provider:%s '%s'" % ( name, module.type_() ))