8 namespace persistency {
32 std::vector<std::tuple<cond::Time_t,cond::Hash,boost::posix_time::ptime> >
iovBuffer;
51 const boost::posix_time::ptime& creationTime ):
56 m_data->payloadType = payloadObjectType;
58 m_data->creationTime = creationTime;
64 m_session( rhs.m_session ){
108 m_data->endOfValidity = time;
130 m_data->lastValidatedTime = time;
140 boost::posix_time::ptime
now = boost::posix_time::microsec_clock::universal_time();
141 insert( since, payloadHash, now, checkType );
147 m_data->iovBuffer.push_back( std::tie( since, payloadHash, insertionTime ) );
151 bool iovSorter(
const std::tuple<cond::Time_t,cond::Hash,boost::posix_time::ptime>&
f,
const std::tuple<cond::Time_t,cond::Hash,boost::posix_time::ptime>&
s ){
152 return std::get<0>(
f) < std::get<0>(s);
159 if(
m_data->description.empty() )
throwException(
"A non-empty description string is mandatory.",
"IOVEditor::flush" );
160 if(
m_data->validationMode )
m_session->iovSchema().tagTable().setValidationMode();
163 if(
m_data->creationTime.is_not_a_date_time() )
m_data->creationTime = operationTime;
167 if(
m_session->iovSchema().tagLogTable().exists() )
168 m_session->iovSchema().tagLogTable().insert(
m_data->tag,
m_data->creationTime, cond::getUserName(),cond::getHostName(), cond::getCommand(),
174 m_data->lastValidatedTime, operationTime );
175 if(
m_session->iovSchema().tagLogTable().exists() )
176 m_session->iovSchema().tagLogTable().insert(
m_data->tag, operationTime, cond::getUserName(),cond::getHostName(), cond::getCommand(),
182 if(
m_data->iovBuffer.size() ) {
192 std::stringstream
msg;
193 msg <<
"Can't insert iov since "<<l<<
" on the tag "<<
m_data->tag<<
": last since is "<<last<<
200 boost::posix_time::ptime& insertionTime = std::get<2>(
iov);
201 if( insertionTime.is_not_a_date_time() ) insertionTime = operationTime;
205 std::stringstream
msg;
206 msg <<
m_data->iovBuffer.size() <<
" iov(s) inserted.";
207 if(
m_session->iovSchema().tagLogTable().exists() ){
209 if( lt.empty() ) lt =
"-";
210 m_session->iovSchema().tagLogTable().insert(
m_data->tag, operationTime, cond::getUserName(), cond::getHostName(), cond::getCommand(),
213 m_data->iovBuffer.clear();
220 return flush( logText, boost::posix_time::microsec_clock::universal_time() );
228 return flush(
std::string(
"-"), boost::posix_time::microsec_clock::universal_time() );
tuple ret
prodAgent to be discontinued
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::string synchronizationTypeNames(SynchronizationType type)
void checkTransaction(const std::string &ctx)
cond::Time_t lastValidatedTime
void load(const std::string &tag)
void setDescription(const std::string &description)
void setLastValidatedTime(cond::Time_t time)
std::shared_ptr< SessionImpl > m_session
void throwException(const std::string &message, const std::string &methodName)
std::string description() const
unsigned long long Time_t
IOVEditor & operator=(const IOVEditor &rhs)
cond::SynchronizationType synchronizationType() const
cond::Time_t endOfValidity() const
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
cond::Time_t endOfValidity
std::shared_ptr< IOVEditorData > m_data
bool iovSorter(const std::tuple< cond::Time_t, cond::Hash, boost::posix_time::ptime > &f, const std::tuple< cond::Time_t, cond::Hash, boost::posix_time::ptime > &s)
cond::TimeType timeType() const
boost::posix_time::ptime creationTime
cond::Time_t lastValidatedTime() const
cond::SynchronizationType synchronizationType
< trclass="colgroup">< tdclass="colgroup"colspan=5 > DT local reconstruction</td ></tr >< tr >< td >< ahref="classDTRecHit1DPair.html"> DTRecHit1DPair</a ></td >< td >< ahref="DataFormats_DTRecHit.html"> edm::RangeMap & lt
std::vector< std::tuple< cond::Time_t, cond::Hash, boost::posix_time::ptime > > iovBuffer
void setEndOfValidity(cond::Time_t validity)
std::string payloadType() const
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
void throwException(const std::string &message, const std::string &methodName)