Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # 
0002 #
0003 # Read from xml and insert into database using
0004 # PopCon 
0005 #
0006 # This is a template, generate real test using
0007 #
0008 # sed 's/EcalTBWeights/your-record/g' testTemplate.py > testyourrecord.py
0009 #
0010 # Stefano Argiro', $Id: testEcalTBWeights.py,v 1.1 2008/11/14 15:46:03 argiro Exp $
0011 #
0012 #
0013 
0014 import FWCore.ParameterSet.Config as cms
0015 
0016 process = cms.Process("TEST")
0017 
0018 process.MessageLogger = cms.Service("MessageLogger",
0019     cerr = cms.untracked.PSet(
0020         enable = cms.untracked.bool(False)
0021     ),
0022     cout = cms.untracked.PSet(
0023         enable = cms.untracked.bool(True),
0024         threshold = cms.untracked.string('INFO')
0025     )
0026 )
0027 
0028 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0029 process.CondDBCommon.connect = cms.string('sqlite_file:testEcalTBWeights.db')
0030 #process.CondDBCommon.connect = cms.string('oracle://cms_orcon_prod/CMS_COND_31X_ECAL')
0031 process.CondDBCommon.DBParameters.authenticationPath = cms.untracked.string('/nfshome0/popcondev/conddb')
0032 
0033 process.source = cms.Source("EmptyIOVSource",
0034     timetype = cms.string('runnumber'),
0035     firstValue = cms.uint64(1),
0036     lastValue  = cms.uint64(1),
0037     interval = cms.uint64(1)
0038 )
0039 
0040 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0041     process.CondDBCommon,
0042     timetype = cms.untracked.string('runnumber'),
0043     toPut = cms.VPSet(cms.PSet(
0044         record = cms.string('EcalTBWeightsRcd'),
0045         tag = cms.string('EcalTBWeights_EBEE_BeamComm09_offline')
0046          )),
0047     logconnect= cms.untracked.string('sqlite_file:logtestEcalTBWeights.db')                                     
0048 )
0049 
0050 #    xmlFile = cms.untracked.string('CMS_Ecal_Weights_V0.xml'),
0051 
0052 process.mytest = cms.EDAnalyzer("EcalTBWeightsAnalyzer",
0053     record = cms.string('EcalTBWeightsRcd'),
0054     loggingOn= cms.untracked.bool(True),
0055     SinceAppendMode=cms.bool(True),
0056     Source=cms.PSet(
0057     xmlFile = cms.untracked.string('EcalWeightsBasedOnEcalSimAlgoV02-01-04_0.xml'),
0058     since = cms.untracked.int64(1)
0059     )                            
0060 )
0061 
0062 process.p = cms.Path(process.mytest)
0063 
0064 
0065 
0066