1 #ifndef CondCore_CondDB_PayloadProxy_h 2 #define CondCore_CondDB_PayloadProxy_h 9 namespace persistency {
28 void setUp(
Session dbSession );
38 virtual void make()=0;
40 virtual void invalidateCache()=0;
62 virtual void loadPayload() = 0;
77 template<
typename DataT>
89 throwException(
"The Payload has not been loaded.",
"PayloadProxy::operator()");
96 if( m_currentIov.payloadId == m_currentPayloadId )
return;
97 m_session.transaction().start(
true);
99 m_session.transaction().commit();
105 m_currentPayloadId.clear();
110 m_currentPayloadId.clear();
111 m_currentIov.clear();
117 if( m_currentIov.payloadId.empty() ){
118 throwException(
"Can't load payload: no valid IOV found.",
"PayloadProxy::loadPayload" );
120 m_data = m_session.fetchPayload<DataT>( m_currentIov.payloadId );
121 m_currentPayloadId = m_currentIov.payloadId;
122 m_requests.push_back( m_currentIov );
132 #endif // CondCore_CondDB_PayloadProxy_h
std::shared_ptr< DataT > m_data
const std::vector< Iov_t > & requests() const
TimeType timeType() const
S make(const edm::ParameterSet &cfg)
void invalidateCache() override
const DataT & operator()() const
std::vector< Iov_t > m_requests
unsigned long long Time_t
virtual void invalidateTransientCache()
void loadPayload() override
const Hash & payloadId() const
virtual void loadMore(CondGetter const &)
static std::string const source
void throwException(const std::string &message, const std::string &methodName)
PayloadProxy(const char *source=0)