| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

Public Types | Public Member Functions

# IPoolDbMgr Class Reference

Description: More...

`#include <PoolDb/IPoolDbMgr.h>`

Inheritance diagram for IPoolDbMgr:
[legend]
Collaboration diagram for IPoolDbMgr:
[legend]

List of all members.

## Public Types
enum | { UNKNOWN = Gaudi::IIODataManager::UNKNOWN, PFN = Gaudi::IIODataManager::PFN, LFN = Gaudi::IIODataManager::LFN, FID = Gaudi::IIODataManager::FID }
enum | { BAD_DATA_CONNECTION = Gaudi::IDataConnection::BAD_DATA_CONNECTION }
## Public Member Functions
| DeclareInterfaceID (IPoolDbMgr, 2, 0)
| InterfaceID.
virtual IPoolCacheSvc * | cacheSvc () const =0
| Access to cache service.
virtual StatusCode | accessStorageType (const std::string &type_string, long &gaudi_type)=0
| Create access to the POOL persistency mechanism using the Gaudi String identifier.
virtual StatusCode | createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ipar, IOpaqueAddress *&refpAddress)=0
| Create a Generic address using explicit arguments to identify a single object.
virtual StatusCode | createAddress (pool::Token *pToken, PoolDbAddress **ppAddress)=0
| Create a Generic address using explicit arguments to identify a single object.
virtual StatusCode | connectOutput (const std::string &outputFile, const std::string &openMode)=0
| Connect the output file to the service with open mode.
virtual StatusCode | commitOutput (const std::string &outputFile, bool do_commit)=0
| Commit pending output.
virtual StatusCode | connect (const std::string &dbName, const std::string &cntName, pool::DbContainer &cntH)=0
| Connect to a database container in read mode.
virtual StatusCode | connectContainer (int typ, const std::string &dbName, const std::string &cntName, pool::DbAccessMode openMode, const pool::DbTypeInfo *shape, pool::DbContainer &cntH)=0
| Connect to a database container.
virtual pool::DbSelect * | createSelect (const std::string &criteria, const std::string &dbName, const std::string &cntName)=0
| Request an iterator over a container from the service.
virtual StatusCode | disconnect (const std::string &dbName)=0
| Disconnect from an existing data stream.
virtual StatusCode | markWrite (pool::DataCallBack *call, const std::string &cntName, PoolDbAddress **ppAddr=0)=0
| Marks a reference to be written.
virtual StatusCode | markUpdate (pool::DataCallBack *call, PoolDbAddress *pAddr)=0
| Mark an object for update.
virtual StatusCode | read (pool::DataCallBack *call, PoolDbAddress *pAddr)=0
| Read existing object.
virtual StatusCode | read (pool::DataCallBack *call, pool::Token &tok)=0
| Read existing object. Open transaction in read mode if not active.

## Detailed Description

Description:

The IPoolDbMgr service interface allows to store and retrieve data stored with the POOL persistency mechanism.

Author:
  Markus Frank

Version:
  1.0

Definition at line 51 of file IPoolDbMgr.h.

## Member Enumeration Documentation

anonymous enum

Enumerator:

  BAD_DATA_CONNECTION |

Definition at line 61 of file IPoolDbMgr.h.

    { BAD_DATA_CONNECTION=Gaudi::IDataConnection::BAD_DATA_CONNECTION };

anonymous enum

Enumerator:

  UNKNOWN |
  PFN |
  LFN |
  FID |

Definition at line 56 of file IPoolDbMgr.h.

           { UNKNOWN = Gaudi::IIODataManager::UNKNOWN,
             PFN = Gaudi::IIODataManager::PFN,
             LFN = Gaudi::IIODataManager::LFN,
             FID = Gaudi::IIODataManager::FID
      };

## Member Function Documentation

virtual StatusCode IPoolDbMgr::accessStorageType | ( | const std::string & | type_string,
|  | long & | gaudi_type
| ) |  | `[pure virtual]`

Create access to the POOL persistency mechanism using the Gaudi String identifier.

Also all appropriate DLLS will be loaded on the fly.

Parameters:

  type_string | Gaudi storage string identifier
  gaudi_type | Gaudi storage identifier

Returns:
  Status code indicating failure or success.

Implemented in PoolDbCnvSvc.

virtual IPoolCacheSvc* IPoolDbMgr::cacheSvc | ( | ) | const`[pure virtual]`

Access to cache service.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::commitOutput | ( | const std::string & | outputFile,
|  | bool | do_commit
| ) |  | `[pure virtual]`

