#include <IOVProxy.h>
Public Member Functions | |
IOVProxyData (cond::DbSession &dbs) | |
IOVProxyData (cond::DbSession &dbs, const std::string &tok) | |
std::pair< int, int > | range (cond::Time_t since, cond::Time_t till) |
void | refresh () |
void | refresh (cond::DbSession &dbs) |
~IOVProxyData () | |
Public Attributes | |
boost::shared_ptr < cond::IOVSequence > | data |
cond::DbSession | dbSession |
std::string | token |
Definition at line 19 of file IOVProxy.h.
cond::IOVProxyData::IOVProxyData | ( | cond::DbSession & | dbs | ) | [inline, explicit] |
Definition at line 20 of file IOVProxy.h.
cond::IOVProxyData::IOVProxyData | ( | cond::DbSession & | dbs, |
const std::string & | tok | ||
) | [inline] |
cond::IOVProxyData::~IOVProxyData | ( | ) | [inline] |
Definition at line 34 of file IOVProxy.h.
{ }
std::pair< int, int > cond::IOVProxyData::range | ( | cond::Time_t | since, |
cond::Time_t | till | ||
) |
Definition at line 20 of file IOVProxy.cc.
References AlCaHLTBitMon_QueryRunRegistry::data, and min.
{ int low = -1; int high = -1; if( data->iovs().size() ){ cond::Time_t firstSince = data->iovs().front().sinceTime(); if( till >= firstSince ){ low = (since < firstSince) ? 0 : data->find(since)-data->iovs().begin(); high = data->find(till) - data->iovs().begin(); high = std::min( high+1,(int)data->iovs().size())-1; } } return std::make_pair( low, high ); }
void cond::IOVProxyData::refresh | ( | ) |
Definition at line 4 of file IOVProxy.cc.
References data, dbSession, cond::DbSession::getTypedObject(), cond::DbSession::isOldSchema(), geometryXMLtoCSV::parser, cond::DbSession::storage(), and token.
Referenced by IOVProxyData().
{ data = dbSession.getTypedObject<cond::IOVSequence>( token ); // loading the lazy-loading Queryable vector... data->loadAll(); //**** temporary for the schema transition if( dbSession.isOldSchema() ){ PoolTokenParser parser( dbSession.storage() ); data->swapTokens( parser ); } }
void cond::IOVProxyData::refresh | ( | cond::DbSession & | dbs | ) |
Definition at line 15 of file IOVProxy.cc.
boost::shared_ptr<cond::IOVSequence> cond::IOVProxyData::data |
Definition at line 43 of file IOVProxy.h.
Referenced by refresh().
Definition at line 42 of file IOVProxy.h.
Referenced by refresh().
std::string cond::IOVProxyData::token |
Definition at line 44 of file IOVProxy.h.
Referenced by refresh().