ATLAS Offline Software
Loading...
Searching...
No Matches
IDatabase.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 POOLSVC_IDATABASE_H
6#define POOLSVC_IDATABASE_H
7
8#include "StorageSvc/pool.h"
9
10// includes
11#include <string>
12#include <vector>
13
14namespace pool {
15
16 // forward declarations
17 class IContainer;
18 class FileDescriptor;
19
30
36
37 class IDatabase {
38 public:
40 virtual ~IDatabase() {};
41
43 virtual void connectForRead() = 0;
44
46 virtual void connectForWrite() = 0;
47
49 virtual void disconnect() = 0;
50
52 virtual Io::IoFlag openMode() const = 0;
53
55 virtual const std::string& fid() = 0;
56
58 virtual const std::string& pfn() = 0;
59
64 virtual bool setTechnology( long technology ) = 0;
65
67 virtual std::vector< std::string > containers() = 0;
68
70 virtual IContainer* containerHandle( const std::string& name ) = 0;
71
74
76 virtual bool attributeOfType( const std::string& attributeName,
77 void* data,
78 const std::type_info& typeInfo,
79 const std::string& option ) = 0;
80
82 virtual bool setAttributeOfType( const std::string& attributeName,
83 const void* data,
84 const std::type_info& typeInfo,
85 const std::string& option ) = 0;
86 };
87
88}
89
90#endif
IContainer is the base class for container objects.
Definition IContainer.h:23
IDatabase is the base class for database objects.
Definition IDatabase.h:37
virtual void connectForWrite()=0
Connects explicitly to the database for write/update operations.
virtual ~IDatabase()
Empty destructor.
Definition IDatabase.h:40
virtual void disconnect()=0
Disconnects from the database.
virtual FileDescriptor * fileDescriptor()=0
Expose FileDescriptor object for the technology specific DB implementation.
virtual bool setTechnology(long technology)=0
Sets the technology identifier for this database.
virtual const std::string & pfn()=0
Returns the physical file name of this database.
virtual std::vector< std::string > containers()=0
Returns the names of the containers in this database.
virtual const std::string & fid()=0
Returns the file identifier of this database.
virtual bool setAttributeOfType(const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option)=0
The method setting the attribute data given a name.
virtual void connectForRead()=0
Connects explicitly to the database for read operations.
virtual bool attributeOfType(const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option)=0
The method returning the attribute data given a name.
virtual IContainer * containerHandle(const std::string &name)=0
Returns a pointer to a container object. The user acquires ownership of that object.
virtual Io::IoFlag openMode() const =0
Returns the opening mode. It can be used to check whether the database is connected.
NameType
Enumeration type specifying the database name field, wherever the latter is used in methods accessing...
Definition IDatabase.h:24
@ FID
Physical File Name.
Definition IDatabase.h:26
@ LFN
File IDentifier.
Definition IDatabase.h:27