Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions CondCore/DBOutputService/src/OnlineDBOutputService.cc
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,12 @@
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)
try:
process.OnlineDBOutputService.frontierKey = cms.untracked.string(options.runUniqueKey)
print("Configured frontierKey", options.runUniqueKey)
except:
pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smorovic @cms-sw/dqm-l2 @cms-sw/alca-l2 @cms-sw/db-l2 isn't it better to add a message also in the "except" branch ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silviodonato
with all possible input sources used in this and similar configuration files now having the runUniqueKey VarArgs option, we could also just remove try/except and set frontierKey within process.OnlineDBOutputService definition. Does this seem ok for @cms-sw/dqm-l2 and others?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, fine from our side. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed the change. If it looks ok, I'll also add it to 11_3_X backport.


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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)
try:
process.OnlineDBOutputService.frontierKey = cms.untracked.string(options.runUniqueKey)
print("Configured frontierKey", options.runUniqueKey)
except:
pass

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)
try:
process.OnlineDBOutputService.frontierKey = cms.untracked.string(options.runUniqueKey)
print("Configured frontierKey", options.runUniqueKey)
except:
pass

else:
process.OnlineDBOutputService = cms.Service("OnlineDBOutputService",
DBParameters = cms.PSet(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@
onlyAppendUpdatePolicy = cms.untracked.bool(True)
))
)
try:
process.OnlineDBOutputService.frontierKey = cms.untracked.string(options.runUniqueKey)
print("Configured frontierKey", options.runUniqueKey)
except:
pass

else:
process.OnlineDBOutputService = cms.Service("OnlineDBOutputService",
Expand Down
7 changes: 7 additions & 0 deletions DQM/Integration/python/config/fileinputsource_cfi.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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