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  cerr = cms.untracked.PSet(
19  enable = cms.untracked.bool(False)
20  ),
21  cout = cms.untracked.PSet(
22  enable = cms.untracked.bool(True)
23  )
24 )
25 process.load("CondCore.CondDB.CondDB_cfi")
26 process.CondDB.connect = 'sqlite_file:EcalTimeOffsetConstant.db'
27 
28 
29 process.source = cms.Source("EmptyIOVSource",
30  timetype = cms.string('runnumber'),
31  firstValue = cms.uint64(1),
32  lastValue = cms.uint64(1),
33  interval = cms.uint64(1)
34 )
35 
36 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
37  process.CondDB,
38  timetype = cms.untracked.string('runnumber'),
39  toPut = cms.VPSet(cms.PSet(
40  record = cms.string('EcalTimeOffsetConstantRcd'),
41  tag = cms.string('EcalTimeOffsetConstant_204623_minus1ns')
42  )),
43 
44 )
45 
46 process.mytest = cms.EDAnalyzer("EcalTimeOffsetConstantAnalyzer",
47  record = cms.string('EcalTimeOffsetConstantRcd'),
48  loggingOn= cms.untracked.bool(True),
49  SinceAppendMode=cms.bool(True),
50  Source=cms.PSet(
51  xmlFile = cms.untracked.string('EcalTimeOffset_204623_minus1ns.xml'),
52  since = cms.untracked.int64(1)
53  )
54 )
55 
56 process.p = cms.Path(process.mytest)
57 
58 
59 
60