test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
l1t::DataManager Class Reference

#include <DataManager.h>

Inheritance diagram for l1t::DataManager:
l1t::OMDSReader

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::DbConnectiondbConnection ()
 
cond::DbSessiondbSession ()
 
void setDebug (bool debug)
 
virtual ~DataManager ()
 

Protected Member Functions

edm::eventsetup::TypeTag findType (const std::string &type) const
 

Protected Attributes

cond::DbConnectionconnection
 
cond::DbSessionsession
 

Detailed Description

Definition at line 20 of file DataManager.h.

Constructor & Destructor Documentation

l1t::DataManager::DataManager ( )

Definition at line 12 of file DataManager.cc.

13  : session( 0 ),
14  connection( 0 ) {}
cond::DbConnection * connection
Definition: DataManager.h:45
cond::DbSession * session
Definition: DataManager.h:44
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().

19  {
20  connect( connectString, authenticationPath, isOMDS ) ;
21  }
void connect(const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
Definition: DataManager.cc:24
l1t::DataManager::~DataManager ( )
virtual

Definition at line 45 of file DataManager.cc.

References cond::DbConnection::close(), cond::DbSession::close(), connection, and session.

46 {
47  // delete all in reverse direction
48  if( connection )
49  connection->close() ;
50  if( session )
51  session->close() ;
52 
53  delete connection ;
54  delete session ;
55 }
cond::DbConnection * connection
Definition: DataManager.h:45
cond::DbSession * session
Definition: DataManager.h:44

Member Function Documentation

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, cond::DbConnectionConfiguration::setAuthenticationPath(), cond::DbConnectionConfiguration::setConnectionSharing(), setDebug(), and cond::DbConnectionConfiguration::setReadOnlySessionOnUpdateConnections().

Referenced by Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::__init__(), Vispa.Views.PropertyView.BooleanProperty::__init__(), Vispa.Gui.FindDialog.FindDialog::_addScript(), Vispa.Gui.FindDialog.FindDialog::_addStringProperty(), Vispa.Main.Application.Application::_connectSignals(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), Vispa.Views.PropertyView.PropertyView::append(), Vispa.Views.PropertyView.PropertyView::appendAddRow(), l1t::OMDSReader::connect(), Vispa.Main.Application.Application::createAction(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createButton(), Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createLineEdit(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createTextEdit(), DataManager(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Gui.PortWidget.PortWidget::mouseMoveEvent(), Vispa.Views.PropertyView.BooleanProperty::setChecked(), Vispa.Main.SplitterTab.SplitterTab::setController(), Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), Vispa.Views.PropertyView.IntegerProperty::setValue(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().

27  {
29  setDebug( false ) ;
30 
31  if( !isOMDS )
32  {
35  true ) ;
36  }
37 
38  connection->configuration().setAuthenticationPath( authenticationPath ) ;
40 
42  session->open( connectString, isOMDS ) ;
43 }
void open(const std::string &connectionString, bool readOnly=false)
Definition: DbSession.cc:159
DbConnectionConfiguration & configuration()
Definition: DbConnection.cc:83
DbSession createSession() const
Definition: DbConnection.cc:66
void setAuthenticationPath(const std::string &p)
cond::DbConnection * connection
Definition: DataManager.h:45
void setDebug(bool debug)
Definition: DataManager.cc:70
cond::DbSession * session
Definition: DataManager.h:44
cond::DbConnection* l1t::DataManager::dbConnection ( )
inline

Definition at line 37 of file DataManager.h.

References connection.

38  { return connection ; }
cond::DbConnection * connection
Definition: DataManager.h:45
cond::DbSession* l1t::DataManager::dbSession ( )
inline

Definition at line 34 of file DataManager.h.

References session.

Referenced by L1CaloHcalScaleConfigOnlineProd::newObject().

35  { return session ; }
cond::DbSession * session
Definition: DataManager.h:44
edm::eventsetup::TypeTag l1t::DataManager::findType ( const std::string &  type) const
protected

Definition at line 57 of file DataManager.cc.

References edm::eventsetup::heterocontainer::HCTypeTag::findType().

58 {
59  static edm::eventsetup::TypeTag defaultType;
61 
62  if (typeTag == defaultType)
63  //throw cond::Exception ("l1t::DataManager::findType")
64  edm::LogError("L1TriggerDB") << "DataManager::findType() : " << type << " was not found";
65 
66  return typeTag;
67 }
type
Definition: HCALResponse.h:21
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125
void l1t::DataManager::setDebug ( bool  debug)

Definition at line 70 of file DataManager.cc.

References cond::DbConnection::configuration(), connection, Debug, and cond::DbConnectionConfiguration::setMessageLevel().

Referenced by connect().

71  {
72  if( debug )
73  {
75  }
76  else
77  {
78  connection->configuration().setMessageLevel( coral::Error ) ;
79  }
80  }
DbConnectionConfiguration & configuration()
Definition: DbConnection.cc:83
#define debug
Definition: HDRShower.cc:19
cond::DbConnection * connection
Definition: DataManager.h:45
const bool Debug

Member Data Documentation

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