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 | Private 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::persistency::Session dbSession ()
 
void setDebug (bool debug)
 
virtual ~DataManager ()
 

Protected Member Functions

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

Protected Attributes

cond::persistency::Session session
 

Private Attributes

bool debugFlag = false
 

Detailed Description

Definition at line 18 of file DataManager.h.

Constructor & Destructor Documentation

l1t::DataManager::DataManager ( )

Definition at line 13 of file DataManager.cc.

14  : session( 0 ){}
cond::persistency::Session session
Definition: DataManager.h:40
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 38 of file DataManager.cc.

References cond::persistency::Session::close(), and session.

39 {
40  // delete all in reverse direction
41  session.close() ;
42 
43 }
cond::persistency::Session session
Definition: DataManager.h:40

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::persistency::ConnectionPool::configure(), cond::persistency::ConnectionPool::createSession(), Debug, debugFlag, session, cond::persistency::ConnectionPool::setAuthenticationPath(), setDebug(), and cond::persistency::ConnectionPool::setMessageVerbosity().

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  {
28  setDebug( false ) ;
30  connection.setAuthenticationPath( authenticationPath ) ;
31  if( debugFlag ) connection.setMessageVerbosity( coral::Debug );
32  else connection.setMessageVerbosity( coral::Error ) ;
33  connection.configure() ;
34 
35  session = connection.createSession( connectString, false );
36 }
Session createSession(const std::string &connectionString, bool writeCapable=false)
void setMessageVerbosity(coral::MsgLevel level)
void setAuthenticationPath(const std::string &p)
void setDebug(bool debug)
Definition: DataManager.cc:58
const bool Debug
cond::persistency::Session session
Definition: DataManager.h:40
cond::persistency::Session l1t::DataManager::dbSession ( )
inline

Definition at line 32 of file DataManager.h.

References session.

Referenced by L1CaloHcalScaleConfigOnlineProd::newObject().

33  { return session ; }
cond::persistency::Session session
Definition: DataManager.h:40
edm::eventsetup::TypeTag l1t::DataManager::findType ( const std::string &  type)
protected

Definition at line 45 of file DataManager.cc.

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

46 {
47  static edm::eventsetup::TypeTag defaultType;
49 
50  if (typeTag == defaultType)
51  //throw cond::Exception ("l1t::DataManager::findType")
52  edm::LogError("L1TriggerDB") << "DataManager::findType() : " << type << " was not found";
53 
54  return typeTag;
55 }
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 58 of file DataManager.cc.

References debug, and debugFlag.

Referenced by connect().

59  {
60  debugFlag = debug;
61  }
#define debug
Definition: HDRShower.cc:19

Member Data Documentation

bool l1t::DataManager::debugFlag = false
private

Definition at line 43 of file DataManager.h.

Referenced by connect(), and setDebug().

cond::persistency::Session l1t::DataManager::session
protected