16 dbSession = newSession;
24 if(
data->iovs().size() ){
26 if( till >= firstSince ){
27 low = (since < firstSince) ? 0 :
28 data->find(since)-
data->iovs().begin();
29 high =
data->find(till) -
data->iovs().begin();
33 return std::make_pair( low, high );
37 if (ii>=(
int)v.
iovs().
size() || ii<0) {
42 m_token = v.
iovs()[
i].token();
43 m_since = v.
iovs()[
i].sinceTime();
56 totalSecondsInNanoseconds = ((
cond::Time_t)unpackedTime.first)*1000000000;
58 totalNanoseconds = totalSecondsInNanoseconds + ((
cond::Time_t)(unpackedTime.second));
62 unpackedTime.first = (
unsigned int) (totalNanoseconds/1000000000);
63 unpackedTime.second = (
unsigned int)(totalNanoseconds - (
cond::Time_t)unpackedTime.first*1000000000);
67 m_till = v.
iovs()[i+1].sinceTime()-1;
97 std::pair<int,int> rg =
m_iov->range( since, till );
103 }
else if( selection < 0 ){
108 if( since < tlow ) since = tlow;
118 int sz = iov->data->iovs().size();
123 }
else if( selection < 0 ){
132 m_high( rhs.m_high ),
133 m_lowBound( rhs.m_lowBound){
145 int n = m_iov->data->find(time)-m_iov->data->iovs().begin();
146 return (n<m_low || m_high<n ) ?
148 boost::make_transform_iterator(boost::counting_iterator<int>(n),
153 IterHelp helper(*m_iov, m_lowBound);
154 return helper( m_low );
158 IterHelp helper(*m_iov, m_lowBound);
159 return helper( m_high );
164 if( m_high>=0 && m_low>=0 ) sz = m_high-m_low+1;
180 const std::string & token):
198 m_iov->token = token;
203 int oldsize =
size();
205 return oldsize<
size();
209 int oldsize =
size();
210 m_iov->refresh( newSession );
211 return oldsize<
size();
219 return ( currenttime >=
iov().firstSince() &&
220 currenttime <=
iov().lastTill() );
227 if (iter!=
iov().iovs().
end()) {
228 since=iter->sinceTime();
230 if (iter!=
iov().iovs().
end())
231 till = iter->sinceTime()-1;
234 since=
iov().lastTill();
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 return *(m_iov->data);
281 return iov().timeType();
285 return iov().firstSince();
289 return iov().lastTill();
292 std::set<std::string>
const&
294 return iov().payloadClasses();
299 return iov().comment();
304 return iov().revision();
308 return iov().timestamp();
312 return m_iov->dbSession;
const_iterator find(cond::Time_t time) const
cond::Time_t lastTill() const
cond::Time_t firstSince() const
IOVRange rangeTail(cond::Time_t since, cond::Time_t till, int n) const
std::string comment() const
cond::Time_t timestamp() const
Container const & iovs() const
std::pair< cond::Time_t, cond::Time_t > validity(cond::Time_t currenttime)
TimeType timetype() const
IOVRange range(cond::Time_t since, cond::Time_t till) const
cond::Time_t pack(cond::UnpackedTime iValue)
Container::const_iterator const_iterator
boost::shared_ptr< IOVProxyData > m_iov
IOVElementProxy front() const
const_iterator find(cond::Time_t time) const
unsigned long long Time_t
const T & max(const T &a, const T &b)
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
const Time_t invalidTime(0)
IOVSequence const & iov() const
IOVProxy & operator=(const IOVProxy &rhs)
const std::string & token()
std::pair< int, int > range(cond::Time_t since, cond::Time_t till)
iov_range_iterator const_iterator
cond::Time_t lastTill() const
boost::shared_ptr< IOVProxyData > m_iov
std::pair< unsigned int, unsigned int > UnpackedTime
char data[epos_bytes_allocation]
std::set< std::string > const & payloadClasses() const
boost::shared_ptr< cond::IOVSequence > data
IOVRange head(int n) const
boost::shared_ptr< T > getTypedObject(const std::string &objectId)
ora::Database & storage()
tuple size
Write out results.
iov_range_iterator const_iterator
bool isValid(cond::Time_t currenttime)
IOVElementProxy back() const
cond::TimeType timeType() const
IOVRange tail(int n) const
IOVRange & operator=(const IOVRange &rhs)
cond::DbSession dbSession
cond::UnpackedTime unpack(cond::Time_t iValue)
void load(const std::string &token)
void set(const std::string &name, int value)
set the flag, with a run-time name