|
ATLAS Offline Software
|
Go to the documentation of this file.
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);
void extendIov(const unsigned int idx, const cool::ValidityKey &newUntilTime)
Extend a specific iov at the index to a new 'until' time.
span(T *ptr, std::size_t sz) -> span< T >
A couple needed deduction guides.
std::vector< Iov_t > & vectorStore()
Return the internal vector store.
Iov_t getMinimumStraddlingSpan() const
Get the minimum straddling span (max 'since' to min 'until')
std::pair< unsigned int, unsigned int > numberOfIovsOnBoundaries() const
Return the current count of added Iovs which straddled cache boundaries.
void clear()
clear the store
unsigned int size() const
length of store
std::pair< cool::ValidityKey, cool::ValidityKey > Iov_t
Iov_t m_cacheBounds
cache bounds, 'since', 'until', corresponds to m_cachestart, m_cachestop in original
IovStore()
Default constructor, cache bounds set to 0,0.
std::vector< Iov_t > m_iovs
main vector of iovs
cool::ValidityKey m_maxStraddlingSince
max 'since' of the iovs which straddle the cache boundary, corresponds to 'm_boundmin' in the origina...
Iov_t getCacheBounds() const
Report the current cache bounds.
void setCacheBounds(const Iov_t &cacheBounds)
Set the cache bound variables.
cool::ValidityKey m_minStraddlingUntil
min 'until' of the iovs which straddle the boundary corresponds to 'm_boundmax' in the original code
void addIov(const Iov_t &iov)
Add an iov to the store and update the span variables.
std::pair< unsigned int, unsigned int > m_countStraddling
count of iovs straddling the since or until boundaries
bool extendCacheHi()
Extend upper cache bound to the minimum 'until' time; return whether this changes its value.
Iov_t at(const unsigned int idx) const
'at' to read iov at specific index
bool extendCacheLo()
Extend lower cache bound to the maximum 'since' time; return whether this changes its value.
static std::pair< bool, bool > straddling(const Iov_t &iov, const Iov_t &bounds)
bool empty() const
is the store empty?
void setIovSpan(const Iov_t &span)
Set span.