ATLAS Offline Software
Loading...
Searching...
No Matches
MicroSessionManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
13
14namespace pool {
15
16 // forward declarations
17 class IStorageSvc;
18
19 // forward declarations
20 class DatabaseRegistry;
21 class DatabaseHandler;
22
30
32 public:
37
39 bool connect( ITransaction::Type transType );
40
43 const std::string& fid,
44 const std::string& pfn,
45 long accessMode );
46
48 void disconnect( DatabaseHandler* database );
49
52
54 long technology() const;
55
57 std::string fidForPfn( const std::string& pfn );
58
59 protected:
60 virtual
61 bool attributeOfType( const std::string& attributeName,
62 void* data,
63 const std::type_info& typeInfo,
64 const std::string& option ) override;
65
66 virtual
67 bool setAttributeOfType( const std::string& attributeName,
68 const void* data,
69 const std::type_info& typeInfo,
70 const std::string& option ) override;
71
72 private:
77 std::set<DatabaseHandler*> m_databaseHandlers;
78 };
79}
80
81#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
DatabaseHandler is a class taking care of the micro-connections and the micro transactions for a give...
The IStorageSvc interface is able to handle user request for.
Definition IStorageSvc.h:50
ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes.
Type
Transaction type enumeration.
virtual ~MicroSessionManager()
Destructor.
bool connect(ITransaction::Type transType)
Connects to the storage service.
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.
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.
void disconnect(DatabaseHandler *database)
Disconnects from a database.
long technology() const
Returns the technology.
std::string fidForPfn(const std::string &pfn)
Fetches the FID by trying to temporatily connect to a database.
MicroSessionManager(DatabaseRegistry &registry, long technology)
Constructor.
DatabaseHandler * connect(ITransaction::Type transType, const std::string &fid, const std::string &pfn, long accessMode)
Connects to a database.
bool disconnectAll()
Disconnects from all the databases.
std::set< DatabaseHandler * > m_databaseHandlers
Framework include files.
Definition libname.h:15
const char * accessMode(pool::DbAccessMode access_mode)
Translate access mode to string.