10 unsigned short fillId) {
13 query->addOutputVars({
"lumisection_number",
"run_number"});
14 query->filterEQ(
"fill_number", fillId);
18 if (!
query->execute()) {
20 <<
"OMS query of fill " << fillId <<
" failed, status:" <<
query->status() <<
"\n";
24 auto queryResult =
query->result();
25 if (queryResult.empty()) {
26 throw cms::Exception(
"OMSQueryFailure") <<
"OMS query of fill " << fillId <<
" returned empty result!\n";
30 auto lastRun = queryResult.back().get<
int>(
"run_number");
31 auto lastLumi = queryResult.back().get<
unsigned short>(
"lumisection_number");
std::unique_ptr< OMSServiceQuery > query(const std::string &function) const
std::pair< int, unsigned short > getFillLastRunAndLS(const cond::OMSService &oms, unsigned short fillId)
unsigned long long Time_t
Time_t lumiTime(unsigned int run, unsigned int lumiId)
static constexpr unsigned int kLumisectionsQueryLimit
cond::Time_t getFillLastLumiIOV(const cond::OMSService &oms, unsigned short fillId)