ATLAS Offline Software
MicroSessionManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INCLUDE_PERSISTENCYSVC_MICROSESSIONMANAGER_H
6 #define INCLUDE_PERSISTENCYSVC_MICROSESSIONMANAGER_H
7 
8 #include <string>
9 #include <set>
10 
12 
13 namespace pool {
14 
15  // forward declarations
16  class IStorageSvc;
17  class IStorageExplorer;
18  class Session;
19  class ITransaction;
20 
21  namespace PersistencySvc {
22 
23  // forward declarations
24  class DatabaseRegistry;
25  class DatabaseHandler;
26 
36  public:
39  ITransaction& transaction,
40  long technology );
43 
45  DatabaseHandler* connect( const std::string& fid,
46  const std::string& pfn,
47  long accessMode );
48 
51 
53  bool disconnectAll();
54 
56  long technology() const;
57 
59  std::string fidForPfn( const std::string& pfn );
60 
61  protected:
62  virtual
63  bool attributeOfType( const std::string& attributeName,
64  void* data,
65  const std::type_info& typeInfo,
66  const std::string& option ) override;
67 
68  virtual
69  bool setAttributeOfType( const std::string& attributeName,
70  const void* data,
71  const std::type_info& typeInfo,
72  const std::string& option ) override;
73 
74  private:
81  std::set<DatabaseHandler*> m_databaseHandlers;
82  };
83  }
84 }
85 
86 #endif
python.Dso.registry
registry
Definition: Control/AthenaServices/python/Dso.py:159
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
pool::PersistencySvc::MicroSessionManager::connect
DatabaseHandler * connect(const std::string &fid, const std::string &pfn, long accessMode)
Connects to a database.
pool::PersistencySvc::DatabaseHandler
Definition: DatabaseHandler.h:34
pool::PersistencySvc::MicroSessionManager::m_technology
long m_technology
Definition: MicroSessionManager.h:80
pool::PersistencySvc::MicroSessionManager::fidForPfn
std::string fidForPfn(const std::string &pfn)
Fetches the FID by trying to temporatily connect to a database.
pool
pool namespace
Definition: libname.h:15
pool::PersistencySvc::MicroSessionManager::m_registry
DatabaseRegistry & m_registry
Definition: MicroSessionManager.h:75
pool::IStorageExplorer
Definition: IStorageExplorer.h:53
python.oracle.Session
Session
Definition: oracle.py:78
pool::PersistencySvc::MicroSessionManager::m_transaction
ITransaction & m_transaction
Definition: MicroSessionManager.h:76
pool::PersistencySvc::MicroSessionManager::disconnect
void disconnect(DatabaseHandler *database)
Disconnects from a database.
python.subdetectors.mmg.database
database
Definition: mmg.py:6
pool::ITransaction
Definition: ITransaction.h:21
pool::PersistencySvc::MicroSessionManager::technology
long technology() const
Returns the technology.
pool::PersistencySvc::DatabaseRegistry
Definition: DatabaseRegistry.h:19
pool::PersistencySvc::MicroSessionManager::MicroSessionManager
MicroSessionManager(DatabaseRegistry &registry, ITransaction &transaction, long technology)
Constructor.
pool::IStorageSvc
Definition: IStorageSvc.h:56
pool::PersistencySvc::MicroSessionManager
Definition: MicroSessionManager.h:35
pool::ITechnologySpecificAttributes
Definition: ITechnologySpecificAttributes.h:22
pool::PersistencySvc::MicroSessionManager::setAttributeOfType
virtual bool setAttributeOfType(const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option) override
The actual method setting the attribute data given a name.
ITechnologySpecificAttributes.h
pool::PersistencySvc::MicroSessionManager::m_storageSvc
IStorageSvc * m_storageSvc
Definition: MicroSessionManager.h:77
pool::accessMode
const char * accessMode(pool::DbAccessMode access_mode)
Translate access mode to string.
pool::PersistencySvc::MicroSessionManager::m_session
Session * m_session
Definition: MicroSessionManager.h:79
pool::PersistencySvc::MicroSessionManager::m_storageExplorer
IStorageExplorer * m_storageExplorer
Definition: MicroSessionManager.h:78
pool::PersistencySvc::MicroSessionManager::disconnectAll
bool disconnectAll()
Disconnects from all the databases.
pool::PersistencySvc::MicroSessionManager::m_databaseHandlers
std::set< DatabaseHandler * > m_databaseHandlers
Definition: MicroSessionManager.h:81
pool::PersistencySvc::MicroSessionManager::~MicroSessionManager
virtual ~MicroSessionManager()
Destructor.
pool::PersistencySvc::MicroSessionManager::attributeOfType
virtual bool attributeOfType(const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option) override
The actual method returning the attribute data given a name.