ATLAS Offline Software
Loading...
Searching...
No Matches
DBReplicaSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
16class DBReplicaSvc : public extends<AthService, IDBReplicaSvc>
17{
18 public:
19 using base_class::base_class;
20
21 virtual StatusCode initialize() override;
22
23 void sort(std::vector<const coral::IDatabaseServiceDescription*>& replicaSet) override;
24
25 private:
26 StatusCode readConfig();
27
28 Gaudi::Property<std::string> m_configfile{this, "ConfigFile", "dbreplica.config"};
29 Gaudi::Property<std::string> m_testhost{this, "TestHost", ""};
30 Gaudi::Property<std::string> m_coolsqlitepattern{this, "COOLSQLiteVetoPattern", ""};
31 Gaudi::Property<bool> m_usecoolsqlite{this, "UseCOOLSQLite", true};
32 Gaudi::Property<bool> m_usecoolfrontier{this, "UseCOOLFrontier", true};
33 Gaudi::Property<bool> m_usegeomsqlite{this, "UseGeomSQLite", true};
34 Gaudi::Property<bool> m_nofailover{this, "DisableFailover", false};
35
36 bool m_frontiergen{false};
37 std::string m_hostname;
38 typedef std::pair<std::string, int> ServerPair; //<! (priority, name) pair
39 std::vector<ServerPair> m_servermap;
40};
41
42#endif // DBREPLICASVC_DBREPLICASVC_H
std::string m_hostname
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_testhost
Gaudi::Property< bool > m_usegeomsqlite
void sort(std::vector< const coral::IDatabaseServiceDescription * > &replicaSet) override
std::pair< std::string, int > ServerPair
Gaudi::Property< bool > m_usecoolsqlite
Gaudi::Property< bool > m_nofailover
Gaudi::Property< std::string > m_coolsqlitepattern
std::vector< ServerPair > m_servermap
Gaudi::Property< std::string > m_configfile
StatusCode readConfig()
Gaudi::Property< bool > m_usecoolfrontier