2 import FWCore.ParameterSet.Config
as cms
3 import FWCore.ParameterSet.VarParsing
as VarParsing
4 process = cms.Process(
"LHCInfoPopulator")
11 sourceConnection =
'oracle://cms_omds_adg/CMS_RUNINFO_R'
12 if socket.getfqdn().
find(
'.cms') != -1:
13 sourceConnection =
'oracle://cms_omds_lb/CMS_RUNINFO_R'
16 options.register(
'destinationConnection'
17 ,
'sqlite_file:lhcinfo_pop_test.db'
18 , VarParsing.VarParsing.multiplicity.singleton
19 , VarParsing.VarParsing.varType.string
20 ,
"Connection string to the DB where payloads will be possibly written."
22 options.register(
'targetConnection'
24 , VarParsing.VarParsing.multiplicity.singleton
25 , VarParsing.VarParsing.varType.string
26 ,
"""Connection string to the target DB:
27 if not empty (default), this provides the latest IOV and payloads to compare;
28 it is the DB where payloads should be finally uploaded."""
30 options.register(
'tag'
31 ,
'LHCInfo_PopCon_start_test'
32 , VarParsing.VarParsing.multiplicity.singleton
33 , VarParsing.VarParsing.varType.string
34 ,
"Tag written in destinationConnection and finally appended in targetConnection."
36 options.register(
'messageLevel'
38 , VarParsing.VarParsing.multiplicity.singleton
39 , VarParsing.VarParsing.varType.int
40 ,
"Message level; default to 0"
42 options.parseArguments()
44 CondDBConnection = CondDB.clone( connect = cms.string( options.destinationConnection ) )
45 CondDBConnection.DBParameters.messageLevel = cms.untracked.int32( options.messageLevel )
47 process.MessageLogger = cms.Service(
"MessageLogger",
48 cout = cms.untracked.PSet(threshold = cms.untracked.string(
'INFO')),
49 destinations = cms.untracked.vstring(
'cout')
52 process.source = cms.Source(
"EmptyIOVSource",
53 lastValue = cms.uint64(1),
54 timetype = cms.string(
'runnumber'),
55 firstValue = cms.uint64(1),
56 interval = cms.uint64(1)
59 process.PoolDBOutputService = cms.Service(
"PoolDBOutputService",
61 timetype = cms.untracked.string(
'timestamp'),
62 toPut = cms.VPSet(cms.PSet(record = cms.string(
'LHCInfoRcd'),
63 tag = cms.string( options.tag )
68 process.Test1 = cms.EDAnalyzer(
"LHCInfoPopConAnalyzer",
69 SinceAppendMode = cms.bool(
True),
70 record = cms.string(
'LHCInfoRcd'),
71 name = cms.untracked.string(
'LHCInfo'),
72 Source = cms.PSet(fill = cms.untracked.uint32(6417),
73 startTime = cms.untracked.string(
'2018-04-01 00:00:00.000'),
75 samplingInterval = cms.untracked.uint32( 600 ),
76 endFill = cms.untracked.bool(
False),
77 connectionString = cms.untracked.string(
"oracle://cms_orcon_adg/CMS_RUNTIME_LOGGER"),
78 ecalConnectionString = cms.untracked.string(
"oracle://cms_orcon_adg/CMS_DCS_ENV_PVSS_COND"),
79 DIPSchema = cms.untracked.string(
"CMS_BEAM_COND"),
81 debug=cms.untracked.bool(
False)
83 loggingOn = cms.untracked.bool(
True),
84 IsDestDbCheckedInQueryLog = cms.untracked.bool(
False)
87 process.p = cms.Path(process.Test1)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)