Definition at line 8 of file LHCInfoHelper.cc.
References Exception, kLumisectionsQueryLimit, beamSpotPI::lastLumi, beamSpotPI::lastRun, cond::time::lumiTime(), and cond::OMSService::query().
Referenced by LHCInfoPerLSPopConSourceHandler::getNewObjects(), and LHCInfoPerFillPopConSourceHandler::getNewObjects().
11 query->addOutputVars({
"lumisection_number",
"run_number"});
12 query->filterEQ(
"fill_number", fillId);
16 if (!
query->execute()) {
18 <<
"OMS query of fill " << fillId <<
" failed, status:" <<
query->status() <<
"\n";
22 auto queryResult =
query->result();
23 if (queryResult.empty()) {
24 throw cms::Exception(
"OMSQueryFailure") <<
"OMS query of fill " << fillId <<
" returned empty result!\n";
28 auto lastRun = queryResult.back().get<
int>(
"run_number");
29 auto lastLumi = queryResult.back().get<
unsigned short>(
"lumisection_number");
std::unique_ptr< OMSServiceQuery > query(const std::string &function) const
Time_t lumiTime(unsigned int run, unsigned int lumiId)
static constexpr unsigned int kLumisectionsQueryLimit