ATLAS Offline Software
Loading...
Searching...
No Matches
DatabaseHandler.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_DATABASEHANDLER_H
6#define INCLUDE_PERSISTENCYSVC_DATABASEHANDLER_H
7
10#include <vector>
11#include <set>
12#include <utility>
13
14class Guid;
15class Token;
16
17namespace pool {
18
19 // forward declarations
20 class IStorageSvc;
21 class IContainer;
22
29
31 public:
34 long technology,
35 const std::string& fid,
36 const std::string& pfn,
37 Io::IoFlag accessmode );
38
41
44
47
50
52 std::vector< std::string > containers();
53
55 IContainer* container( const std::string& containerName );
56
58 const std::string& pfn() const;
59
61 const std::string& fid() const;
62
64 long technology() const;
65
67 Io::IoFlag accessMode() const;
68
70 Token* writeObject( const std::string& containerName,
71 long minorTechnology,
72 const void* object,
73 const RootType& type );
74
76 void* readObject( const Token& token, void* object = 0 );
77
79 bool attribute( const std::string& attributeName,
80 void* data,
81 const std::type_info& typeInfo,
82 const std::string& option );
83
85 bool setAttribute( const std::string& attributeName,
86 const void* data,
87 const std::type_info& typeInfo,
88 const std::string& option );
89
90 private:
98 Io::IoFlag m_accessMode;
99 };
100}
101
102#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
TTypeAdapter RootType
Definition RootType.h:211
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition Guid.h:25
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
Token * writeObject(const std::string &containerName, long minorTechnology, const void *object, const RootType &type)
Writes an object and returns a token.
FileDescriptor m_fileDescriptor
File descriptor for this database.
bool commitAndHoldTransaction()
Commits and holds the transaction.
void * readObject(const Token &token, void *object=0)
Reads an object given a token.
std::vector< std::string > containers()
Gives the list of containers.
bool attribute(const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option)
Returns an attribute.
IContainer * container(const std::string &containerName)
Returns a container handle.
bool disconnectTransaction()
Disconnects the transaction.
long m_technology
Technology identifier.
bool commitTransaction()
Commits the transaction.
const std::string & pfn() const
Returns the physical file name.
Io::IoFlag accessMode() const
Returns the access mode.
long technology() const
Returns the technology identifier.
~DatabaseHandler()
Destructor. Disconnects from the database.
Io::IoFlag m_accessMode
Current access mode.
bool setAttribute(const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option)
Sets an attrtibute.
DatabaseHandler(IStorageSvc &storageSvc, long technology, const std::string &fid, const std::string &pfn, Io::IoFlag accessmode)
Constructor. Connects to the database.
const std::string & fid() const
Returns the file identifier.
IStorageSvc & m_storageSvc
IStorageSvc reference.
IContainer is the base class for container objects.
Definition IContainer.h:23
The IStorageSvc interface is able to handle user request for.
Definition IStorageSvc.h:50
Framework include files.
Definition libname.h:15