Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:02

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/EcalADCToGeVConstant/your-record/g'             testTemplate.py > testyourrecord.py
0009 #
0010 # for example
0011 #
0012 
0013 # sed 's/EcalADCToGeVConstant/EcalADCToGevConstant/g'    testTemplate.py > testEcalADCToGevConstant.py
0014 # sed 's/EcalADCToGeVConstant/EcalChannelStatus/g'       testTemplate.py > ! testEcalChannelStatus.py
0015 # sed 's/EcalADCToGeVConstant/EcalGainRatios/g'          testTemplate.py > ! testEcalGainRatios.py
0016 # sed 's/EcalADCToGeVConstant/EcalIntercalibConstants/g' testTemplate.py > ! testEcalIntercalibConstants.py
0017 # sed 's/EcalADCToGeVConstant/EcalIntercalibErrors/g'    testTemplate.py > ! testEcalIntercalibErrors.py
0018 # sed 's/EcalADCToGeVConstant/EcalTBWeights/g'           testTemplate.py > ! testEcalTBWeights.py
0019 # sed 's/EcalADCToGeVConstant/EcalWeightXtalGroup/g'     testTemplate.py > ! testEcalWeightXtalGroup.py
0020 #
0021 # Stefano Argiro', $Id: testEcalADCToGeVConstant.py,v 1.1 2008/11/14 15:46:03 argiro Exp $
0022 #
0023 #
0024 
0025 import FWCore.ParameterSet.Config as cms
0026 
0027 process = cms.Process("TEST")
0028 
0029 process.MessageLogger = cms.Service("MessageLogger",
0030     cerr = cms.untracked.PSet(
0031         enable = cms.untracked.bool(False)
0032     ),
0033     cout = cms.untracked.PSet(
0034         enable = cms.untracked.bool(True),
0035         treshold = cms.untracked.string('INFO')
0036     )
0037 )
0038 
0039 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0040 process.CondDBCommon.connect = cms.string('sqlite_file:testEcalADCToGeVConstant.db')
0041 process.CondDBCommon.DBParameters.authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0042 
0043 process.source = cms.Source("EmptyIOVSource",
0044     timetype = cms.string('runnumber'),
0045     firstValue = cms.uint64(1),
0046     lastValue  = cms.uint64(2),
0047     interval = cms.uint64(1)
0048 )
0049 
0050 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0051     process.CondDBCommon,
0052     timetype = cms.untracked.string('runnumber'),
0053     toPut = cms.VPSet(cms.PSet(
0054         record = cms.string('EcalADCToGeVConstantRcd'),
0055         tag = cms.string('mytest')
0056          )),
0057     logconnect= cms.untracked.string('sqlite_file:logtestEcalADCToGeVConstant.db')                                     
0058 )
0059 
0060 process.mytest = cms.EDAnalyzer("EcalADCToGeVConstantAnalyzer",
0061     record = cms.string('EcalADCToGeVConstantRcd'),
0062     loggingOn= cms.untracked.bool(True),
0063     SinceAppendMode=cms.bool(True),
0064     Source=cms.PSet(
0065     xmlFile = cms.untracked.string('/tmp/EcalADCToGeVConstant.xml'),
0066     since = cms.untracked.int64(3)
0067     )                            
0068 )
0069 
0070 process.p = cms.Path(process.mytest)
0071 
0072 
0073 
0074