CMS 3D CMS Logo

LHCInfoPopConAnalyzerEndFill.py
Go to the documentation of this file.
1 import socket
2 import FWCore.ParameterSet.Config as cms
3 import FWCore.ParameterSet.VarParsing as VarParsing
4 process = cms.Process("LHCInfoPopulator")
5 from CondCore.CondDB.CondDB_cfi import *
6 #process.load("CondCore.DBCommon.CondDBCommon_cfi")
7 #process.CondDBCommon.connect = 'sqlite_file:lhcinfo_pop_test.db'
8 #process.CondDBCommon.DBParameters.authenticationPath = '.'
9 #process.CondDBCommon.DBParameters.messageLevel=cms.untracked.int32(1)
10 
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'
14 
15 options = VarParsing.VarParsing()
16 options.register( 'destinationConnection'
17  , 'sqlite_file:lhcinfo_pop_test.db' #default value
18  , VarParsing.VarParsing.multiplicity.singleton
19  , VarParsing.VarParsing.varType.string
20  , "Connection string to the DB where payloads will be possibly written."
21  )
22 options.register( 'targetConnection'
23  , '' #default value
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."""
29  )
30 options.register( 'tag'
31  , 'LHCInfo_PopCon_test'
32  , VarParsing.VarParsing.multiplicity.singleton
33  , VarParsing.VarParsing.varType.string
34  , "Tag written in destinationConnection and finally appended in targetConnection."
35  )
36 options.register( 'messageLevel'
37  , 0 #default value
38  , VarParsing.VarParsing.multiplicity.singleton
39  , VarParsing.VarParsing.varType.int
40  , "Message level; default to 0"
41  )
42 options.parseArguments()
43 
44 CondDBConnection = CondDB.clone( connect = cms.string( options.destinationConnection ) )
45 CondDBConnection.DBParameters.messageLevel = cms.untracked.int32( options.messageLevel )
46 
47 process.MessageLogger = cms.Service("MessageLogger",
48  cout = cms.untracked.PSet(threshold = cms.untracked.string('INFO')),
49  destinations = cms.untracked.vstring('cout')
50  )
51 
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)
57  )
58 
59 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
60  CondDBConnection,
61  timetype = cms.untracked.string('timestamp'),
62  toPut = cms.VPSet(cms.PSet(record = cms.string('LHCInfoRcd'),
63  tag = cms.string( options.tag )
64  )
65  )
66  )
67 
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-05-31 00:00:00.000'),
74  #endTime = cms.untracked.string('2018-05-31 20:13:59.000'),
75  samplingInterval = cms.untracked.uint32( 600 ),
76  endFill = cms.untracked.bool(True),
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"),
80  debug=cms.untracked.bool(False)
81  ),
82  loggingOn = cms.untracked.bool(True),
83  IsDestDbCheckedInQueryLog = cms.untracked.bool(False)
84  )
85 
86 process.p = cms.Path(process.Test1)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20