Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:44

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("writeCTPPSBeamParameters")
0004 
0005 # Load CondDB service
0006 process.load("CondCore.CondDB.CondDB_cfi")
0007 
0008 # output database (in this case local sqlite file)
0009 process.CondDB.connect = 'sqlite_file:CTPPSBeamParameters.db'
0010 
0011 # A data source must always be defined. We don't need it, so here's a dummy one.
0012 process.source = cms.Source("EmptyIOVSource",
0013     timetype = cms.string('runnumber'),
0014     # timetype = cms.string('lumiid'),
0015     firstValue = cms.uint64(1),
0016     lastValue = cms.uint64(1),
0017     interval = cms.uint64(1)
0018 )
0019 
0020 # We define the output service.
0021 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0022     process.CondDB,
0023     # timetype = cms.untracked.string('runnumber'),
0024     # timetype = cms.untracked.string('timestamp'),
0025     timetype = cms.untracked.string('lumiid'),
0026     toPut = cms.VPSet(cms.PSet(
0027         record = cms.string('CTPPSBeamParametersRcd'),
0028         tag = cms.string('CTPPSBeamParameters_v1')
0029     ))
0030 )
0031 
0032 process.parameters_maker = cms.EDAnalyzer("WriteCTPPSBeamParameters",
0033     record = cms.string('CTPPSBeamParametersRcd'),
0034     loggingOn= cms.untracked.bool(True),
0035     SinceAppendMode=cms.bool(True),
0036     Source=cms.PSet(
0037         IOVRun=cms.untracked.uint32(1)
0038     )
0039 )
0040 
0041 process.path = cms.Path(process.parameters_maker)