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 namespace PersistencySvc {
20
21 // forward declarations
22 class DatabaseRegistry;
23 class DatabaseHandler;
24
32
34 public:
39
41 bool connect( ITransaction::Type transType );
42
45 const std::string& fid,
46 const std::string& pfn,
47 long accessMode );
48
50 void disconnect( DatabaseHandler* database );
51
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:
79 std::set<DatabaseHandler*> m_databaseHandlers;
80 };
81 }
82}
83
84#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
The IStorageSvc interface is able to handle user request for.
Definition IStorageSvc.h:51
ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes.
Type
Transaction type enumeration.
DatabaseHandler is a class taking care of the micro-connections and the micro transactions for a give...
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.
DatabaseHandler * connect(ITransaction::Type transType, const std::string &fid, const std::string &pfn, long accessMode)
Connects to a database.
std::string fidForPfn(const std::string &pfn)
Fetches the FID by trying to temporatily connect to a database.
bool disconnectAll()
Disconnects from all the databases.
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.
bool connect(ITransaction::Type transType)
Connects to the storage service.
long technology() const
Returns the technology.
MicroSessionManager(DatabaseRegistry &registry, long technology)
Constructor.
std::set< DatabaseHandler * > m_databaseHandlers
pool namespace
Definition libname.h:15
const char * accessMode(pool::DbAccessMode access_mode)
Translate access mode to string.