1 #ifndef CondCore_OnlineDBOutputService_h
2 #define CondCore_OnlineDBOutputService_h
39 template <
typename PayloadType>
46 if (payloadId.empty()) {
50 auto w_lat = std::chrono::duration_cast<std::chrono::microseconds>(t1 -
t0).
count();
51 logger().
logInfo() <<
"Update has taken " << w_lat <<
" microsecs.";
54 logger().
logInfo() <<
"Last lumisection processed after update: " << lastProcessed;
56 logger().
logInfo() <<
"Preloading lumisection " << targetTime;
60 logger().
logInfo() <<
"Iov for preloaded lumisection " << targetTime <<
" is " << usedIov.
since;
61 auto p_lat = std::chrono::duration_cast<std::chrono::microseconds>(t3 - t2).
count();
62 logger().
logInfo() <<
"Preload has taken " << p_lat <<
" microsecs.";
63 if (usedIov.
since < targetTime) {
64 logger().
logWarning() <<
"Found a late update for lumisection " << targetTime <<
"(found since "
65 << usedIov.
since <<
"). A revert is required.";
71 auto t_lat = std::chrono::duration_cast<std::chrono::microseconds>(t4 -
t0).
count();
72 logger().
logInfo() <<
"Total update time: " << t_lat <<
" microsecs.";
77 template <
typename PayloadType>
80 throwException(
"Provided payload pointer is invalid.",
"OnlineDBOutputService::writeForNextLumisection");
81 std::unique_ptr<const PayloadType>
payload(payloadPtr);
tuple ret
prodAgent to be discontinued
cond::Time_t getLastLumiFromOMS(const std::string &omsServiceUrl)
EchoedLogStream< edm::LogWarning > logWarning()
~OnlineDBOutputService() override
void throwException(const std::string &message, const std::string &methodName)
unsigned long long Time_t
std::string m_lastLumiFile
OnlineDBOutputService(const edm::ParameterSet &iConfig, edm::ActivityRegistry &iAR)
std::string m_preLoadConnectionString
cond::persistency::Logger & logger()
cond::Iov_t preLoadIov(const std::string &recordName, cond::Time_t targetTime)
cond::Time_t getLatestLumiFromFile(const std::string &fileName)
size_t m_latencyInLumisections
std::string m_frontierKey
bool writeForNextLumisection(const PayloadType *payloadPtr, const std::string &recordName)
std::string m_omsServiceUrl
bool writeIOVForNextLumisection(const PayloadType &payload, const std::string &recordName)
cond::persistency::Session getReadOnlyCache(cond::Time_t targetTime)
EchoedLogStream< edm::LogInfo > logInfo()
void eraseSinceTime(const std::string &payloadId, cond::Time_t sinceTime, const std::string &recordName)
cond::Time_t getLastLumiProcessed()