ATLAS Offline Software
DBReplicaSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DBREPLICASVC_DBREPLICASVC_H
6 #define DBREPLICASVC_DBREPLICASVC_H
7 // DBReplicaSvc.h - concrete implementation of service implementating
8 // CORAL IReplicaSortingAlgorithm
9 // Richard Hawkings, started 24/4/07
10 
11 #include <string>
14 #include "RelationalAccess/IDatabaseServiceDescription.h"
15 
16 class DBReplicaSvc : public virtual IDBReplicaSvc, public virtual AthService
17 {
18  template <class TYPE> class SvcFactory;
19  public:
20  DBReplicaSvc(const std::string& name, ISvcLocator* svc);
21  virtual ~DBReplicaSvc();
22 
23  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
24 
25  virtual const InterfaceID& type() const;
26 
27  virtual StatusCode initialize();
28  virtual StatusCode finalize();
29 
30  void sort(std::vector<const coral::IDatabaseServiceDescription*>&
31  replicaSet);
32 
33  private:
35  std::string m_configfile;
36  std::string m_testhost;
37  std::string m_coolsqlitepattern;
42 
44  std::string m_hostname;
45  typedef std::pair<std::string,int> ServerPair;
46  typedef std::vector< ServerPair > ServerMap;
48 };
49 
50 #endif // DBREPLICASVC_DBREPLICASVC_H
DBReplicaSvc::type
virtual const InterfaceID & type() const
Definition: DBReplicaSvc.cxx:36
DBReplicaSvc::m_usecoolfrontier
bool m_usecoolfrontier
Definition: DBReplicaSvc.h:39
DBReplicaSvc::m_nofailover
bool m_nofailover
Definition: DBReplicaSvc.h:41
DBReplicaSvc::m_servermap
ServerMap m_servermap
Definition: DBReplicaSvc.h:47
DBReplicaSvc::m_usecoolsqlite
bool m_usecoolsqlite
Definition: DBReplicaSvc.h:38
DBReplicaSvc::initialize
virtual StatusCode initialize()
Definition: DBReplicaSvc.cxx:51
DBReplicaSvc::SvcFactory
Definition: DBReplicaSvc.h:18
DBReplicaSvc::finalize
virtual StatusCode finalize()
Definition: DBReplicaSvc.cxx:109
DBReplicaSvc::ServerPair
std::pair< std::string, int > ServerPair
Definition: DBReplicaSvc.h:45
DBReplicaSvc::m_hostname
std::string m_hostname
Definition: DBReplicaSvc.h:44
DBReplicaSvc
Definition: DBReplicaSvc.h:17
DBReplicaSvc::readConfig
StatusCode readConfig()
Definition: DBReplicaSvc.cxx:113
DBReplicaSvc::m_usegeomsqlite
bool m_usegeomsqlite
Definition: DBReplicaSvc.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthService
Definition: AthService.h:32
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
DBReplicaSvc::ServerMap
std::vector< ServerPair > ServerMap
Definition: DBReplicaSvc.h:46
DBReplicaSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Definition: DBReplicaSvc.cxx:41
DBReplicaSvc::DBReplicaSvc
DBReplicaSvc(const std::string &name, ISvcLocator *svc)
Definition: DBReplicaSvc.cxx:14
DBReplicaSvc::m_coolsqlitepattern
std::string m_coolsqlitepattern
Definition: DBReplicaSvc.h:37
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DBReplicaSvc::m_frontiergen
bool m_frontiergen
Definition: DBReplicaSvc.h:43
DBReplicaSvc::m_configfile
std::string m_configfile
Definition: DBReplicaSvc.h:35
DBReplicaSvc::m_testhost
std::string m_testhost
Definition: DBReplicaSvc.h:36
IDBReplicaSvc.h
DBReplicaSvc::sort
void sort(std::vector< const coral::IDatabaseServiceDescription * > &replicaSet)
Definition: DBReplicaSvc.cxx:210
AthService.h
DBReplicaSvc::~DBReplicaSvc
virtual ~DBReplicaSvc()
Definition: DBReplicaSvc.cxx:34
IDBReplicaSvc
Definition: IDBReplicaSvc.h:15