|
|
Go to the documentation of this file. 1 #ifndef CondCore_CondDB_Session_h
2 #define CondCore_CondDB_Session_h
39 namespace persistency {
41 class SessionConfiguration;
50 void start(
bool readOnly =
true);
69 explicit Session(
const std::shared_ptr<SessionImpl>& sessionImpl);
104 template <
typename T>
131 template <
typename T>
134 const boost::posix_time::ptime&
creationTime = boost::posix_time::microsec_clock::universal_time());
136 template <
typename T>
140 const std::pair<Binary, Binary>& payloadAndStreamerInfoData,
178 template <
typename T>
182 return createIov(cond::demangledName(
typeid(
T)),
tag, timeType, synchronizationType);
185 template <
typename T>
193 throwException(
"Payload of type " + payloadObjectType +
" could not be stored. " + em,
"Session::storePayload");
207 throwException(
"Payload of type " + payloadObjectType +
" could not be stored. " + em,
"Session::storePayload");
212 template <
typename T>
218 throwException(
"Payload with id " + payloadHash +
" has not been found in the database.",
219 "Session::fetchPayload");
220 std::unique_ptr<T>
ret;
226 "Session::fetchPayload");
237 void start(
bool readOnly =
true);
ret
prodAgent to be discontinued
bool existsIov(const std::string &tag)
void clearIov(const std::string &tag)
void start(bool readOnly=true)
GTProxy readGlobalTag(const std::string &name)
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
cond::RunInfo_t getLastRun()
Transaction m_transaction
Transaction & m_transaction
RunInfoProxy getRunInfo(cond::Time_t start, cond::Time_t end)
IOVProxy readIov(const std::string &tag)
cond::Hash storePayloadData(const std::string &payloadObjectType, const std::pair< Binary, Binary > &payloadAndStreamerInfoData, const boost::posix_time::ptime &creationTime)
IOVEditor editIov(const std::string &tag)
Transaction(SessionImpl &session)
coral::ISchema & nominalSchema()
unsigned long long Time_t
std::string connectionString()
GTEditor editGlobalTag(const std::string &name)
coral::ISessionProxy & coralSession()
Base exception class for the object to relational access.
bool fetchPayloadData(const cond::Hash &payloadHash, std::string &payloadType, cond::Binary &payloadData, cond::Binary &streamerInfoData)
IOVEditor createIovForPayload(const Hash &payloadHash, const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
Transaction & transaction()
void start(bool readOnly=true)
std::shared_ptr< SessionImpl > m_session
std::pair< Binary, Binary > serialize(const T &payload)
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
void throwException(const std::string &message, const std::string &methodName)
bool existsGlobalTag(const std::string &name)
GTEditor createGlobalTag(const std::string &name)
Transaction & operator=(const Transaction &rhs)
RunInfoEditor editRunInfo()
TransactionScope(Transaction &transaction)
Session & operator=(const Session &rhs)