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 INCLUDE_PERSISTENCYSVC_IDATABASE_H
6#define INCLUDE_PERSISTENCYSVC_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;
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 long technology() const = 0;
68
70 virtual std::vector< std::string > containers() = 0;
71
73 virtual IContainer* containerHandle( const std::string& name ) = 0;
74
78 };
79
80}
81
82#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 ITechnologySpecificAttributes & technologySpecificAttributes()=0
virtual ~IDatabase()
Empty destructor.
Definition IDatabase.h:40
virtual void disconnect()=0
Disconnects from the database.
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 void connectForRead()=0
Connects explicitly to the database for read operations.
virtual const ITechnologySpecificAttributes & technologySpecificAttributes() const =0
Returns the object holding the technology specific attributes.
virtual IContainer * containerHandle(const std::string &name)=0
Returns a pointer to a container object. The user acquires ownership of that object.
virtual long technology() const =0
Returns the technology identifier for this database.
virtual Io::IoFlag openMode() const =0
Returns the opening mode. It can be used to check whether the database is connected.
ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes.
Framework include files.
Definition libname.h:15
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