CMS 3D CMS Logo

updateADCToGeV_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.connect = conddb_init.options.destinationDatabase
25 if process.CondDB.connect == '':
26  process.CondDB.connect = 'sqlite_file:EcalADCToGeV.db'
27 
28 process.CondDB.DBParameters.authenticationPath = ''
29 
30 db_reader_account = 'CMS_ECAL_R'
31 db_service,db_user,db_pwd = auth.get_db_credentials( db_reader_account )
32 
33 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
34  process.CondDB,
35  logconnect = cms.untracked.string('sqlite_file:log.db'),
36  toPut = cms.VPSet(
37  cms.PSet(
38  record = cms.string('EcalADCToGeVConstantRcd'),
39  tag = cms.string('EcalADCToGeV_test')
40  )
41  )
42 )
43 
44 process.Test1 = cms.EDAnalyzer("ExTestEcalADCToGeVAnalyzer",
45  record = cms.string('EcalADCToGeVConstantRcd'),
46  loggingOn= cms.untracked.bool(True),
47  IsDestDbCheckedInQueryLog=cms.untracked.bool(True),
48  SinceAppendMode=cms.bool(True),
49  Source=cms.PSet(
50  FileLowField = cms.string('ADCToGeV_Boff.xml'),
51  FileHighField = cms.string('ADCToGeV_Bon.xml'),
52  firstRun = cms.string('207149'),
53  lastRun = cms.string('10000000'),
54  OnlineDBSID = cms.string(db_service),
55  OnlineDBUser = cms.string(db_user),
56  OnlineDBPassword = cms.string( db_pwd ),
57  LocationSource = cms.string('P5'),
58  Location = cms.string('P5_Co'),
59  GenTag = cms.string('GLOBAL'),
60  RunType = cms.string('COSMICS')
61  )
62 )
63 
64 process.p = cms.Path(process.Test1)