CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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(std::make_unique<coral::ConnectionService>()), m_dbconfig(std::make_unique<lumi::DBConfig>(*m_svc)) {
11  std::string authpath = iConfig.getUntrackedParameter<std::string>("authPath", "");
12  if (!authpath.empty()) {
13  m_dbconfig->setAuthentication(authpath);
14  }
15 }
16 
18 
20  std::unique_lock<std::mutex> lock(m_mutex);
21 
22  return ISessionProxyPtr(std::unique_ptr<coral::ISessionProxy>(m_svc->connect(connectstring, coral::ReadOnly)),
23  std::move(lock));
24 }
T getUntrackedParameter(std::string const &, T const &) const
ISessionProxyPtr connectReadOnly(const std::string &connectstring)
Definition: DBService.cc:19
std::unique_ptr< lumi::DBConfig > m_dbconfig
Definition: DBService.h:37
def move
Definition: eostools.py:511
string authpath
Definition: EcalCondDB.py:79
list lumi
Definition: dqmdumpme.py:53
DBService(const edm::ParameterSet &iConfig)
Definition: DBService.cc:9