CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DBConfig.cc
Go to the documentation of this file.
2 #include "RelationalAccess/ConnectionService.h"
3 #include "RelationalAccess/IConnectionServiceConfiguration.h"
4 #include "CoralKernel/Context.h"
5 #include "CoralKernel/IProperty.h"
6 #include "CoralKernel/IPropertyManager.h"
7 
8 #include <filesystem>
9 
10 namespace lumi {
11  const std::string defaultAuthFileName = "authentication.xml";
12 }
13 lumi::DBConfig::DBConfig(coral::ConnectionService& svc) : m_svc(&svc) {}
16  std::filesystem::path filesystemAuthPath(authPath);
17  if (std::filesystem::is_directory(filesystemAuthPath)) {
18  filesystemAuthPath /= std::filesystem::path(lumi::defaultAuthFileName);
19  }
20  std::string authFileName = filesystemAuthPath.string();
21  coral::Context::instance().PropertyManager().property("AuthenticationFile")->set(authFileName);
22  coral::Context::instance().loadComponent("CORAL/Services/XMLAuthenticationService");
23 }
25  //empty for now
26  return usercon;
27 }
static PFTauRenderPlugin instance
std::string trueConnectStr(const std::string &usercon)
Definition: DBConfig.cc:24
void setAuthentication(const std::string &authPath)
Definition: DBConfig.cc:15
list lumi
Definition: dqmdumpme.py:53
DBConfig(coral::ConnectionService &svc)
Definition: DBConfig.cc:13
const std::string defaultAuthFileName
Definition: DBConfig.cc:11