7 namespace persistency {
38 : m_session(sessionImpl), m_transaction(*m_session) {}
57 return m_session->transaction->iovDbExists;
73 proxy.
load(tagName, snapshottime);
79 return m_session->iovSchema().tagTable().select(tag);
96 if (
m_session->iovSchema().tagTable().select(tag))
97 throwException(
"The specified tag \"" + tag +
"\" already exist in the database.",
"Session::createIov");
108 if (
m_session->iovSchema().tagTable().select(tag))
109 throwException(
"The specified tag \"" + tag +
"\" already exist in the database.",
"Session::createIov");
110 IOVEditor editor(
m_session, tag, timeType, payloadType, synchronizationType, creationTime);
119 if (
m_session->iovSchema().tagTable().select(tag))
120 throwException(
"The specified tag \"" + tag +
"\" already exist in the database.",
121 "Session::createIovForPayload");
123 if (!
m_session->iovSchema().payloadTable().getType(payloadHash, payloadType))
124 throwException(
"The specified payloadId \"" + payloadHash +
"\" does not exist in the database.",
125 "Session::createIovForPayload");
139 m_session->iovSchema().iovTable().erase(tag);
144 return m_session->gtSchema().gtTable().select(name);
149 if (
m_session->gtSchema().gtTable().select(name))
150 throwException(
"The specified Global Tag \"" + name +
"\" already exist in the database.",
151 "Session::createGlobalTag");
173 proxy.
load(name, preFix, postFix);
178 const std::pair<Binary, Binary>& payloadAndStreamerInfoData,
181 return m_session->iovSchema().payloadTable().insertIfNew(
182 payloadObjectType, payloadAndStreamerInfoData.first, payloadAndStreamerInfoData.second, creationTime);
190 return m_session->iovSchema().payloadTable().select(payloadHash, payloadType, payloadData, streamerInfoData);
195 throwException(
"The transaction is not active.",
"Session::getRunInfo");
197 proxy.
load(start, end);
203 throwException(
"The transaction is not active.",
"Session::getRunInfo");
220 throwException(
"The session is not active.",
"Session::coralSession");
GTEditor editGlobalTag(const std::string &name)
Transaction(SessionImpl &session)
bool existsGlobalTag(const std::string &name)
tuple ret
prodAgent to be discontinued
void clearIov(const std::string &tag)
boost::posix_time::ptime end
void start(bool readOnly=true)
RunInfoEditor editRunInfo()
void load(Time_t low, Time_t up)
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
void load(const std::string &tag)
Transaction & m_transaction
TransactionScope(Transaction &transaction)
Transaction & transaction()
unsigned long long Time_t
Transaction & operator=(const Transaction &rhs)
void load(const std::string >Name, const std::string &preFix="", const std::string &postFix="")
coral::ISchema & nominalSchema()
void start(bool readOnly=true)
bool fetchPayloadData(const cond::Hash &payloadHash, std::string &payloadType, cond::Binary &payloadData, cond::Binary &streamerInfoData)
std::string connectionString()
boost::posix_time::ptime start
cond::Hash storePayloadData(const std::string &payloadObjectType, const std::pair< Binary, Binary > &payloadAndStreamerInfoData, const boost::posix_time::ptime &creationTime)
IOVProxy readIov(const std::string &tag)
IOVEditor editIov(const std::string &tag)
void startTransaction(bool readOnly=true)
cond::RunInfo_t getLastRun()
bool existsIov(const std::string &tag)
void load(const std::string &tag)
coral::ISessionProxy & coralSession()
bool isTransactionActive(bool deep=true) const
IOVEditor createIovForPayload(const Hash &payloadHash, const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
GTEditor createGlobalTag(const std::string &name)
void rollbackTransaction()
Session & operator=(const Session &rhs)
GTProxy readGlobalTag(const std::string &name)
void load(const std::string >Name)
Transaction m_transaction
void throwException(const std::string &message, const std::string &methodName)
std::shared_ptr< SessionImpl > m_session
RunInfoProxy getRunInfo(cond::Time_t start, cond::Time_t end)