ATLAS Offline Software
DbStorageExplorer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Header: /cvs/PF/pool/StorageSvc/src/DbStorageExplorer.h,v 1.16 2010/05/11 00:16:07 frankb Exp $
6 #ifndef POOL_DBSTORAGEEXPLORER_H
7 #define POOL_DBSTORAGEEXPLORER_H
8 
9 // Framework include files
11 
12 /*
13  * pool namespace declaration
14  */
15 namespace pool {
16 
17  // Forward declarations
18  class DbStorageSvc;
19  class DbDomain;
20  class DbOption;
21 
35  class DbStorageExplorer : virtual public IStorageExplorer
36  {
37  typedef std::vector<const Token*> TokenVec;
38 
41 
44 
46  std::string m_name;
47 
48  public:
49 
52 
54 
56  DbStorageExplorer(const std::string& name,
57  DbDomain& domH,
58  DbStorageSvc* pOuter);
59 
61  virtual ~DbStorageExplorer();
62 
65  virtual DbStatus queryInterface(const Guid& riid,
67  void** ppvUnknown);
68 
70  virtual unsigned int addRef();
71 
73  virtual unsigned int release();
74 
76 
93  virtual DbStatus startSession(int mode,
94  int tech,
95  SessionH& session);
96 
98 
110  virtual DbStatus endSession(const SessionH session);
111 
113 
128  virtual DbStatus connect( const SessionH sessionH,
129  int mode,
130  FileDescriptor& refDB);
131 
133 
147 
156  virtual long long int databaseSize( FileDescriptor& refDB) const;
157 
159 
166  TokenVec& conts,
167  bool intern);
168 
170 
176  TokenVec& assocs);
177 
179 
184  virtual DbStatus shapes( FileDescriptor& refDB,
185  std::vector<ShapeH>& shapes);
186 
188 
197  const std::string& nam,
198  const std::string& val);
199 
201 
208  virtual DbStatus dbParam( FileDescriptor& refDB,
209  const std::string& nam,
210  std::string& val);
211 
213 
220  Parameters& vals);
221 
223 
234  virtual DbStatus getDomainOption(const SessionH sessionH,
235  DbOption& opt);
236 
238 
249  virtual DbStatus setDomainOption(const SessionH sessionH,
250  const DbOption& opt);
251 
253 
262  DbOption& opt);
263 
265 
274  const DbOption& opt);
275 
277 
287  const std::string& cntName,
288  DbOption& opt);
289 
291 
301  const std::string& cntName,
302  const DbOption& opt);
303 
305 
314  virtual DbStatus select( FileDescriptor& refDB,
315  const std::string& cntName,
316  DbSelect& sel);
317 
319 
327  virtual DbStatus next(DbSelect& context, Token*& refpTok);
328  };
329 } // End namespace pool
330 #endif // POOL_DBSTORAGEEXPLORER_H
pool::DbStatus
Definition: DbStatus.h:67
pool::DbStorageExplorer::m_pOuter
DbStorageSvc * m_pOuter
Reference to outer interface.
Definition: DbStorageExplorer.h:40
pool::DbStorageExplorer::DbStorageExplorer
DbStorageExplorer()
Standard Constructor: Constructs an object of type DbStorageExplorer.
pool::DbStorageExplorer::setDomainOption
virtual DbStatus setDomainOption(const SessionH sessionH, const DbOption &opt)
Set options for a given database domain.
pool::DbStorageExplorer::getDatabaseOption
virtual DbStatus getDatabaseOption(FileDescriptor &refDB, DbOption &opt)
Access options for a given database.
pool::DbStorageExplorer::queryInterface
virtual DbStatus queryInterface(const Guid &riid, void **ppvUnknown)
IInterface implementation: Query interfaces of Interface.
pool
pool namespace
Definition: libname.h:15
pool::SessionH
class Session * SessionH
Definition: IStorageExplorer.h:35
pool::FileDescriptor
Definition: FileDescriptor.h:41
pool::IStorageExplorer
Definition: IStorageExplorer.h:53
pool::DbStorageExplorer::m_name
std::string m_name
Explorer name.
Definition: DbStorageExplorer.h:46
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
pool::DbStorageExplorer::setDatabaseOption
virtual DbStatus setDatabaseOption(FileDescriptor &refDB, const DbOption &opt)
Set options for a given database.
pool::DbStorageExplorer::release
virtual unsigned int release()
IInterface implementation: Release Interface instance
pool::DbStorageExplorer::containers
virtual DbStatus containers(FileDescriptor &refDB, TokenVec &conts, bool intern)
Access the containers in a given database.
pool::DbStorageExplorer::associations
virtual DbStatus associations(FileDescriptor &refDB, TokenVec &assocs)
Access the container level associations between objects.
pool::DbStorageExplorer::dbParam
virtual DbStatus dbParam(FileDescriptor &refDB, const std::string &nam, std::string &val)
Retrieve existing parameter by name.
pool::IStorageExplorer::Parameters
std::vector< Parameter > Parameters
Database parameter container definition.
Definition: IStorageExplorer.h:62
pool::DbStorageExplorer::shapes
virtual DbStatus shapes(FileDescriptor &refDB, std::vector< ShapeH > &shapes)
Access Shapes known to the database.
pool::DbStorageExplorer::m_domH
DbDomain & m_domH
Reference to domain handle.
Definition: DbStorageExplorer.h:43
pool::DbStorageExplorer::addDbParam
virtual DbStatus addDbParam(FileDescriptor &refDB, const std::string &nam, const std::string &val)
Add a persistent parameter to the database.
pool::DbOption
Definition: DbOption.h:36
sel
sel
Definition: SUSYToolsTester.cxx:92
pool::DbStorageExplorer::databaseSize
virtual long long int databaseSize(FileDescriptor &refDB) const
Access the size of the database: May be undefined for some technologies.
pool::DbSelect
Definition: DbSelect.h:44
Preparation.mode
mode
Definition: Preparation.py:95
pool::DbStorageExplorer::setContainerOption
virtual DbStatus setContainerOption(FileDescriptor &refDB, const std::string &cntName, const DbOption &opt)
Set options for a given database container.
pool::DbStorageExplorer::disconnect
virtual DbStatus disconnect(FileDescriptor &refDB)
Disconnect from a logical Database unit.
pool::DbStorageExplorer::DbStorageExplorer
DbStorageExplorer(const std::string &name, DbDomain &domH, DbStorageSvc *pOuter)
Initializing Constructor: Constructs an object of type DbStorageExplorer.
pool::DbStorageExplorer::dbParams
virtual DbStatus dbParams(FileDescriptor &refDB, Parameters &vals)
Retrieve all parameters.
pool::DbStorageExplorer::addRef
virtual unsigned int addRef()
IInterface implementation: Reference Interface instance
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
pmontree.opt
opt
Definition: pmontree.py:16
pool::DbStorageExplorer::TokenVec
std::vector< const Token * > TokenVec
Definition: DbStorageExplorer.h:37
pool::DbStorageExplorer::startSession
virtual DbStatus startSession(int mode, int tech, SessionH &session)
Start a new Database Session.
pool::DbDomain
Definition: DbDomain.h:47
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition: Guid.h:20
IStorageExplorer.h
pool::DbStorageExplorer::getDomainOption
virtual DbStatus getDomainOption(const SessionH sessionH, DbOption &opt)
Access options for a given database domain.
pool::DbStorageExplorer
Definition: DbStorageExplorer.h:36
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
pool::DbStorageExplorer::select
virtual DbStatus select(FileDescriptor &refDB, const std::string &cntName, DbSelect &sel)
Initiate a selection on a given container.
pool::DbStorageExplorer::next
virtual DbStatus next(DbSelect &context, Token *&refpTok)
Access the next token of a sequence.
pool::DbStorageExplorer::connect
virtual DbStatus connect(const SessionH sessionH, int mode, FileDescriptor &refDB)
Connect to a logical Database unit.
pool::DbStorageExplorer::getContainerOption
virtual DbStatus getContainerOption(FileDescriptor &refDB, const std::string &cntName, DbOption &opt)
Access options for a given database container.
pool::DbStorageSvc
Definition: DbStorageSvc.h:42
pool::DbStorageExplorer::~DbStorageExplorer
virtual ~DbStorageExplorer()
Standard destructor.
pool::DbStorageExplorer::endSession
virtual DbStatus endSession(const SessionH session)
End the Database session.
PlotCalibFromCool.vals
vals
Definition: PlotCalibFromCool.py:474