#include <IOVEditor.h>
Public Member Functions | |
unsigned int | append (cond::Time_t sinceTime, const std::string &payloadToken) |
Append a payload with known since time. The previous last payload's till time will be adjusted to the new payload since time. Returns the payload index in the iov sequence. More... | |
void | bulkAppend (std::vector< std::pair< cond::Time_t, std::string > > &values) |
Bulk append of iov chunck. More... | |
void | bulkAppend (std::vector< cond::IOVElement > &values) |
void | create (cond::TimeType timetype) |
void | create (cond::TimeType timetype, cond::Time_t lastTill) |
void | deleteEntries (bool withPayload=false) |
Time_t | firstSince () const |
unsigned int | freeInsert (cond::Time_t sinceTime, const std::string &payloadToken) |
insert a payload with known since in any position More... | |
void | import (const std::string &sourceIOVtoken) |
unsigned int | insert (cond::Time_t tillTime, const std::string &payloadToken) |
Assign a payload with till time. Returns the payload index in the iov sequence. More... | |
IOVSequence & | iov () |
IOVEditor (cond::DbSession &dbSess) | |
IOVEditor (cond::DbSession &dbSess, const std::string &token) | |
Time_t | lastTill () const |
void | stamp (std::string const &icomment, bool append=false) |
TimeType | timetype () const |
std::string const & | token () const |
Returns the token of the iov sequence associated with this editor. More... | |
unsigned int | truncate (bool withPayload=false) |
void | updateClosure (cond::Time_t newtillTime) |
Update the closure of the iov sequence. More... | |
~IOVEditor () | |
Destructor. More... | |
Private Member Functions | |
void | debugInfo (std::ostream &co) const |
void | init () |
void | reportError (std::string message) const |
void | reportError (std::string message, cond::Time_t time) const |
bool | validTime (cond::Time_t time, cond::TimeType timetype) const |
bool | validTime (cond::Time_t time) const |
Private Attributes | |
cond::DbSession | m_dbSess |
boost::shared_ptr < cond::IOVSequence > | m_iov |
bool | m_isActive |
std::string | m_token |
Definition at line 25 of file IOVEditor.h.
|
explicit |
Definition at line 14 of file IOVEditor.cc.
IOVEditor::IOVEditor | ( | cond::DbSession & | dbSess, |
const std::string & | token | ||
) |
Definition at line 18 of file IOVEditor.cc.
IOVEditor::~IOVEditor | ( | ) |
unsigned int IOVEditor::append | ( | cond::Time_t | sinceTime, |
const std::string & | payloadToken | ||
) |
Append a payload with known since time. The previous last payload's till time will be adjusted to the new payload since time. Returns the payload index in the iov sequence.
Definition at line 212 of file IOVEditor.cc.
References init(), lastTill(), m_dbSess, m_iov, m_isActive, m_token, reportError(), runTheMatrix::ret, timetype(), cond::timeTypeSpecs, updateClosure(), cond::DbSession::updateObject(), and validTime().
Referenced by hltFindDuplicates.ModuleList::__init__(), python.Vispa.Views.PropertyView.PropertyView::addProperty(), cond::service::PoolDBOutputService::appendIOV(), cond::service::PoolDBOutputService::createNewIOV(), cond::AlignSplitIOV::execute(), hltFindDuplicates.ModuleList::extend(), and python.seqvaluedict.seqdict::push().
void IOVEditor::bulkAppend | ( | std::vector< std::pair< cond::Time_t, std::string > > & | values | ) |
Bulk append of iov chunck.
Definition at line 152 of file IOVEditor.cc.
References firstTime, init(), lastTill(), m_dbSess, m_iov, m_isActive, m_token, reportError(), cond::DbSession::updateObject(), validTime(), and makeHLTPrescaleTable::values.
void IOVEditor::bulkAppend | ( | std::vector< cond::IOVElement > & | values | ) |
Definition at line 176 of file IOVEditor.cc.
References firstTime, init(), lastTill(), m_dbSess, m_iov, m_isActive, m_token, reportError(), cond::DbSession::updateObject(), and validTime().
void IOVEditor::create | ( | cond::TimeType | timetype | ) |
Definition at line 67 of file IOVEditor.cc.
References cond::IOVNames::container(), m_dbSess, m_iov, m_isActive, m_token, reportError(), and cond::DbSession::storeObject().
Referenced by cond::service::PoolDBOutputService::createNewIOV(), and cond::AlignSplitIOV::execute().
void IOVEditor::create | ( | cond::TimeType | timetype, |
cond::Time_t | lastTill | ||
) |
Definition at line 79 of file IOVEditor.cc.
References cond::IOVNames::container(), m_dbSess, m_iov, m_isActive, m_token, reportError(), cond::DbSession::storeObject(), and validTime().
|
private |
Definition at line 27 of file IOVEditor.cc.
References cond::DbSession::connectionString(), m_dbSess, m_iov, m_token, cond::TimeTypeSpecs::name, and cond::timeTypeSpecs.
Referenced by reportError().
void IOVEditor::deleteEntries | ( | bool | withPayload = false | ) |
Definition at line 296 of file IOVEditor.cc.
References cond::DbSession::deleteObject(), init(), m_dbSess, m_iov, m_isActive, m_token, and reportError().
Time_t IOVEditor::firstSince | ( | ) | const |
unsigned int IOVEditor::freeInsert | ( | cond::Time_t | sinceTime, |
const std::string & | payloadToken | ||
) |
insert a payload with known since in any position
Definition at line 244 of file IOVEditor.cc.
References cond::TimeTypeSpecs::endValue, init(), lastTill(), m_dbSess, m_iov, m_isActive, m_token, reportError(), runTheMatrix::ret, timetype(), cond::timeTypeSpecs, updateClosure(), cond::DbSession::updateObject(), and validTime().
Referenced by cond::service::PoolDBOutputService::appendIOV().
void IOVEditor::import | ( | const std::string & | sourceIOVtoken | ) |
Definition at line 313 of file IOVEditor.cc.
References cond::DbSession::getTypedObject(), m_dbSess, m_iov, m_token, and reportError().
|
private |
Definition at line 93 of file IOVEditor.cc.
References cond::DbSession::getTypedObject(), m_dbSess, m_iov, m_isActive, m_token, and reportError().
Referenced by append(), bulkAppend(), deleteEntries(), freeInsert(), insert(), stamp(), truncate(), and updateClosure().
unsigned int IOVEditor::insert | ( | cond::Time_t | tillTime, |
const std::string & | payloadToken | ||
) |
Assign a payload with till time. Returns the payload index in the iov sequence.
Definition at line 130 of file IOVEditor.cc.
References init(), lastTill(), m_dbSess, m_iov, m_isActive, m_token, reportError(), runTheMatrix::ret, updateClosure(), cond::DbSession::updateObject(), and validTime().
IOVSequence & IOVEditor::iov | ( | ) |
Time_t IOVEditor::lastTill | ( | ) | const |
Definition at line 109 of file IOVEditor.cc.
References m_iov.
Referenced by append(), bulkAppend(), freeInsert(), and insert().
|
private |
Definition at line 49 of file IOVEditor.cc.
References debugInfo(), edm::hlt::Exception, argparse::message, and dbtoconf::out.
Referenced by append(), bulkAppend(), create(), deleteEntries(), freeInsert(), import(), init(), insert(), truncate(), and updateClosure().
|
private |
Definition at line 57 of file IOVEditor.cc.
References debugInfo(), edm::hlt::Exception, dbtoconf::out, and cond::rpcobgas::time.
void IOVEditor::stamp | ( | std::string const & | icomment, |
bool | append = false |
||
) |
Definition at line 196 of file IOVEditor.cc.
References init(), m_dbSess, m_iov, m_isActive, m_token, and cond::DbSession::updateObject().
Referenced by cond::service::PoolDBOutputService::appendIOV(), cond::service::PoolDBOutputService::closeIOV(), cond::service::PoolDBOutputService::createNewIOV(), and cond::AlignSplitIOV::execute().
TimeType IOVEditor::timetype | ( | ) | const |
Definition at line 113 of file IOVEditor.cc.
References m_iov.
Referenced by append(), freeInsert(), and validTime().
|
inline |
Returns the token of the iov sequence associated with this editor.
Definition at line 81 of file IOVEditor.h.
References m_token.
Referenced by cond::service::PoolDBOutputService::createNewIOV(), and cond::AlignSplitIOV::execute().
unsigned int IOVEditor::truncate | ( | bool | withPayload = false | ) |
Definition at line 280 of file IOVEditor.cc.
References cond::DbSession::deleteObject(), init(), m_dbSess, m_iov, m_isActive, m_token, reportError(), runTheMatrix::ret, and cond::DbSession::updateObject().
Referenced by python.Vispa.Gui.VispaWidget.TextField::calculateDimensions().
void IOVEditor::updateClosure | ( | cond::Time_t | newtillTime | ) |
Update the closure of the iov sequence.
Definition at line 204 of file IOVEditor.cc.
References init(), m_dbSess, m_iov, m_isActive, m_token, reportError(), and cond::DbSession::updateObject().
Referenced by append(), cond::service::PoolDBOutputService::appendIOV(), cond::service::PoolDBOutputService::closeIOV(), freeInsert(), and insert().
|
private |
Definition at line 118 of file IOVEditor.cc.
References cond::TimeTypeSpecs::beginValue, cond::TimeTypeSpecs::endValue, timetype(), and cond::timeTypeSpecs.
Referenced by append(), bulkAppend(), create(), freeInsert(), insert(), and validTime().
|
private |
Definition at line 123 of file IOVEditor.cc.
References timetype(), and validTime().
|
private |
Definition at line 102 of file IOVEditor.h.
Referenced by append(), bulkAppend(), create(), debugInfo(), deleteEntries(), freeInsert(), import(), init(), insert(), stamp(), truncate(), and updateClosure().
|
private |
Definition at line 105 of file IOVEditor.h.
Referenced by append(), bulkAppend(), create(), debugInfo(), deleteEntries(), firstSince(), freeInsert(), import(), init(), insert(), iov(), lastTill(), stamp(), timetype(), truncate(), and updateClosure().
|
private |
Definition at line 104 of file IOVEditor.h.
Referenced by append(), bulkAppend(), create(), deleteEntries(), freeInsert(), init(), insert(), stamp(), truncate(), and updateClosure().
|
private |
Definition at line 103 of file IOVEditor.h.
Referenced by append(), bulkAppend(), create(), debugInfo(), deleteEntries(), freeInsert(), import(), init(), insert(), stamp(), token(), truncate(), and updateClosure().