test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DBService.cc
Go to the documentation of this file.
3 #include "RelationalAccess/ConnectionService.h"
4 #include "CoralBase/Exception.h"
5 #include "RelationalAccess/ISessionProxy.h"
6 #include "RelationalAccess/AccessMode.h"
7 
8 #include <iostream>
10  m_svc=new coral::ConnectionService;
12  std::string authpath=iConfig.getUntrackedParameter<std::string>("authPath","");
13  if( !authpath.empty() ){
14  m_dbconfig->setAuthentication(authpath);
15  }
16 }
18  delete m_dbconfig;
19  delete m_svc;
20 }
21 
22 coral::ISessionProxy*
24  return m_svc->connect(connectstring, coral::ReadOnly);
25 }
26 void
28  delete session;
29 }
30 
T getUntrackedParameter(std::string const &, T const &) const
lumi::DBConfig * m_dbconfig
Definition: DBService.h:23
void setAuthentication(const std::string &authPath)
Definition: DBConfig.cc:15
string authpath
Definition: EcalCondDB.py:77
void disconnect(coral::ISessionProxy *session)
Definition: DBService.cc:27
DBService(const edm::ParameterSet &iConfig)
Definition: DBService.cc:9
coral::ISessionProxy * connectReadOnly(const std::string &connectstring)
Definition: DBService.cc:23
session
Definition: models.py:201
coral::ConnectionService * m_svc
Definition: DBService.h:22