File indexing completed on 2024-04-06 12:29:06
0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003
0004 options = VarParsing.VarParsing()
0005 options.register('unitTest',
0006 False,
0007 VarParsing.VarParsing.multiplicity.singleton,
0008 VarParsing.VarParsing.varType.bool,
0009 "are we running the unit test?")
0010 options.register('inputFile',
0011 "EarlyCollision.txt",
0012 VarParsing.VarParsing.multiplicity.singleton,
0013 VarParsing.VarParsing.varType.string,
0014 "location of the input data")
0015 options.parseArguments()
0016
0017 process = cms.Process("write2DB")
0018 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0019 process.load("CondCore.CondDB.CondDB_cfi")
0020
0021
0022
0023 process.CondDB.connect = "sqlite_file:EarlyCollision.db"
0024
0025
0026 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0027 process.CondDB,
0028 toPut = cms.VPSet(cms.PSet(record = cms.string('BeamSpotObjectsRcd'),
0029 tag = cms.string('EarlyCollision'))),
0030 loadBlobStreamer = cms.untracked.bool(False)
0031 )
0032
0033 process.source = cms.Source("EmptySource")
0034 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
0035 process.beamspot = cms.EDAnalyzer("BeamSpotWrite2DB",
0036 OutputFileName = cms.untracked.string(options.inputFile)
0037 )
0038
0039 process.p = cms.Path(process.beamspot)