CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
copyPedestalsMC.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import CondTools.Ecal.db_credentials as auth
3 
4 process = cms.Process("ProcessOne")
5 process.load("CondCore.CondDB.CondDB_cfi")
6 process.CondDB.connect = 'sqlite_file:EcalPedestals_mc2016_corrected.db'
7 
8 process.MessageLogger = cms.Service("MessageLogger",
9  debugModules = cms.untracked.vstring('*'),
10  destinations = cms.untracked.vstring('cout')
11 )
12 
13 process.source = cms.Source("EmptyIOVSource",
14  firstValue = cms.uint64(1),
15  lastValue = cms.uint64(1),
16  timetype = cms.string('runnumber'),
17  interval = cms.uint64(1)
18 )
19 
20 db_reader_account = 'CMS_ECAL_R'
21 db_service,db_user,db_pwd = auth.get_db_credentials( db_reader_account )
22 
23 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
24  process.CondDB,
25  logconnect = cms.untracked.string('sqlite_file:DBLog.db'),
26  timetype = cms.untracked.string('runnumber'),
27  toPut = cms.VPSet(
28  cms.PSet(
29  record = cms.string('EcalPedestalsRcd'),
30  tag = cms.string('EcalPedestals_MC')
31  )
32  )
33 )
34 
35 process.Test1 = cms.EDAnalyzer("ExTestEcalPedestalsAnalyzer",
36  SinceAppendMode = cms.bool(True),
37  record = cms.string('EcalPedestalsRcd'),
38  loggingOn = cms.untracked.bool(True),
39  Source = cms.PSet(
40  GenTag = cms.string('***'),
41  RunTag = cms.string('***'),
42  OnlineDBUser = cms.string(db_user),
43  OnlineDBPassword = cms.string(db_pwd),
44  OnlineDBSID = cms.string(db_service),
45  Location = cms.string('***'),
46  LocationSource = cms.string('MC'),
47  filename = cms.untracked.string('./Pedestals_278181.xml'),
48 # filename = cms.untracked.string('./Pedestals_303848.xml'),
49 # filename = cms.untracked.string('./Pedestals_304211.xml'),
50  firstRun = cms.string('1'),
51  lastRun = cms.string('100000000'),
52  corrected = cms.untracked.bool(True),
53  debug = cms.bool(False)
54  )
55 )
56 
57 process.p = cms.Path(process.Test1)
58 
59