Commit pending output.

Parameters:

  outputFile | String containig output file
  do_commit | if true commit the output and flush eventually pending items to the database if false, discard pending buffers. Note: The possibility to commit or rollback depends on the database technology used!

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::connect | ( | const std::string & | dbName,
|  | const std::string & | cntName,
|  | pool::DbContainer & | cntH
| ) |  | `[pure virtual]`

Connect to a database container in read mode.

Parameters:

  dbName | String containing name of the database
  cntName | String containing the name of the container object
  cntH | Reference to the POOL container object

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::connectContainer | ( | int | typ,
|  | const std::string & | dbName,
|  | const std::string & | cntName,
|  | pool::DbAccessMode | openMode,
|  | const pool::DbTypeInfo * | shape,
|  | pool::DbContainer & | cntH
| ) |  | `[pure virtual]`

Connect to a database container.

Parameters:

  typ | Database technology type
  dbName | String containing name of the database
  cntName | String containing the name of the container object
  openMode | Open mode (READ,WRITE,UPDATE,...)
  shape | Default shape of objects in the container
  cntH | Reference to the POOL container object

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::connectOutput | ( | const std::string & | outputFile,
|  | const std::string & | openMode
| ) |  | `[pure virtual]`

Connect the output file to the service with open mode.

Parameters:

  outputFile | String containig output file
  openMode | String containig opening mode of the output file

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::createAddress | ( | long | svc_type,
|  | const CLID & | clid,
|  | const std::string * | par,
|  | const unsigned long * | ipar,
|  | IOpaqueAddress *& | refpAddress
| ) |  | `[pure virtual]`

Create a Generic address using explicit arguments to identify a single object.

Parameters:

  svc_type | Technology identifier encapsulated in this address.
  clid | Class identifier of the DataObject represented by the opaque address
  par | Array of strings needed to construct the opaque address.
  ipar | Array of integers needed to construct the opaque address.
  refpAddress | Reference to pointer to the address where the created Address should be stored.

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::createAddress | ( | pool::Token * | pToken,
|  | PoolDbAddress ** | ppAddress
| ) |  | `[pure virtual]`

Create a Generic address using explicit arguments to identify a single object.

Parameters:

  pToken | Pointer to valid POOL token object
  ppAddress | Reference to pointer to the address where the created Address should be stored.

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual pool::DbSelect* IPoolDbMgr::createSelect | ( | const std::string & | criteria,
|  | const std::string & | dbName,
|  | const std::string & | cntName
| ) |  | `[pure virtual]`

Request an iterator over a container from the service.

Parameters:

  criteria | Selection criteria to restrict iteration
  dbName | String containing name of the database
  cntName | String containing the name of the container object

Returns:
  Reference to the iterator object

Implemented in PoolDbCnvSvc.

IPoolDbMgr::DeclareInterfaceID | ( | IPoolDbMgr | ,
|  | 2 | ,
|  | 0 |
| ) |  |

InterfaceID.

virtual StatusCode IPoolDbMgr::disconnect | ( | const std::string & | dbName ) | `[pure virtual]`

Disconnect from an existing data stream.

Parameters:

  dbName | String containing name of the database

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::markUpdate | ( | pool::DataCallBack * | call,
|  | PoolDbAddress * | pAddr
| ) |  | `[pure virtual]`

Mark an object for update.

Parameters:

  call | Pointer to callback object
  pAddr | Persistent object location to be used for link setup.

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::markWrite | ( | pool::DataCallBack * | call,
|  | const std::string & | cntName,
|  | PoolDbAddress ** | ppAddr = `0`
| ) |  | `[pure virtual]`

Marks a reference to be written.

Parameters:

  call | Pointer to callback object
  cntName | Container name the object should be written to.
  refpAddr | Persistent object location to be used for link setup.

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::read | ( | pool::DataCallBack * | call,
|  | PoolDbAddress * | pAddr
| ) |  | `[pure virtual]`

Read existing object.

Open transaction in read mode if not active.

Parameters:

  call | Pointer to callback object
  pAddr | Pointer to valid object address.

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

virtual StatusCode IPoolDbMgr::read | ( | pool::DataCallBack * | call,
|  | pool::Token & | tok
| ) |  | `[pure virtual]`

Read existing object. Open transaction in read mode if not active.

Parameters:

  call | Pointer to callback object
  tok | Reference to pool token describing the object

Returns:
  Status code indicating success or failure.

Implemented in PoolDbCnvSvc.

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/GaudiPoolDb/GaudiPoolDb/IPoolDbMgr.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines