CMS 3D CMS Logo

testEcalTimeOffset.py
Go to the documentation of this file.
1 #
2 #
3 # Read from xml and insert into database using PopCon
4 #
5 # This is a template, generate real test using
6 #
7 # sed 's/EcalGainRatios/your-record/g' testTemplate.py > testyourrecord.py
8 #
9 # Stefano Argiro', $Id: testEcalGainRatios.py,v 1.1 2008/11/14 15:46:03 argiro Exp $
10 #
11 #
12 
13 import FWCore.ParameterSet.Config as cms
14 
15 process = cms.Process("TEST")
16 
17 process.MessageLogger=cms.Service("MessageLogger",
18  destinations=cms.untracked.vstring("cout"),
19  cout=cms.untracked.PSet(
20  )
21 )
22 process.load("CondCore.CondDB.CondDB_cfi")
23 process.CondDB.connect = 'sqlite_file:EcalTimeOffsetConstant.db'
24 
25 
26 process.source = cms.Source("EmptyIOVSource",
27  timetype = cms.string('runnumber'),
28  firstValue = cms.uint64(1),
29  lastValue = cms.uint64(1),
30  interval = cms.uint64(1)
31 )
32 
33 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
34  process.CondDB,
35  timetype = cms.untracked.string('runnumber'),
36  toPut = cms.VPSet(cms.PSet(
37  record = cms.string('EcalTimeOffsetConstantRcd'),
38  tag = cms.string('EcalTimeOffsetConstant_204623_minus1ns')
39  )),
40 
41 )
42 
43 process.mytest = cms.EDAnalyzer("EcalTimeOffsetConstantAnalyzer",
44  record = cms.string('EcalTimeOffsetConstantRcd'),
45  loggingOn= cms.untracked.bool(True),
46  SinceAppendMode=cms.bool(True),
47  Source=cms.PSet(
48  xmlFile = cms.untracked.string('EcalTimeOffset_204623_minus1ns.xml'),
49  since = cms.untracked.int64(1)
50  )
51 )
52 
53 process.p = cms.Path(process.mytest)
54 
55 
56 
57