CMS 3D CMS Logo

EcalLaser_prompt_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_service,db_user,db_pwd = auth.get_readOnly_db_credentials()
22 
23 process.conf_o2o = cms.EDAnalyzer("ExTestEcalLaserAnalyzer",
24  SinceAppendMode = cms.bool(True),
25  record = cms.string( recordName ),
26  loggingOn = cms.untracked.bool(True),
27  Source = cms.PSet(
28  # maxtime is mandatory
29  # it can be expressed either as an absolute time with format YYYY-MM-DD HH24:MI:SS
30  # or as a relative time w.r.t. now, using -N, where N is expressed in units of hours
31  maxtime = cms.string("-30"),
32  sequences = cms.string("20"),
33  OnlineDBUser = cms.string(db_user),
34  # debug must be False for production
35  debug = cms.bool(False),
36  # if fake is True, no insertion in the db is performed
37  fake = cms.bool(False),
38  OnlineDBPassword = cms.string(db_pwd),
39  OnlineDBSID = cms.string(db_service)
40  ),
41  targetDBConnectionString = cms.untracked.string(str(options.destinationDatabase))
42 )
43 
44 process.p = cms.Path(process.conf_o2o)
45 
def setup_popcon(recordName, tagTimeType)
#define str(s)