#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 |
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 36 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 24 of file CondBasicIter.cc.
References clear(), db, cond::RDBMS::getDB(), cond::CondDB::iov(), iov, and rdbms.
bool CondBasicIter::forward | ( | ) |
Definition at line 79 of file CondBasicIter.cc.
References cond::IOVProxy::end(), iov, and iter.
Referenced by CondIter< T >::next().
unsigned int CondBasicIter::getStartTime | ( | ) | const |
Get the SINCE TIME of the Interval of Validity.
Definition at line 66 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 68 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 64 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 70 of file CondBasicIter.cc.
{return (*iter).token();}
bool CondBasicIter::init | ( | void | ) |
Definition at line 73 of file CondBasicIter.cc.
References cond::IOVProxy::begin(), cond::IOVProxy::end(), iov, and iter.
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 85 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 57 of file CondBasicIter.cc.
References clear(), iov, and cond::IOVProxy::setRange().
void CondBasicIter::setMin | ( | unsigned int | min | ) |
Set the minimum of the range of interest of the Iterator of the IOVs.
Definition at line 52 of file CondBasicIter.cc.
References clear(), iov, and cond::IOVProxy::setRange().
void CondBasicIter::setRange | ( | unsigned int | min, |
unsigned int | max | ||
) |
cond::CondDB CondBasicIter::db [protected] |
Definition at line 14 of file CondBasicIter.h.
cond::IOVProxy CondBasicIter::iov [protected] |
Definition at line 15 of file CondBasicIter.h.
Referenced by create(), forward(), init(), setMax(), setMin(), and setRange().
cond::IOVProxy::const_iterator CondBasicIter::iter [protected] |
Definition at line 16 of file CondBasicIter.h.
cond::RDBMS CondBasicIter::rdbms [protected] |
Definition at line 13 of file CondBasicIter.h.
Referenced by create().