CMS 3D CMS Logo

updateIntercali_test.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import CondTools.Ecal.conddb_init as conddb_init
3 import CondTools.Ecal.db_credentials as auth
4 
5 process = cms.Process("ProcessOne")
6 
7 process.MessageLogger = cms.Service("MessageLogger",
8  debugModules = cms.untracked.vstring('*'),
9  cout = cms.untracked.PSet(
10  threshold = cms.untracked.string('DEBUG')
11  ),
12  destinations = cms.untracked.vstring('cout')
13 )
14 
15 process.source = cms.Source("EmptyIOVSource",
16  lastValue = cms.uint64(100000000000),
17  timetype = cms.string('runnumber'),
18  firstValue = cms.uint64(100000000000),
19  interval = cms.uint64(1)
20 )
21 
22 process.load("CondCore.CondDB.CondDB_cfi")
23 
24 process.CondDB.DBParameters.authenticationPath = ''
25 process.CondDB.connect = conddb_init.options.destinationDatabase
26 if process.CondDB.connect == '':
27  process.CondDB.connect = 'sqlite_file:EcalIntercalibConstants_test.db'
28 
29 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
30  process.CondDB,
31  toPut = cms.VPSet(cms.PSet(
32  record = cms.string('EcalIntercalibConstantsRcd'),
33  tag = cms.string('EcalIntercalib_test')
34  ))
35 )
36 
37 db_service,db_user,db_pwd = auth.get_readOnly_db_credentials()
38 
39 process.Test1 = cms.EDAnalyzer("ExTestEcalIntercalibAnalyzer",
40  record = cms.string('EcalIntercalibConstantsRcd'),
41  loggingOn= cms.untracked.bool(True),
42  IsDestDbCheckedInQueryLog=cms.untracked.bool(True),
43  SinceAppendMode=cms.bool(True),
44  Source=cms.PSet(
45  FileLowField = cms.string('Intercalib_Boff.xml'),
46  FileHighField = cms.string('Intercalib_Bon.xml'),
47  Value_Bon = cms.untracked.double(0.7041),
48  firstRun = cms.string('207149'),
49  lastRun = cms.string('10000000'),
50  OnlineDBSID = cms.string(db_service),
51  OnlineDBUser = cms.string(db_user),
52  OnlineDBPassword = cms.string( db_pwd ),
53  LocationSource = cms.string('P5'),
54  Location = cms.string('P5_Co'),
55  GenTag = cms.string('GLOBAL'),
56  RunType = cms.string('COSMICS')
57  )
58 )
59 
60 process.p = cms.Path(process.Test1)