7 if(
token.empty() )
return;
19 dbSession = newSession;
27 if(
data->iovs().size() ){
29 if( till >= firstSince ){
30 low = (since < firstSince) ? 0 :
31 data->find(since)-
data->iovs().begin();
32 high =
data->find(till) -
data->iovs().begin();
36 return std::make_pair( low, high );
40 if (ii>=(
int)v.
iovs().
size() || ii<0) {
45 m_token = v.
iovs()[
i].token();
46 m_since = v.
iovs()[
i].sinceTime();
59 totalSecondsInNanoseconds = ((
cond::Time_t)unpackedTime.first)*1000000000;
61 totalNanoseconds = totalSecondsInNanoseconds + ((
cond::Time_t)(unpackedTime.second));
65 unpackedTime.first = (
unsigned int) (totalNanoseconds/1000000000);
66 unpackedTime.second = (
unsigned int)(totalNanoseconds - (
cond::Time_t)unpackedTime.first*1000000000);
70 m_till = v.
iovs()[i+1].sinceTime()-1;
100 std::pair<int,int> rg =
m_iov->range( since, till );
106 }
else if( selection < 0 ){
111 if( since < tlow ) since = tlow;
121 int sz = iov->data->iovs().size();
126 }
else if( selection < 0 ){
135 m_high( rhs.m_high ),
136 m_lowBound( rhs.m_lowBound){
148 int n = m_iov->data->find(time)-m_iov->data->iovs().begin();
149 return (n<m_low || m_high<n ) ?
151 boost::make_transform_iterator(boost::counting_iterator<int>(n),
156 IterHelp helper(*m_iov, m_lowBound);
157 return helper( m_low );
161 IterHelp helper(*m_iov, m_lowBound);
162 return helper( m_high );
167 if( m_high>=0 && m_low>=0 ) sz = m_high-m_low+1;
201 m_iov->token = token;
206 int oldsize =
size();
208 return oldsize<
size();
212 int oldsize =
size();
213 m_iov->refresh( newSession );
214 return oldsize<
size();
222 return ( currenttime >=
iov().firstSince() &&
223 currenttime <=
iov().lastTill() );
230 if (iter!=
iov().iovs().
end()) {
231 since=iter->sinceTime();
233 if (iter!=
iov().iovs().
end())
234 till = iter->sinceTime()-1;
236 return std::pair<cond::Time_t, cond::Time_t>(since,till);
241 return IOVRange( m_iov, since, till );
247 return IOVRange( m_iov, since, till, n );
253 return IOVRange( m_iov, since, till, -n );
265 int n =
iov().find(time)-
iov().iovs().begin();
266 return ( n<0 || n>
size() ) ?
268 boost::make_transform_iterator(boost::counting_iterator<int>(n),
273 return iov().iovs().size();
277 if( !m_iov->data.get() )
throwException(
"No data found.",
"IOVProxy::iov" );
278 return *(m_iov->data);
282 return iov().timeType();
286 return iov().firstSince();
290 return iov().lastTill();
293 std::set<std::string>
const&
295 return iov().payloadClasses();
300 return iov().comment();
305 return iov().revision();
309 return iov().timestamp();
313 return m_iov->dbSession;
const_iterator find(cond::Time_t time) const
cond::Time_t lastTill() const
IOVSequence const & iov() const
std::pair< cond::Time_t, cond::Time_t > validity(cond::Time_t currenttime)
IOVRange range(cond::Time_t since, cond::Time_t till) const
Container const & iovs() const
void load(const std::string &token)
std::set< std::string > const & payloadClasses() const
cond::Time_t pack(cond::UnpackedTime iValue)
IOVRange head(int n) const
Container::const_iterator const_iterator
boost::shared_ptr< IOVProxyData > m_iov
IOVElementProxy front() const
IOVRange tail(int n) const
unsigned long long Time_t
bool isValid(cond::Time_t currenttime)
cond::Time_t lastTill() const
void set(cond::Time_t is, cond::Time_t it, std::string const &itoken)
IOVRange rangeHead(cond::Time_t since, cond::Time_t till, int n) const
IOVProxy & operator=(const IOVProxy &rhs)
const Time_t invalidTime(0)
std::pair< int, int > range(cond::Time_t since, cond::Time_t till)
void throwException(std::string const &message, std::string const &methodName)
iov_range_iterator const_iterator
cond::Time_t timestamp() const
IOVRange rangeTail(cond::Time_t since, cond::Time_t till, int n) const
cond::Time_t firstSince() const
boost::shared_ptr< IOVProxyData > m_iov
std::pair< unsigned int, unsigned int > UnpackedTime
char data[epos_bytes_allocation]
TimeType timetype() const
boost::shared_ptr< cond::IOVSequence > data
boost::shared_ptr< T > getTypedObject(const std::string &objectId)
ora::Database & storage()
const_iterator find(cond::Time_t time) const
const std::string & token()
tuple size
Write out results.
iov_range_iterator const_iterator
std::string comment() const
IOVElementProxy back() const
cond::TimeType timeType() const
IOVRange & operator=(const IOVRange &rhs)
cond::DbSession dbSession
cond::UnpackedTime unpack(cond::Time_t iValue)