#include <DataManager.h>
Public Member Functions | |
void | connect (const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false) |
DataManager () | |
DataManager (const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false) | |
cond::DbConnection * | dbConnection () |
cond::DbSession * | dbSession () |
void | setDebug (bool debug) |
virtual | ~DataManager () |
Protected Member Functions | |
edm::eventsetup::TypeTag | findType (const std::string &type) const |
Protected Attributes | |
cond::DbConnection * | connection |
cond::DbSession * | session |
Definition at line 20 of file DataManager.h.
l1t::DataManager::DataManager | ( | ) |
Definition at line 12 of file DataManager.cc.
: session( 0 ), connection( 0 ) {}
l1t::DataManager::DataManager | ( | const std::string & | connectString, |
const std::string & | authenticationPath, | ||
bool | isOMDS = false |
||
) | [explicit] |
Definition at line 16 of file DataManager.cc.
References connect().
{ connect( connectString, authenticationPath, isOMDS ) ; }
l1t::DataManager::~DataManager | ( | ) | [virtual] |
Definition at line 45 of file DataManager.cc.
References cond::DbSession::close(), cond::DbConnection::close(), connection, and session.
{ // delete all in reverse direction if( connection ) connection->close() ; if( session ) session->close() ; delete connection ; delete session ; }
void l1t::DataManager::connect | ( | const std::string & | connectString, |
const std::string & | authenticationPath, | ||
bool | isOMDS = false |
||
) |
Definition at line 24 of file DataManager.cc.
References cond::DbConnection::configuration(), cond::DbConnection::configure(), connection, cond::DbConnection::createSession(), cond::DbSession::open(), session, and setDebug().
Referenced by DataManager().
{ connection = new cond::DbConnection() ; setDebug( false ) ; if( !isOMDS ) { connection->configuration().setConnectionSharing( true ) ; connection->configuration().setReadOnlySessionOnUpdateConnections( true ) ; } connection->configuration().setAuthenticationPath( authenticationPath ) ; connection->configure() ; session = new cond::DbSession( connection->createSession() ) ; session->open( connectString, isOMDS ) ; }
cond::DbConnection* l1t::DataManager::dbConnection | ( | ) | [inline] |
cond::DbSession* l1t::DataManager::dbSession | ( | ) | [inline] |
Definition at line 34 of file DataManager.h.
References session.
Referenced by L1CaloHcalScaleConfigOnlineProd::newObject().
{ return session ; }
edm::eventsetup::TypeTag l1t::DataManager::findType | ( | const std::string & | type | ) | const [protected] |
Definition at line 57 of file DataManager.cc.
{ static edm::eventsetup::TypeTag defaultType; edm::eventsetup::TypeTag typeTag = edm::eventsetup::TypeTag::findType (type); if (typeTag == defaultType) //throw cond::Exception ("l1t::DataManager::findType") edm::LogError("L1TriggerDB") << "DataManager::findType() : " << type << " was not found"; return typeTag; }
void l1t::DataManager::setDebug | ( | bool | debug | ) |
Definition at line 70 of file DataManager.cc.
References cond::DbConnection::configuration(), connection, and Debug.
Referenced by connect().
{ if( debug ) { connection->configuration().setMessageLevel( coral::Debug ) ; } else { connection->configuration().setMessageLevel( coral::Error ) ; } }
cond::DbConnection* l1t::DataManager::connection [protected] |
Definition at line 45 of file DataManager.h.
Referenced by connect(), dbConnection(), setDebug(), and ~DataManager().
cond::DbSession* l1t::DataManager::session [protected] |
Definition at line 44 of file DataManager.h.
Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::basicQueryView(), l1t::OMDSReader::columnNames(), l1t::OMDSReader::columnNamesView(), l1t::OMDSReader::connect(), connect(), dbSession(), l1t::OMDSReader::OMDSReader(), and ~DataManager().