ATLAS Offline Software
IDbDatabase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //====================================================================
6 //
7 // Package : pool/StorageSvc (The pool framework)
8 //
9 // @author M.Frank
10 //
11 //====================================================================
12 #ifndef POOL_IDBDATABASE_H
13 #define POOL_IDBDATABASE_H
14 // $Header: /cvs/PF/pool/StorageSvc/StorageSvc/IDbDatabase.h,v 1.18 2007/11/28 16:19:32 frankb Exp $
15 
16 // Framework include files
17 #include "StorageSvc/pool.h"
18 #include "StorageSvc/Transaction.h"
19 
20 /*
21  * POOL namespace declaration
22  */
23 namespace pool {
24 
25  // Forward declarations
26  class DbOption;
27  class DbDomain;
28  class DbDatabase;
29  class DbContainer;
30 
41  class IDbDatabase {
42  public:
43  virtual ~IDbDatabase() { }
44 
46  virtual long long int size() const = 0;
47 
49 
53  virtual DbStatus setOption(const DbOption& refOpt) = 0;
54 
56 
60  virtual DbStatus getOption(DbOption& refOpt) = 0;
61 
63 
68 
70 
77  virtual DbStatus open(const DbDomain& domH,
78  const std::string& nam,
79  DbAccessMode mode) = 0;
80 
82 
87  virtual DbStatus onOpen(DbDatabase& dbH,
88  DbAccessMode mode) = 0;
89 
91 
96 
98 
102  };
103 } // End namespace pool
104 #endif // POOL_IDBDATABASE_H
pool::DbAccessMode
int DbAccessMode
Definition: Database/APR/StorageSvc/StorageSvc/pool.h:47
pool::IDbDatabase::~IDbDatabase
virtual ~IDbDatabase()
Definition: IDbDatabase.h:43
pool::IDbDatabase::getOption
virtual DbStatus getOption(DbOption &refOpt)=0
Access options.
pool::DbStatus
Definition: DbStatus.h:67
Transaction.h
pool::IDbDatabase::onOpen
virtual DbStatus onOpen(DbDatabase &dbH, DbAccessMode mode)=0
Callback after successful open of a database object.
pool::IDbDatabase::open
virtual DbStatus open(const DbDomain &domH, const std::string &nam, DbAccessMode mode)=0
Open Database object.
pool
pool namespace
Definition: libname.h:15
pool::IDbDatabase::reopen
virtual DbStatus reopen(DbAccessMode mode)=0
Re-open database with changing access permissions.
pool::IDbDatabase
Definition: IDbDatabase.h:41
pool::DbOption
Definition: DbOption.h:36
pool::IDbDatabase::setOption
virtual DbStatus setOption(const DbOption &refOpt)=0
Set options.
Preparation.mode
mode
Definition: Preparation.py:94
pool::IDbDatabase::size
virtual long long int size() const =0
Access the size of the database: May be undefined for some technologies.
pool.h
pool::IDbDatabase::close
virtual DbStatus close(DbAccessMode mode)=0
Close database access.
pool::Transaction::Action
Action
Definition: Transaction.h:34
pool::DbDomain
Definition: DbDomain.h:47
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
pool::DbDatabase
Definition: DbDatabase.h:53
pool::IDbDatabase::transAct
virtual DbStatus transAct(Transaction::Action action)=0
Execute Database Transaction action.