CMS 3D CMS Logo

Public Member Functions | Private Attributes

cond::CondDB Class Reference

#include <CondPyInterface.h>

List of all members.

Public Member Functions

std::string allTags () const
void closeSession () const
void commitTransaction () const
 CondDB (const CondDB &other)
 CondDB (DbSession &session, boost::shared_ptr< cond::Logger > ilog)
 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
CondDBoperator= (const CondDB &other)
IOVElementProxy payLoad (std::string const &token) const
DbSessionsession () const
void startReadOnlyTransaction () const
void startTransaction () const
 ~CondDB ()

Private Attributes

boost::shared_ptr< cond::Loggerlogger
DbSession me

Detailed Description

Definition at line 41 of file CondPyInterface.h.


Constructor & Destructor Documentation

cond::CondDB::CondDB ( )

Definition at line 119 of file CondPyInterface.cc.

                 : me(){
    //topinit();    
  }
cond::CondDB::CondDB ( const CondDB other)

Definition at line 128 of file CondPyInterface.cc.

                                     : me(other.me), logger(other.logger) {
  }
cond::CondDB::CondDB ( cond::DbSession session,
boost::shared_ptr< cond::Logger ilog 
)

Definition at line 122 of file CondPyInterface.cc.

                                                                         :
    me(session), logger(ilog) {
    //topinit();
  }
cond::CondDB::~CondDB ( )

Definition at line 138 of file CondPyInterface.cc.

                  {
  }

Member Function Documentation

std::string cond::CondDB::allTags ( ) const

Definition at line 142 of file CondPyInterface.cc.

References filterCSVwithJSON::copy, cond::MetaData::listAllTags(), and me.

Referenced by BOOST_PYTHON_MODULE().

                                  {
    std::ostringstream ss;

    cond::MetaData metadata_svc(me);
    std::vector<std::string> alltags;
    metadata_svc.listAllTags(alltags);
    
    std::copy (alltags.begin(),
               alltags.end(),
               std::ostream_iterator<std::string>(ss," ")
               );
    return ss.str();
  }
void cond::CondDB::closeSession ( ) const

Definition at line 201 of file CondPyInterface.cc.

References cond::DbSession::close(), and me.

Referenced by BOOST_PYTHON_MODULE().

                                  {
    //FIXME: does the session disconnection fix the socket failure in FroNTier (bug #84265)?
    me.close();
  }
void cond::CondDB::commitTransaction ( ) const

Definition at line 197 of file CondPyInterface.cc.

References cond::DbTransaction::commit(), me, and cond::DbSession::transaction().

Referenced by BOOST_PYTHON_MODULE().

                                       {
    me.transaction().commit();
  }
IOVProxy cond::CondDB::iov ( std::string const &  tag) const

Definition at line 163 of file CondPyInterface.cc.

References iovToken(), and me.

Referenced by BOOST_PYTHON_MODULE(), and CondBasicIter::create().

                                                  {
    return IOVProxy(me,iovToken(tag));
  }
std::string cond::CondDB::iovToken ( std::string const &  tag) const

Definition at line 156 of file CondPyInterface.cc.

References cond::MetaData::getToken(), and me.

Referenced by BOOST_PYTHON_MODULE(), iov(), and iovWithLib().

                                                        {
    cond::MetaData metadata_svc(me);
    std::string token=metadata_svc.getToken(tag);
    return token;
  }
IOVProxy cond::CondDB::iovWithLib ( std::string const &  tag) const

Definition at line 167 of file CondPyInterface.cc.

References iovToken(), and me.

Referenced by BOOST_PYTHON_MODULE().

                                                         {
    return IOVProxy(me,iovToken(tag));
  }
cond::LogDBEntry cond::CondDB::lastLogEntry ( std::string const &  tag) const

Definition at line 177 of file CondPyInterface.cc.

References logger.

Referenced by BOOST_PYTHON_MODULE().

                                                                 {
    cond::LogDBEntry entry;
    if (logger)
      logger->LookupLastEntryByTag(tag,entry,false);
    return entry;
  }
cond::LogDBEntry cond::CondDB::lastLogEntryOK ( std::string const &  tag) const

Definition at line 184 of file CondPyInterface.cc.

References logger.

Referenced by BOOST_PYTHON_MODULE().

                                                                  {
    cond::LogDBEntry entry;
    if (logger)
      logger->LookupLastEntryByTag(tag,entry,true);
    return entry;
  }
CondDB & cond::CondDB::operator= ( const CondDB other)

Definition at line 131 of file CondPyInterface.cc.

References logger, and me.

                                                 {
    if (this==&other) return *this; // unless =0 this is an error condition!
    me = other.me;
    logger = other.logger;
    return *this;
  }
IOVElementProxy cond::CondDB::payLoad ( std::string const &  token) const

FIXME: must be IOVElementProxy(since, till, token)

Definition at line 171 of file CondPyInterface.cc.

Referenced by BOOST_PYTHON_MODULE().

                                                               {
    return IOVElementProxy(0,0,token);
  }
DbSession& cond::CondDB::session ( ) const [inline]

Definition at line 66 of file CondPyInterface.h.

References me.

Referenced by CondBasicIter::make().

{ return me;}
void cond::CondDB::startReadOnlyTransaction ( ) const

Definition at line 194 of file CondPyInterface.cc.

References me, cond::DbTransaction::start(), and cond::DbSession::transaction().

Referenced by BOOST_PYTHON_MODULE().

                                              {
    me.transaction().start(true);
  }
void cond::CondDB::startTransaction ( ) const

Definition at line 191 of file CondPyInterface.cc.

References me, cond::DbTransaction::start(), and cond::DbSession::transaction().

Referenced by BOOST_PYTHON_MODULE().

                                      {
    me.transaction().start();
  }

Member Data Documentation

boost::shared_ptr<cond::Logger> cond::CondDB::logger [private]

Definition at line 70 of file CondPyInterface.h.

Referenced by lastLogEntry(), lastLogEntryOK(), and operator=().

DbSession cond::CondDB::me [mutable, private]