1 #ifndef CondCore_CondDB_PayloadProxy_h
2 #define CondCore_CondDB_PayloadProxy_h
15 namespace persistency {
31 Session const* mostRecentSession,
32 std::shared_ptr<std::vector<Iov_t>>
const* mostRecentRequests);
36 virtual void make() = 0;
60 template <
typename DataT>
64 Session const* mostRecentSession,
65 std::shared_ptr<std::vector<Iov_t>>
const* mostRecentRequests,
66 const char*
source =
nullptr)
67 :
BasePayloadProxy(mostRecentCurrentIov, mostRecentSession, mostRecentRequests) {}
76 throwException(
"The Payload has not been loaded.",
"PayloadProxy::operator()");
94 throwException(
"Can't load payload: no valid IOV found.",
"PayloadProxy::loadPayload");
108 #endif // CondCore_CondDB_PayloadProxy_h
std::shared_ptr< std::vector< Iov_t > > m_requests
Iov_t const * m_mostRecentCurrentIov
void start(bool readOnly=true)
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
const DataT & operator()() const
Transaction & transaction()
virtual void loadPayload()=0
void initializeForNewIOV()
virtual ~BasePayloadProxy()
Session const * m_mostRecentSession
void loadPayload() override
void initKeyList(PayloadProxy const &)
PayloadProxy(Iov_t const *mostRecentCurrentIov, Session const *mostRecentSession, std::shared_ptr< std::vector< Iov_t >> const *mostRecentRequests, const char *source=nullptr)
Iov_t m_iovAtInitialization
BasePayloadProxy(Iov_t const *mostRecentCurrentIov, Session const *mostRecentSession, std::shared_ptr< std::vector< Iov_t >> const *mostRecentRequests)
std::shared_ptr< std::vector< Iov_t > > const * m_mostRecentRequests
std::unique_ptr< DataT > m_data
virtual void loadMore(CondGetter const &)
static std::string const source
void throwException(const std::string &message, const std::string &methodName)