Main Page
Namespaces
Classes
Package Documentation
RecoLuminosity
LumiProducer
src
DBService.cc
Go to the documentation of this file.
1
#include "
RecoLuminosity/LumiProducer/interface/DBService.h
"
2
#include "
RecoLuminosity/LumiProducer/interface/DBConfig.h
"
3
#include "RelationalAccess/ConnectionService.h"
4
#include "CoralBase/Exception.h"
5
#include "RelationalAccess/ISessionProxy.h"
6
#include "RelationalAccess/AccessMode.h"
7
8
#include <iostream>
9
lumi::service::DBService::DBService
(
const
edm::ParameterSet
& iConfig):
10
m_svc(
std
::make_unique<
coral
::ConnectionService>()),
11
m_dbconfig(
std
::make_unique<
lumi
::
DBConfig
>(*m_svc))
12
{
13
std::string
authpath
=iConfig.
getUntrackedParameter
<
std::string
>(
"authPath"
,
""
);
14
if
( !authpath.empty() ){
15
m_dbconfig
->setAuthentication(authpath);
16
}
17
}
18
19
lumi::service::DBService::~DBService
() {}
20
21
lumi::service::ISessionProxyPtr
22
lumi::service::DBService::connectReadOnly
(
const
std::string
& connectstring ){
23
std::unique_lock<std::mutex>
lock
(
m_mutex
);
24
25
return
ISessionProxyPtr
(std::unique_ptr<coral::ISessionProxy>(
m_svc
->connect(connectstring, coral::ReadOnly)),
26
std::move
(lock));
27
}
28
CommonMethods.lock
def lock()
Definition:
CommonMethods.py:82
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
lumi::service::DBService::connectReadOnly
ISessionProxyPtr connectReadOnly(const std::string &connectstring)
Definition:
DBService.cc:22
std
Definition:
JetResolutionObject.h:80
lumi::service::DBService::m_dbconfig
std::unique_ptr< lumi::DBConfig > m_dbconfig
Definition:
DBService.h:40
lumi::service::DBService::m_mutex
std::mutex m_mutex
Definition:
DBService.h:41
DBService.h
coral
Definition:
Binary.h:9
lumi::service::ISessionProxyPtr
Definition:
DBService.h:16
DBConfig.h
lumi::service::DBService::DBService
DBService(const edm::ParameterSet &iConfig)
Definition:
DBService.cc:9
lumi::service::DBService::m_svc
std::unique_ptr< coral::ConnectionService > m_svc
Definition:
DBService.h:39
lumi::DBConfig
Definition:
DBConfig.h:8
edm::ParameterSet
Definition:
ParameterSet.h:36
lumi
Definition:
LumiSectionData.h:20
dataDML.authpath
authpath
Definition:
dataDML.py:2335
lumi::service::DBService::~DBService
~DBService()
Definition:
DBService.cc:19
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Generated for CMSSW Reference Manual by
1.8.11