Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CondDB frontierKey update #33643

Merged
merged 5 commits into from May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 1 addition & 8 deletions CondCore/DBOutputService/src/OnlineDBOutputService.cc
Expand Up @@ -84,18 +84,11 @@ cond::service::OnlineDBOutputService::OnlineDBOutputService(const edm::Parameter
m_latencyInLumisections(iConfig.getUntrackedParameter<unsigned int>("latency", 1)),
m_omsServiceUrl(iConfig.getUntrackedParameter<std::string>("omsServiceUrl", "")),
m_preLoadConnectionString(iConfig.getUntrackedParameter<std::string>("preLoadConnectionString", "")),
m_frontierKey(""),
m_frontierKey(iConfig.getUntrackedParameter<std::string>("frontierKey", "")),
m_debug(iConfig.getUntrackedParameter<bool>("debugLogging", false)) {
if (m_omsServiceUrl.empty()) {
m_lastLumiFile = iConfig.getUntrackedParameter<std::string>("lastLumiFile", "");
}
std::string frontierKeyFilePath(iConfig.getUntrackedParameter<std::string>("frontierKeyFilePath", ""));
if (!frontierKeyFilePath.empty()) {
std::ifstream frontierKeyFile(frontierKeyFilePath);
if (!frontierKeyFile)
throw Exception(std::string("Can't access frontierKey file ") + frontierKeyFilePath);
frontierKeyFile >> m_frontierKey;
}
}

cond::service::OnlineDBOutputService::~OnlineDBOutputService() {}
Expand Down
Expand Up @@ -37,7 +37,7 @@
preLoadConnectionString = cms.untracked.string('frontier://FrontierPrep/CMS_CONDITIONS'),
runNumber = cms.untracked.uint64(options.runNumber),
#lastLumiFile = cms.untracked.string('last_lumi.txt'),
#frontierKeyFilePath = cms.untracked.string('frontier.key'),
#frontierKey = cms.untracked.string('test'),
writeTransactionDelay = cms.untracked.uint32(options.transDelay),
autoCommit = cms.untracked.bool(True),
saveLogsOnDB = cms.untracked.bool(True),
Expand Down
4 changes: 1 addition & 3 deletions CondCore/ESSources/plugins/CondDBESSource.cc
Expand Up @@ -141,9 +141,7 @@ CondDBESSource::CondDBESSource(const edm::ParameterSet& iConfig)
m_connectionString = iConfig.getParameter<std::string>("connect");

// frontier key
if (iConfig.exists("frontierKey")) {
m_frontierKey = iConfig.getParameter<std::string>("frontierKey");
}
m_frontierKey = iConfig.getUntrackedParameter<std::string>("frontierKey", "");

// snapshot
boost::posix_time::ptime snapshotTime;
Expand Down
Expand Up @@ -107,7 +107,7 @@
DBParameters = CondDBParameters,
connect = cms.string( options.connectionString ),
snapshotTime = cms.string( options.snapshotTime ),
frontierKey = cms.string('abcdefghijklmnopqrstuvwxyz0123456789'),
frontierKey = cms.untracked.string('abcdefghijklmnopqrstuvwxyz0123456789'),
toGet = cms.VPSet(cms.PSet(
record = cms.string('BeamSpotObjectsRcd'),
tag = cms.string( options.tag ),
Expand Down
Expand Up @@ -383,8 +383,10 @@
tag = cms.string(BSOnlineTag),
timetype = cms.untracked.string('Lumi'),
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)),
frontierKey = cms.untracked.string(options.runUniqueKey)
)

else:
process.OnlineDBOutputService = cms.Service("OnlineDBOutputService",

Expand All @@ -406,8 +408,10 @@
tag = cms.string(BSOnlineTag),
timetype = cms.untracked.string('Lumi'),
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)),
frontierKey = cms.untracked.string(options.runUniqueKey)
)
print("Configured frontierKey", options.runUniqueKey)

#---------
# Final path
Expand Down
Expand Up @@ -161,8 +161,10 @@
tag = cms.string(BSOnlineTag),
timetype = cms.untracked.string('Lumi'),
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)),
frontierKey = cms.untracked.string(options.runUniqueKey)
)

else:
process.OnlineDBOutputService = cms.Service("OnlineDBOutputService",

Expand All @@ -184,9 +186,12 @@
tag = cms.string(BSOnlineTag),
timetype = cms.untracked.string('Lumi'),
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)),
frontierKey = cms.untracked.string(options.runUniqueKey)
)

print("Configured frontierKey", options.runUniqueKey)

#---------
# Final path
process.p = cms.Path(process.dqmcommon
Expand Down
Expand Up @@ -188,8 +188,10 @@
tag = cms.string(BSOnlineTag),
timetype = cms.untracked.string('Lumi'),
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)),
frontierKey = cms.untracked.string(options.runUniqueKey)
)

else:
process.OnlineDBOutputService = cms.Service("OnlineDBOutputService",
DBParameters = cms.PSet(
Expand All @@ -210,9 +212,12 @@
tag = cms.string(BSOnlineTag),
timetype = cms.untracked.string('Lumi'),
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)),
frontierKey = cms.untracked.string(options.runUniqueKey)
)

print("Configured frontierKey", options.runUniqueKey)

process.p = cms.Path( process.hltTriggerTypeFilter
* process.dqmcommon
* process.offlineBeamSpot
Expand Down
Expand Up @@ -135,7 +135,8 @@
tag = cms.string(BSOnlineTag),
timetype = cms.untracked.string('Lumi'),
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)),
frontierKey = cms.untracked.string(options.runUniqueKey)
)

else:
Expand All @@ -159,8 +160,10 @@
tag = cms.string(BSOnlineTag),
timetype = cms.untracked.string('Lumi'),
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)),
frontierKey = cms.untracked.string(options.runUniqueKey)
)
print("Configured frontierKey", options.runUniqueKey)

process.p = cms.Path(process.dqmcommon
* process.monitor )
7 changes: 7 additions & 0 deletions DQM/Integration/python/config/fileinputsource_cfi.py
Expand Up @@ -22,6 +22,13 @@
"Run Keys of CMS"
)

# Parameter for frontierKey
options.register('runUniqueKey',
'InValid',
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"Unique run key from RCMS for Frontier")

options.register('runNumber',
286520,
VarParsing.VarParsing.multiplicity.singleton,
Expand Down
8 changes: 8 additions & 0 deletions DQM/Integration/python/config/inputsource_cfi.py
Expand Up @@ -53,6 +53,14 @@
VarParsing.VarParsing.varType.string,
"Run Keys of CMS")

# Parameter for frontierKey

options.register ('runUniqueKey',
'InValid',
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"Unique run key from RCMS for Frontier")

options.parseArguments()

# Fix to allow scram to compile
Expand Down
8 changes: 8 additions & 0 deletions DQM/Integration/python/config/pbsource_cfi.py
Expand Up @@ -40,6 +40,14 @@
VarParsing.VarParsing.varType.string,
"Run Keys of CMS")

# Parameter for frontierKey

options.register ('runUniqueKey',
'InValid',
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"Unique run key from RCMS for Frontier")

options.parseArguments()

# Fix to allow scram to compile
Expand Down
7 changes: 7 additions & 0 deletions DQM/Integration/python/config/unittestinputsource_cfi.py
Expand Up @@ -24,6 +24,13 @@
"Run Keys of CMS"
)

# Parameter for frontierKey
options.register('runUniqueKey',
'InValid',
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"Unique run key from RCMS for Frontier")

options.register('runNumber',
334393,
VarParsing.VarParsing.multiplicity.singleton,
Expand Down