7 namespace persistency {
10 m_session( &session ){
73 return m_session->transaction->iovDbExists;
84 proxy.
load( tag, full );
89 const boost::posix_time::ptime& snapshottime,
93 proxy.
load( tag, snapshottime, full );
99 return m_session->iovSchema().tagTable().select( tag );
117 std::vector<std::tuple<cond::Time_t,cond::Hash> >& range ){
120 return m_session->iovSchema().iovTable().getRange( tag, begin, end, snapshotTime, range );
126 if(
m_session->iovSchema().tagTable().select( tag ) )
127 throwException(
"The specified tag \""+tag+
"\" already exist in the database.",
"Session::createIov");
136 const boost::posix_time::ptime& creationTime ){
138 if(
m_session->iovSchema().tagTable().select( tag ) )
139 throwException(
"The specified tag \""+tag+
"\" already exist in the database.",
"Session::createIov");
147 if(
m_session->iovSchema().tagTable().select( tag ) )
148 throwException(
"The specified tag \""+tag+
"\" already exist in the database.",
"Session::createIovForPayload");
150 if( !
m_session->iovSchema().payloadTable().getType( payloadHash, payloadType ) )
151 throwException(
"The specified payloadId \""+payloadHash+
"\" does not exist in the database.",
"Session::createIovForPayload");
165 m_session->iovSchema().iovTable().erase( tag );
170 return m_session->gtSchema().gtTable().select( name );
175 if(
m_session->gtSchema().gtTable().select( name ) )
176 throwException(
"The specified Global Tag \""+name+
"\" already exist in the database.",
"Session::createGlobalTag");
198 proxy.
load( name, preFix, postFix );
203 const std::pair<Binary,Binary>& payloadAndStreamerInfoData,
204 const boost::posix_time::ptime& creationTime ){
206 return m_session->iovSchema().payloadTable().insertIfNew( payloadObjectType, payloadAndStreamerInfoData.first,
207 payloadAndStreamerInfoData.second, creationTime );
215 return m_session->iovSchema().payloadTable().select( payloadHash, payloadType, payloadData, streamerInfoData );
220 throwException(
"The transaction is not active.",
"Session::getRunInfo" );
222 proxy.
load( start, end );
GTEditor editGlobalTag(const std::string &name)
Transaction(SessionImpl &session)
bool existsGlobalTag(const std::string &name)
void clearIov(const std::string &tag)
bool getTagInfo(const std::string &tag, cond::Tag_t &info)
void load(const std::string &tag, bool full=false)
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()
SynchronizationType synchronizationType
IOVProxy readIov(const std::string &tag, bool full=false)
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()
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)
void startTransaction(bool readOnly=true)
bool existsIov(const std::string &tag)
coral::ISessionProxy & coralSession()
bool getIovRange(const std::string &tag, cond::Time_t begin, cond::Time_t end, std::vector< std::tuple< cond::Time_t, cond::Hash > > &range)
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)