6#ifndef IOVDbSvc_IovStore_h
7#define IOVDbSvc_IovStore_h
13#include "CoolKernel/ValidityKey.h"
22 typedef std::pair<cool::ValidityKey, cool::ValidityKey>
Iov_t;
29 void addIov(
const cool::ValidityKey & since,
const cool::ValidityKey & until);
51 void extendIov(
const unsigned int idx,
const cool::ValidityKey & newUntilTime);
bool extendCacheHi()
Extend upper cache bound to the minimum 'until' time; return whether this changes its value.
std::pair< unsigned int, unsigned int > numberOfIovsOnBoundaries() const
Return the current count of added Iovs which straddled cache boundaries.
static std::pair< bool, bool > straddling(const Iov_t &iov, const Iov_t &bounds)
std::vector< Iov_t > & vectorStore()
Return the internal vector store.
bool empty() const
is the store empty?
Iov_t getCacheBounds() const
Report the current cache bounds.
Iov_t getMinimumStraddlingSpan() const
Get the minimum straddling span (max 'since' to min 'until')
void setIovSpan(const Iov_t &span)
Set span.
std::vector< Iov_t > m_iovs
main vector of iovs
unsigned int size() const
length of store
void setCacheBounds(const Iov_t &cacheBounds)
Set the cache bound variables.
void extendIov(const unsigned int idx, const cool::ValidityKey &newUntilTime)
Extend a specific iov at the index to a new 'until' time.
cool::ValidityKey m_maxStraddlingSince
max 'since' of the iovs which straddle the cache boundary, corresponds to 'm_boundmin' in the origina...
std::pair< unsigned int, unsigned int > m_countStraddling
count of iovs straddling the since or until boundaries
Iov_t m_cacheBounds
cache bounds, 'since', 'until', corresponds to m_cachestart, m_cachestop in original
cool::ValidityKey m_minStraddlingUntil
min 'until' of the iovs which straddle the boundary corresponds to 'm_boundmax' in the original code
IovStore()
Default constructor, cache bounds set to 0,0.
Iov_t at(const unsigned int idx) const
'at' to read iov at specific index
std::pair< cool::ValidityKey, cool::ValidityKey > Iov_t
void addIov(const Iov_t &iov)
Add an iov to the store and update the span variables.
bool extendCacheLo()
Extend lower cache bound to the maximum 'since' time; return whether this changes its value.
void clear()
clear the store