#include <CondBasicIter.h>
Public Member Functions | |
virtual void | clear ()=0 |
CondBasicIter () | |
CondBasicIter (const std::string &NameDB, const std::string &Tag, const std::string &auth="") | |
CondBasicIter (const std::string &NameDB, const std::string &Tag, const std::string &User, const std::string &Pass, const std::string &nameBlob="") | |
void | create (const std::string &NameDB, const std::string &Tag, const std::string &User, const std::string &Pass, const std::string &nameBlob="") |
void | create (const std::string &NameDB, const std::string &Tag, const std::string &auth="") |
bool | forward () |
unsigned int | getStartTime () const |
unsigned int | getStopTime () const |
unsigned int | getTime () const |
std::string const & | getToken () const |
bool | init () |
virtual bool | load (cond::DbSession &sess, std::string const &token)=0 |
bool | make () |
void | setMax (unsigned int max) |
void | setMin (unsigned int min) |
void | setRange (unsigned int min, unsigned int max) |
~CondBasicIter () | |
Protected Attributes | |
cond::CondDB | db |
cond::IOVProxy | iov |
cond::IOVProxy::const_iterator | iter |
cond::RDBMS | rdbms |
Private Attributes | |
cond::IOVRange::const_iterator | m_begin |
cond::IOVRange::const_iterator | m_end |
Definition at line 10 of file CondBasicIter.h.
CondBasicIter::CondBasicIter | ( | ) |
Definition at line 3 of file CondBasicIter.cc.
{}
CondBasicIter::~CondBasicIter | ( | ) |
Definition at line 4 of file CondBasicIter.cc.
{}
CondBasicIter::CondBasicIter | ( | const std::string & | NameDB, |
const std::string & | Tag, | ||
const std::string & | User, | ||
const std::string & | Pass, | ||
const std::string & | nameBlob = "" |
||
) |
tell Iter to point to a database. After this call Iter can be used. Direct Access to database through frontier It needs:
NameDB
-> name of the database (connection string) Tag
-> Tag human-readable of the content of the database User
-> name of the User (if you don't need to authenticate don't write anything here) Pass
-> Password to access database (if you don't need to authenticate don't write anything here) nameBlob
-> to handle blob type of data (if it is not needed this field has to be left empty) Definition at line 6 of file CondBasicIter.cc.
CondBasicIter::CondBasicIter | ( | const std::string & | NameDB, |
const std::string & | Tag, | ||
const std::string & | auth = "" |
||
) |
virtual void CondBasicIter::clear | ( | ) | [pure virtual] |
Implemented in CondIter< DataT >, CondIter< HDQMSummary >, and CondIter< T >.
Referenced by create(), setMax(), setMin(), and setRange().
void CondBasicIter::create | ( | const std::string & | NameDB, |
const std::string & | Tag, | ||
const std::string & | auth = "" |
||
) |
Definition at line 42 of file CondBasicIter.cc.
References clear(), db, cond::RDBMS::getDB(), cond::CondDB::iov(), iov, and rdbms.
void CondBasicIter::create | ( | const std::string & | NameDB, |
const std::string & | Tag, | ||
const std::string & | User, | ||
const std::string & | Pass, | ||
const std::string & | nameBlob = "" |
||
) |
Definition at line 30 of file CondBasicIter.cc.
References clear(), db, cond::RDBMS::getDB(), cond::CondDB::iov(), iov, and rdbms.
bool CondBasicIter::forward | ( | ) |
Definition at line 88 of file CondBasicIter.cc.
Referenced by CondIter< T >::next().
unsigned int CondBasicIter::getStartTime | ( | ) | const |
Get the SINCE TIME of the Interval of Validity.
Definition at line 76 of file CondBasicIter.cc.
Referenced by getTime().
{return (*iter).since();}
unsigned int CondBasicIter::getStopTime | ( | ) | const |
Get the TILL TIME of the Interval of Validity.
Definition at line 78 of file CondBasicIter.cc.
Referenced by getTime().
{return (*iter).till();}
unsigned int CondBasicIter::getTime | ( | void | ) | const |
Get the mean time of the Iterval of Validity.
Definition at line 74 of file CondBasicIter.cc.
References getStartTime(), and getStopTime().
{return (getStartTime()+getStopTime())/2;}
std::string const & CondBasicIter::getToken | ( | ) | const |
Get the token correpsonding to the Interval of Validity.
Definition at line 80 of file CondBasicIter.cc.
{return (*iter).token();}
bool CondBasicIter::init | ( | void | ) |
Definition at line 82 of file CondBasicIter.cc.
References iter, m_begin, and m_end.
Referenced by CondIter< T >::next().
virtual bool CondBasicIter::load | ( | cond::DbSession & | sess, |
std::string const & | token | ||
) | [pure virtual] |
Implemented in CondIter< DataT >, CondIter< HDQMSummary >, and CondIter< T >.
Referenced by make().
bool CondBasicIter::make | ( | ) |
Definition at line 94 of file CondBasicIter.cc.
References db, load(), and cond::CondDB::session().
Referenced by CondIter< T >::next().
void CondBasicIter::setMax | ( | unsigned int | max | ) |
Set the maximum of the range of interest of the Iterator of the IOVs.
Definition at line 67 of file CondBasicIter.cc.
References cond::IOVRange::begin(), clear(), cond::IOVRange::end(), iov, m_begin, m_end, and cond::IOVProxy::range().
void CondBasicIter::setMin | ( | unsigned int | min | ) |
Set the minimum of the range of interest of the Iterator of the IOVs.
Definition at line 60 of file CondBasicIter.cc.
References cond::IOVRange::begin(), clear(), cond::IOVRange::end(), iov, m_begin, m_end, and cond::IOVProxy::range().
void CondBasicIter::setRange | ( | unsigned int | min, |
unsigned int | max | ||
) |
Set the range of interest of the Iterator of the IOVs.
Definition at line 53 of file CondBasicIter.cc.
References cond::IOVRange::begin(), clear(), cond::IOVRange::end(), iov, m_begin, m_end, and cond::IOVProxy::range().
cond::CondDB CondBasicIter::db [protected] |
Definition at line 101 of file CondBasicIter.h.
cond::IOVProxy CondBasicIter::iov [protected] |
Definition at line 102 of file CondBasicIter.h.
Referenced by create(), setMax(), setMin(), and setRange().
cond::IOVProxy::const_iterator CondBasicIter::iter [protected] |
Definition at line 103 of file CondBasicIter.h.
Definition at line 106 of file CondBasicIter.h.
Referenced by init(), setMax(), setMin(), and setRange().
Definition at line 107 of file CondBasicIter.h.
Referenced by forward(), init(), setMax(), setMin(), and setRange().
cond::RDBMS CondBasicIter::rdbms [protected] |
Definition at line 100 of file CondBasicIter.h.
Referenced by create().