CMS 3D CMS Logo

EcalLaser_express_popcon.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from CondCore.Utilities.popcon2dropbox_job_conf import options, psetForRecord, setup_popcon
3 import CondTools.Ecal.db_credentials as auth
4 
5 recordName = "EcalLaserAPDPNRatiosRcd"
6 tagTimeType = "timestamp"
7 
8 process = setup_popcon( recordName, tagTimeType )
9 
10 process.MessageLogger = cms.Service("MessageLogger",
11  debugModules = cms.untracked.vstring('*'),
12  destinations = cms.untracked.vstring('cout')
13 )
14 
15 process.essource = cms.ESSource("PoolDBESSource",
16  connect = cms.string( str(options.destinationDatabase)),
17  DumpStat=cms.untracked.bool(True),
18  toGet = cms.VPSet( psetForRecord( recordName ) )
19 )
20 
21 db_reader_account = 'CMS_ECAL_R'
22 db_service,db_user,db_pwd = auth.get_db_credentials( db_reader_account )
23 
24 process.conf_o2o = cms.EDAnalyzer("ExTestEcalLaserAnalyzer",
25  SinceAppendMode = cms.bool(True),
26  record = cms.string( recordName ),
27  loggingOn = cms.untracked.bool(True),
28  Source = cms.PSet(
29  # maxtime is mandatory
30  # it can be expressed either as an absolute time with format YYYY-MM-DD HH24:MI:SS
31  # or as a relative time w.r.t. now, using -N, where N is expressed in units of hours
32  maxtime = cms.string("-1"),
33  sequences = cms.string("20"),
34  OnlineDBUser = cms.string(db_user),
35  # debug must be False for production
36  debug = cms.bool(False),
37  # if fake is True, no insertion in the db is performed
38  fake = cms.bool(False),
39  OnlineDBPassword = cms.string(db_pwd),
40  OnlineDBSID = cms.string(db_service)
41  ),
42  targetDBConnectionString = cms.untracked.string(str(options.destinationDatabase))
43 )
44 
45 process.p = cms.Path(process.conf_o2o)
46 
popcon2dropbox_job_conf.psetForRecord
def psetForRecord(recordName)
Definition: popcon2dropbox_job_conf.py:52
str
#define str(s)
Definition: TestProcessor.cc:53
popcon2dropbox_job_conf.setup_popcon
def setup_popcon(recordName, tagTimeType)
Definition: popcon2dropbox_job_conf.py:24