Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # 
0002 #
0003 # Read from xml and insert into database using PopCon 
0004 #
0005 # This is a template, generate real test using
0006 #
0007 # sed 's/EcalGainRatios/your-record/g' testTemplate.py > testyourrecord.py
0008 #
0009 # Stefano Argiro', $Id: testEcalGainRatios.py,v 1.1 2008/11/14 15:46:03 argiro Exp $
0010 #
0011 #
0012 
0013 import FWCore.ParameterSet.Config as cms
0014 
0015 process = cms.Process("TEST")
0016 
0017 process.MessageLogger = cms.Service("MessageLogger",
0018     cerr = cms.untracked.PSet(
0019         enable = cms.untracked.bool(False)
0020     ),
0021     cout = cms.untracked.PSet(
0022         enable = cms.untracked.bool(True)
0023     )
0024 )
0025 process.load("CondCore.CondDB.CondDB_cfi")
0026 process.CondDB.connect = 'sqlite_file:EcalTimeOffsetConstant.db'
0027 
0028 
0029 process.source = cms.Source("EmptyIOVSource",
0030     timetype = cms.string('runnumber'),
0031     firstValue = cms.uint64(1),
0032     lastValue  = cms.uint64(1),
0033     interval = cms.uint64(1)
0034 )
0035 
0036 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0037     process.CondDB,
0038     timetype = cms.untracked.string('runnumber'),
0039     toPut = cms.VPSet(cms.PSet(
0040         record = cms.string('EcalTimeOffsetConstantRcd'),
0041         tag = cms.string('EcalTimeOffsetConstant_204623_minus1ns')
0042          )),
0043                                  
0044 )
0045 
0046 process.mytest = cms.EDAnalyzer("EcalTimeOffsetConstantAnalyzer",
0047     record = cms.string('EcalTimeOffsetConstantRcd'),
0048     loggingOn= cms.untracked.bool(True),
0049     SinceAppendMode=cms.bool(True),
0050     Source=cms.PSet(
0051     xmlFile = cms.untracked.string('EcalTimeOffset_204623_minus1ns.xml'),
0052     since = cms.untracked.int64(1)
0053     )
0054 )
0055 
0056 process.p = cms.Path(process.mytest)
0057 
0058 
0059 
0060