ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
APR
PersistencySvc
src
DatabaseRegistry.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef INCLUDE_PERSISTENCYSVC_DATABASEREGISTRY_H
6
#define INCLUDE_PERSISTENCYSVC_DATABASEREGISTRY_H
7
8
#include <string>
9
#include <set>
10
#include <map>
11
12
namespace
pool
{
13
14
// Forward declarations
15
class
DatabaseHandler
;
16
17
class
DatabaseRegistry
{
18
public
:
20
explicit
DatabaseRegistry
();
21
23
~DatabaseRegistry
();
24
26
void
registerDatabaseHandler
(
DatabaseHandler
* dbHandler );
27
29
void
registerDatabaseHandler
(
DatabaseHandler
* dbHandler,
30
const
std::string& lfn );
31
33
void
deregisterDatabaseHandler
(
DatabaseHandler
* dbHandler );
34
36
DatabaseHandler
*
lookupByFID
(
const
std::string& fid );
37
39
DatabaseHandler
*
lookupByPFN
(
const
std::string& pfn );
40
42
DatabaseHandler
*
lookupByLFN
(
const
std::string& lfn );
43
44
typedef
std::set< DatabaseHandler* >::iterator
iterator
;
45
typedef
std::set< DatabaseHandler* >::const_iterator
const_iterator
;
46
48
iterator
begin
();
49
const_iterator
begin
()
const
;
50
52
iterator
end
();
53
const_iterator
end
()
const
;
54
56
std::size_t
size
()
const
;
57
58
private
:
59
std::set< DatabaseHandler* >
m_databases
;
60
std::map< std::string, DatabaseHandler* >
m_fidToDb
;
61
std::map< std::string, DatabaseHandler* >
m_pfnToDb
;
62
std::map< std::string, DatabaseHandler* >
m_lfnToDb
;
63
std::map< std::string, std::set< std::string > >
m_fidToLfns
;
64
65
// Registers a database
66
std::set< DatabaseHandler* >::iterator
registerDbHandler
(
DatabaseHandler
* dbHandler );
67
};
68
}
69
70
#include "DatabaseRegistry.inl"
71
72
#endif
pool::DatabaseHandler
DatabaseHandler is a class taking care of the micro-connections and the micro transactions for a give...
Definition
DatabaseHandler.h:30
pool::DatabaseRegistry::m_fidToLfns
std::map< std::string, std::set< std::string > > m_fidToLfns
Definition
DatabaseRegistry.h:63
pool::DatabaseRegistry::m_lfnToDb
std::map< std::string, DatabaseHandler * > m_lfnToDb
Definition
DatabaseRegistry.h:62
pool::DatabaseRegistry::end
iterator end()
The end iterators.
pool::DatabaseRegistry::registerDbHandler
std::set< DatabaseHandler * >::iterator registerDbHandler(DatabaseHandler *dbHandler)
pool::DatabaseRegistry::const_iterator
std::set< DatabaseHandler * >::const_iterator const_iterator
Definition
DatabaseRegistry.h:45
pool::DatabaseRegistry::iterator
std::set< DatabaseHandler * >::iterator iterator
Definition
DatabaseRegistry.h:44
pool::DatabaseRegistry::begin
const_iterator begin() const
pool::DatabaseRegistry::m_fidToDb
std::map< std::string, DatabaseHandler * > m_fidToDb
Definition
DatabaseRegistry.h:60
pool::DatabaseRegistry::deregisterDatabaseHandler
void deregisterDatabaseHandler(DatabaseHandler *dbHandler)
Deregisters a database.
pool::DatabaseRegistry::m_databases
std::set< DatabaseHandler * > m_databases
Definition
DatabaseRegistry.h:59
pool::DatabaseRegistry::lookupByLFN
DatabaseHandler * lookupByLFN(const std::string &lfn)
Looks up a database by its logical file name.
pool::DatabaseRegistry::registerDatabaseHandler
void registerDatabaseHandler(DatabaseHandler *dbHandler)
Registers a database.
pool::DatabaseRegistry::size
std::size_t size() const
The number of elements registered.
pool::DatabaseRegistry::lookupByPFN
DatabaseHandler * lookupByPFN(const std::string &pfn)
Looks up a database by its physical file name.
pool::DatabaseRegistry::begin
iterator begin()
The begin iterators.
pool::DatabaseRegistry::end
const_iterator end() const
pool::DatabaseRegistry::m_pfnToDb
std::map< std::string, DatabaseHandler * > m_pfnToDb
Definition
DatabaseRegistry.h:61
pool::DatabaseRegistry::registerDatabaseHandler
void registerDatabaseHandler(DatabaseHandler *dbHandler, const std::string &lfn)
Registers a database with an LFN.
pool::DatabaseRegistry::DatabaseRegistry
DatabaseRegistry()
Constructor.
pool::DatabaseRegistry::lookupByFID
DatabaseHandler * lookupByFID(const std::string &fid)
Looks up a database by its file id.
pool::DatabaseRegistry::~DatabaseRegistry
~DatabaseRegistry()
Destructor.
pool
Framework include files.
Definition
libname.h:15
Generated on
for ATLAS Offline Software by
1.17.0