![]() |
![]() |
#include <CondCore/Utilities/interface/CondPyInterface.h>
Public Member Functions | |
std::string | allTags () const |
CondDB (Connection *conn, boost::shared_ptr< cond::Logger > ilog) | |
CondDB (const CondDB &other) | |
CondDB () | |
IOVProxy | iov (std::string const &tag) const |
std::string | iovToken (std::string const &tag) const |
IOVProxy | iovWithLib (std::string const &tag) const |
cond::LogDBEntry | lastLogEntry (std::string const &tag) const |
cond::LogDBEntry | lastLogEntryOK (std::string const &tag) const |
CondDB & | operator= (const CondDB &other) |
IOVElement | payLoad (std::string const &token) const |
~CondDB () | |
Private Attributes | |
boost::shared_ptr< cond::Logger > | logger |
Connection * | me |
Definition at line 37 of file CondPyInterface.h.
cond::CondDB::CondDB | ( | ) |
cond::CondDB::CondDB | ( | const CondDB & | other | ) |
cond::CondDB::CondDB | ( | cond::Connection * | conn, | |
boost::shared_ptr< cond::Logger > | ilog | |||
) |
cond::CondDB::~CondDB | ( | ) |
Definition at line 121 of file CondPyInterface.cc.
References cond::Connection::disconnect(), and me.
std::string cond::CondDB::allTags | ( | ) | const |
Definition at line 127 of file CondPyInterface.cc.
References cond::CoralTransaction::commit(), edmNew::copy(), cond::Connection::coralTransaction(), cond::MetaData::listAllTags(), me, ss, and cond::CoralTransaction::start().
Referenced by BOOST_PYTHON_MODULE().
00127 { 00128 std::ostringstream ss; 00129 00130 cond::CoralTransaction& coraldb=me->coralTransaction(); 00131 cond::MetaData metadata_svc(coraldb); 00132 std::vector<std::string> alltags; 00133 coraldb.start(true); 00134 metadata_svc.listAllTags(alltags); 00135 coraldb.commit(); 00136 00137 std::copy (alltags.begin(), 00138 alltags.end(), 00139 std::ostream_iterator<std::string>(ss," ") 00140 ); 00141 return ss.str(); 00142 }
IOVProxy cond::CondDB::iov | ( | std::string const & | tag | ) | const |
Definition at line 153 of file CondPyInterface.cc.
References iovToken(), me, and cond::Connection::poolTransaction().
Referenced by BOOST_PYTHON_MODULE(), and moduleNameByTag().
std::string cond::CondDB::iovToken | ( | std::string const & | tag | ) | const |
Definition at line 144 of file CondPyInterface.cc.
References cond::CoralTransaction::commit(), cond::Connection::coralTransaction(), cond::MetaData::getToken(), me, and cond::CoralTransaction::start().
Referenced by iov(), and iovWithLib().
00144 { 00145 cond::CoralTransaction& coraldb=me->coralTransaction(); 00146 cond::MetaData metadata_svc(coraldb); 00147 coraldb.start(true); 00148 std::string token=metadata_svc.getToken(tag); 00149 coraldb.commit(); 00150 return token; 00151 }
IOVProxy cond::CondDB::iovWithLib | ( | std::string const & | tag | ) | const |
Definition at line 157 of file CondPyInterface.cc.
References iovToken(), me, and cond::Connection::poolTransaction().
Referenced by BOOST_PYTHON_MODULE().
cond::LogDBEntry cond::CondDB::lastLogEntry | ( | std::string const & | tag | ) | const |
Definition at line 167 of file CondPyInterface.cc.
References logger.
Referenced by BOOST_PYTHON_MODULE().
00167 { 00168 cond::LogDBEntry entry; 00169 if (logger) 00170 logger->LookupLastEntryByTag(tag,entry,false); 00171 return entry; 00172 }
cond::LogDBEntry cond::CondDB::lastLogEntryOK | ( | std::string const & | tag | ) | const |
Definition at line 174 of file CondPyInterface.cc.
References logger.
Referenced by BOOST_PYTHON_MODULE().
00174 { 00175 cond::LogDBEntry entry; 00176 if (logger) 00177 logger->LookupLastEntryByTag(tag,entry,true); 00178 return entry; 00179 }
Definition at line 112 of file CondPyInterface.cc.
References cond::Connection::disconnect(), logger, and me.
00112 { 00113 if (me==other.me) return *this; // unless =0 this is an error condition! 00114 if (me!=0) me->disconnect(); 00115 me = other.me; 00116 logger = other.logger; 00117 other.me=0; 00118 return *this; 00119 }
IOVElement cond::CondDB::payLoad | ( | std::string const & | token | ) | const |
Definition at line 161 of file CondPyInterface.cc.
References me, and cond::Connection::poolTransaction().
Referenced by BOOST_PYTHON_MODULE().
00161 { 00162 return IOVElement(0,0,token,&me->poolTransaction()); 00163 00164 }
boost::shared_ptr<cond::Logger> cond::CondDB::logger [private] |
Definition at line 58 of file CondPyInterface.h.
Referenced by lastLogEntry(), lastLogEntryOK(), and operator=().
Connection* cond::CondDB::me [mutable, private] |
Definition at line 57 of file CondPyInterface.h.
Referenced by allTags(), CondDB(), iov(), iovToken(), iovWithLib(), operator=(), payLoad(), and ~CondDB().