| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

Classes | Public Types | Public Member Functions | Protected Attributes

# PoolDbCnvSvc Class Reference

Description: More...

`#include <PoolDb/PoolDbCnvSvc.h>`

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

List of all members.

## Classes
struct | DbH
## Public Types
typedef std::pair< void *, const ROOT::Reflex::Type > | ObjH
typedef std::map< std::string, DbH > | DbMap
typedef std::map< std::string, std::string > | DbFidMap
## Public Member Functions
| PoolDbCnvSvc (const std::string &name, ISvcLocator *svc)
| Standard constructor.
virtual | ~PoolDbCnvSvc ()
| Standard destructor.
virtual StatusCode | updateServiceState (IOpaqueAddress *pAddress)
| Update state of the service.
StatusCode | error (const std::string &msg, bool rethrow=true)
| Standard way to print errors.
StatusCode | setDataProvider (IDataProviderSvc *pDataSvc)
| Connect to data provider service.
virtual StatusCode | initialize ()
| ConversionSvc overload: initialize Db service.
virtual StatusCode | finalize ()
| ConversionSvc overload: Finalize Db service.
virtual IConverter * | createConverter (long typ, const CLID &wanted, const ICnvFactory *fac)
| ConversionSvc overload: Create new Converter using factory.
virtual void | loadConverter (DataObject *)
| ConversionSvc overload: Load the class (dictionary) for the converter.
virtual IPoolCacheSvc * | cacheSvc () const
| Access to cache service.
virtual StatusCode | accessStorageType (const std::string &type_string, long &gaudi_type)
| Create access to the POOL persistency mechanism using the Gaudi String identifier.
virtual StatusCode | connectOutput (const std::string &outputFile, const std::string &openMode)
| Connect the output file to the service with open mode.
StatusCode | connectDatabase (int typ, const std::string &outputFile, pool::DbAccessMode openMode, PoolDbDataConnection **con)
| Connect the output file to the service with open mode.
StatusCode | connectContainer (pool::DbDatabase &dbH, const std::string &cntName, pool::DbAccessMode openMode, const pool::DbTypeInfo *shape, pool::DbContainer &cntH)
| Connect to a database container.
virtual StatusCode | connectContainer (int typ, const std::string &dbName, const std::string &cntName, pool::DbAccessMode openMode, const pool::DbTypeInfo *shape, pool::DbContainer &cntH)
| Connect to a database container.
virtual StatusCode | connectOutput (const std::string &outputFile)
| Connect the output file to the service.
virtual StatusCode | commitOutput (const std::string &outputFile, bool do_commit)
| Commit pending output.
virtual StatusCode | connect (const std::string &dbName, const std::string &cntName, pool::DbContainer &cntH)
| Connect to a database container in read mode.
virtual StatusCode | disconnect (const std::string &dbName)
| Disconnect from an existing data stream.
virtual StatusCode | createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
| IAddressCreator implementation: Address creation.
virtual StatusCode | createAddress (pool::Token *pToken, PoolDbAddress **ppAddress)
| IPoolDbMgr implementation: Address creation.
virtual pool::DbSelect * | createSelect (const std::string &criteria, const std::string &dbName, const std::string &cntName)
| Request an iterator over a container from the service.
virtual pool::DbSelect * | createSelect (const std::string &criteria, pool::DbDatabase &dbH, const std::string &cntName)
| Request an iterator over a container from the service.
virtual StatusCode | markWrite (pool::DataCallBack *call, const std::string &cntName, PoolDbAddress **ppAddr=0)
| Marks a reference to be written.
virtual StatusCode | markUpdate (pool::DataCallBack *call, PoolDbAddress *pAddr)
| Mark an object for update.
virtual StatusCode | read (pool::DataCallBack *call, PoolDbAddress *pAddr)
| Read existing object.
virtual StatusCode | read (pool::DataCallBack *call, pool::Token &tok)
| Read existing object. Open transaction in read mode if not active.
## Protected Attributes
std::string | m_cacheSvcName
| Name of the POOL cache service instance to connect to.
std::string | m_implementation
| Name of the OODataBase implementation.
std::string | m_serverConnect
| Connection string to server.
std::string | m_recordName
| ROOT name of optional records triggering incident.
bool | m_safeTransactions
| Flag to indicate safe transactions if requested.
std::vector< std::string > | m_domainOpts
| Buffer for domain options.
std::vector< std::string > | m_databaseOpts
| Buffer for database options.
std::vector< std::string > | m_containerOpts
| Buffer for container options.
IDataManagerSvc * | m_dataMgr
| Services needed for proper operation: Data Manager.
IPoolCacheSvc * | m_cacheSvc
| Reference to POOL cache service.
PoolDbDataConnection * | m_current
| On writing: reference to active output stream.
pool::DbDefaultDataHandler | m_handler
| POOL Datahandler.
pool::DbDomain | m_domH
| POOL technology domain handle.
std::string | m_shareFiles
| Share files ? If set to YES, files will not be closed on finalize.
bool | m_checkFIDs
| Flag to enforce FID checking and verification.
Gaudi::IFileCatalog * | m_catalog
| Reference to the file catalog.
Gaudi::IIODataManager * | m_ioMgr
| Reference to the I/O data manager.
IIncidentSvc * | m_incidentSvc
| Reference to incident service.
bool | m_incidentEnabled
| Flag to enable incidents on FILE_OPEN.

## Detailed Description

Description:

PoolDbCnvSvc class implementation definition.

Author:
  Markus Frank

Version:
  1.0

Definition at line 46 of file PoolDbCnvSvc.h.

## Member Typedef Documentation

typedef std::map<std::string, std::string> PoolDbCnvSvc::DbFidMap

Definition at line 62 of file PoolDbCnvSvc.h.

typedef std::map<std::string, DbH> PoolDbCnvSvc::DbMap

Definition at line 61 of file PoolDbCnvSvc.h.

typedef std::pair< void*, const ROOT::Reflex::Type > PoolDbCnvSvc::ObjH

Definition at line 60 of file PoolDbCnvSvc.h.

## Constructor & Destructor Documentation

PoolDbCnvSvc::PoolDbCnvSvc | ( | const std::string & | name,
|  | ISvcLocator * | svc
| ) |  |

Standard constructor.

PoolDbCnvSvc::~PoolDbCnvSvc | ( | ) | `[virtual]`

Standard destructor.

Definition at line 117 of file PoolDbCnvSvc.cpp.

                                  {
      s_count->decrement();
    }

## Member Function Documentation

virtual StatusCode PoolDbCnvSvc::accessStorageType | ( | const std::string & | type_string,
|  | long & | gaudi_type
| ) |  | `[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.

Implements IPoolDbMgr.

virtual IPoolCacheSvc* PoolDbCnvSvc::cacheSvc | ( | ) | const`[inline, virtual]`

Access to cache service.

Implements IPoolDbMgr.

Definition at line 162 of file PoolDbCnvSvc.h.

    {  return m_cacheSvc; }

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

Commit pending output.

Parameters:

  outputFile | String containing 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.

Reimplemented from ConversionSvc.

virtual StatusCode PoolDbCnvSvc::connect | ( | const std::string & | dbName,
|  | const std::string & | cntName,
|  | pool::DbContainer & | cntH
| ) |  | `[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.

Implements IPoolDbMgr.

virtual StatusCode PoolDbCnvSvc::connectContainer | ( | int | typ,
|  | const std::string & | dbName,
|  | const std::string & | cntName,
|  | pool::DbAccessMode | openMode,
|  | const pool::DbTypeInfo * | shape,
|  | pool::DbContainer & | cntH
| ) |  | `[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.

Implements IPoolDbMgr.

StatusCode PoolDbCnvSvc::connectContainer | ( | pool::DbDatabase & | dbH,
|  | const std::string & | cntName,
|  | pool::DbAccessMode | openMode,
|  | const pool::DbTypeInfo * | shape,
|  | pool::DbContainer & | cntH
| ) |  |

Connect to a database container.

Parameters:

  dbH | Handle to hosting 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.

StatusCode PoolDbCnvSvc::connectDatabase | ( | int | typ,
|  | const std::string & | outputFile,
|  | pool::DbAccessMode | openMode,
|  | PoolDbDataConnection ** | con
| ) |  |

Connect the output file to the service with open mode.

Parameters:

  outputFile | String containing output file
  openMode | Opening mode of the output file
  con | Data connection reference

Returns:
  Status code indicating success or failure.

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

Connect the output file to the service with open mode.

Parameters:

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

Returns:
  Status code indicating success or failure.

Reimplemented from ConversionSvc.

virtual StatusCode PoolDbCnvSvc::connectOutput | ( | const std::string & | outputFile ) | `[virtual]`

Connect the output file to the service.

Parameters:

  outputFile | String containing output file

Returns:
  Status code indicating success or failure.

Reimplemented from ConversionSvc.

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

IAddressCreator implementation: Address creation.

Create an address using the link information together with the triple (database name/container name/object name).

Parameters:

  refLink | Reference to abstract link information
  dbName | Database name
  containerName | Object container name
  refpAddress | Opaque address information to retrieve object

Returns:
  StatusCode indicating SUCCESS or failure

Reimplemented from ConversionSvc.

Definition at line 533 of file PoolDbCnvSvc.cpp.

    {
      PoolDbAddress* pA = 0;
      pool::Guid guid = pool::Guid::null();
      std::auto_ptr<pool::Token> tok(new pool::Token());
      guid.Data1 = clid;
      tok->setDb(par[0]);
      tok->setCont(par[1]);
      tok->setTechnology(typ);
      tok->setClassID(guid);
      tok->oid().first = ip[0];
      tok->oid().second = ip[1];
      if ( createAddress(tok.get(), &pA).isSuccess() )  {
        refpAddress = pA;
        tok->release();
        tok.release();
        return S_OK;
      }
      return error("createAddress> Failed to create opaque address.");
    }

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

IPoolDbMgr implementation: Address creation.

Create an address using an existing POOL token object.

Parameters:

  pToken | Reference to valid POOL token object.
  ppAddress | Opaque address information to retrieve object

Returns:
  StatusCode indicating SUCCESS or failure

Implements IPoolDbMgr.

Definition at line 559 of file PoolDbCnvSvc.cpp.

                                                                                {
      if ( pTok )  {
        *ppAdd = new PoolDbAddress(pTok);
        return S_OK;
      }
      return error("createAddress> Failed to create opaque address from POOL token.");
    }

IConverter * PoolDbCnvSvc::createConverter | ( | long | typ,
|  | const CLID & | wanted,
|  | const ICnvFactory * | fac
| ) |  | `[virtual]`

ConversionSvc overload: Create new Converter using factory.

Create new Converter using factory.

Reimplemented from ConversionSvc.

Definition at line 214 of file PoolDbCnvSvc.cpp.

    {
      IConverter* pConverter;
      ConverterID cnvid(POOL_StorageType, wanted);
      pConverter = PluginService::CreateWithId<IConverter*>(cnvid, typ, wanted, serviceLocator().get());
      if ( 0 == pConverter )  {
        const CLID gen_clids[] = {
        /* ObjectList               */ CLID_Any + CLID_ObjectList,
        /* ObjectVector             */ CLID_Any + CLID_ObjectVector,
        /* Keyed Map                */ CLID_Any + CLID_ObjectVector+0x00030000,
        /* Keyed Hashmap            */ CLID_Any + CLID_ObjectVector+0x00040000,
        /* Keyed redirection array  */ CLID_Any + CLID_ObjectVector+0x00050000,
        /* Standard, non-container  */ CLID_Any
        };
        for ( unsigned int i = 0; i < sizeof(gen_clids)/sizeof(gen_clids[0]); i++ ) {
          if ( (wanted>>16) == (gen_clids[i]>>16) )  {
            ConverterID cnvid1(POOL_StorageType, gen_clids[i]);
            pConverter = PluginService::CreateWithId<IConverter*>(cnvid1, typ, wanted, serviceLocator().get());
            if ( 0 != pConverter ) {
              return pConverter;
            }
          }
        }
        // Check if a converter using object update is needed
        if ( (wanted>>24) != 0 )  {
          ConverterID cnvid1(POOL_StorageType, CLID_Any | 1<<31);
          pConverter = PluginService::CreateWithId<IConverter*>(cnvid1, typ, wanted, serviceLocator().get());
          if ( 0 != pConverter ) {
            return pConverter;
          }
        }
        // If we do not have found any suitable container after searching
        // for standard containers, we will use the "ANY" converter
        // ... and pray for everything will go well.
        ConverterID cnvid1(POOL_StorageType, CLID_Any);
        pConverter = PluginService::CreateWithId<IConverter*>(cnvid1, typ, wanted, serviceLocator().get());
        if ( 0 != pConverter ) {
          MsgStream log(msgSvc(), name());
          log << MSG::INFO << "Using \"Any\" converter "
              << "for objects of type "
              << std::showbase << std::hex << wanted << endmsg;
        }
      }
      return pConverter;
    }

virtual pool::DbSelect* PoolDbCnvSvc::createSelect | ( | const std::string & | criteria,
|  | const std::string & | dbName,
|  | const std::string & | cntName
| ) |  | `[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 selection object

Implements IPoolDbMgr.

virtual pool::DbSelect* PoolDbCnvSvc::createSelect | ( | const std::string & | criteria,
|  | pool::DbDatabase & | dbH,
|  | const std::string & | cntName
| ) |  | `[virtual]`

Request an iterator over a container from the service.

Parameters:

  criteria | Selection criteria to restrict iteration
  dbH | Handle to POOL database
  cntName | String containing the name of the container object

Returns:
  Reference to the selection object

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

Disconnect from an existing data stream.

Parameters:

  dbName | String containing name of the database

Returns:
  Status code indicating success or failure.

Implements IPoolDbMgr.

StatusCode PoolDbCnvSvc::error | ( | const std::string & | msg,
|  | bool | rethrow = `true`
| ) |  |

Standard way to print errors.

after the printout an exception is thrown.

Parameters:

  msg | [IN] Message string to be printed.
  rethrow | [IN] Flag to indicate if an exception should be thrown

Returns:
  Status code returning failure.

StatusCode PoolDbCnvSvc::finalize | ( | void | ) | `[virtual]`

ConversionSvc overload: Finalize Db service.

Finalize the Db data persistency service.

Reimplemented from ConversionSvc.

Definition at line 173 of file PoolDbCnvSvc.cpp.

                                         {
      MsgStream log(msgSvc(),name());
      DbOptionCallback cb(m_cacheSvc->callbackHandler());
      if ( m_ioMgr )  {
        if ( ::toupper(m_shareFiles[0]) != 'Y' )  {
          IIODataManager::Connections cons = m_ioMgr->connections(this);
          for(IIODataManager::Connections::iterator i=cons.begin(); i != cons.end(); ++i)  {
            if ( m_ioMgr->disconnect(*i).isSuccess() )  {
              log << MSG::INFO << "Disconnected data IO:" << (*i)->fid();
              log << "[" << (*i)->pfn() << "]";
              log << endmsg;
              delete (*i);
            }
          }
        }
        else  {
          log << MSG::INFO << "File sharing enabled. Do not retire files." << endmsg;
        }
        m_ioMgr->release();
        m_ioMgr = 0;
      }
      m_domH.close();
      m_domH = 0;
      if ( m_dataMgr ) m_dataMgr->clearStore().ignore();
      pool::releasePtr(m_incidentSvc);
      pool::releasePtr(m_dataMgr);
      pool::releasePtr(m_catalog);
      pool::releasePtr(m_cacheSvc);
      StatusCode status = ConversionSvc::finalize();
      log << MSG::DEBUG << "POOL conversion service finalized " << name() << " ";
      log << (const char*)(status.isSuccess() ? "successfully" : "with errors") << endmsg;
      return status;
    }

StatusCode PoolDbCnvSvc::initialize | ( | void | ) | `[virtual]`

ConversionSvc overload: initialize Db service.

Initialize the Db data persistency service.

Reimplemented from ConversionSvc.

Definition at line 122 of file PoolDbCnvSvc.cpp.

                                         {
      StatusCode status = ConversionSvc::initialize();
      MsgStream log(msgSvc(), name());
      if ( !status.isSuccess() ) {
        log << MSG::ERROR << "Failed to initialize ConversionSvc base class."
            << endmsg;
        return status;
      }
      status = accessStorageType(m_implementation, m_type);
      if ( !status.isSuccess() )  {
        log << MSG::ERROR << "Failed to connect to POOL implementation:"
            << m_implementation << endmsg;
        return status;
      }
      status = service(m_cacheSvcName, m_cacheSvc);
      if ( !status.isSuccess() )  {
        log << MSG::ERROR << "Failed to connect to POOL cache service:"
            << m_cacheSvcName << endmsg;
        return status;
      }
      status = service("IODataManager", m_ioMgr);
      if( !status.isSuccess() ) {
        log << MSG::ERROR
            << "Unable to localize interface from service:IODataManager" << endmsg;
        return status;
      }
      status = service("FileCatalog", m_catalog);
      if( !status.isSuccess() ) {
        log << MSG::ERROR
            << "Unable to localize interface from service:FileCatalog" << endmsg;
        return status;
      }
      status = service("IncidentSvc", m_incidentSvc);
      if( !status.isSuccess() ) {
        log << MSG::ERROR
            << "Unable to localize interface from service:IncidentSvc" << endmsg;
        return status;
      }
      DbOptionCallback cb(m_cacheSvc->callbackHandler());
      if ( m_domH.open(m_cacheSvc->session(),m_type,pool::UPDATE).isSuccess() )  {
        SmartIF<IProperty> prp(m_ioMgr);
        IntegerProperty ageLimit;
        ageLimit.assign(prp->getProperty("AgeLimit"));
        log << MSG::DEBUG << "POOL agelimit is set to " << ageLimit.value() << endmsg;
        m_domH.setAgeLimit(ageLimit.value());
        return S_OK;
      }
      return S_OK;
    }

void PoolDbCnvSvc::loadConverter | ( | DataObject * | pObject ) | `[virtual]`

ConversionSvc overload: Load the class (dictionary) for the converter.

Reimplemented from ConversionSvc.

Definition at line 260 of file PoolDbCnvSvc.cpp.

                                                        {
      if (pObject) {
        MsgStream log(msgSvc(), name());
        std::string cname = System::typeinfoName(typeid(*pObject));
        log << MSG::DEBUG << "Trying to 'Autoload' dictionary for class " << cname << endmsg;
        gInterpreter->EnableAutoLoading();
        gInterpreter->AutoLoad(cname.c_str());
      }
    }

StatusCode PoolDbCnvSvc::markUpdate | ( | pool::DataCallBack * | call,
|  | PoolDbAddress * | pAddr
| ) |  | `[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.

Implements IPoolDbMgr.

Definition at line 614 of file PoolDbCnvSvc.cpp.

                                                                                  {
      if ( pA && call )  {
        pool::Token* tok = pA->token();
        DbContainer cntH(POOL_StorageType);
        const DbTypeInfo* info = (const DbTypeInfo*)call->shape();
        StatusCode sc = connectContainer(FID,tok->dbID(),tok->contID(),pool::UPDATE,info,cntH);
        if ( sc.isSuccess() )  {
          call->setHandler(&m_handler);
          if ( cntH.update(call, tok->oid()).isSuccess() )  {
            return S_OK;
          }
          return error("markUpdate> Failed to update object:"+tok->toString());
        }
        MsgStream log(msgSvc(), name());
        log << MSG::ERROR << "markUpdate> The container "
            << tok->dbID() << "::" << tok->contID()
            << " cannot be accessed." << endmsg
            << "Was this object really read from the container "
            << "the object token claims?"
            << endmsg;
        return S_FAIL;
      }
      return error("createRep> Invalid object address for update.");
    }

virtual StatusCode PoolDbCnvSvc::markWrite | ( | pool::DataCallBack * | call,
|  | const std::string & | cntName,
|  | PoolDbAddress ** | ppAddr = `0`
| ) |  | `[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.

Implements IPoolDbMgr.

StatusCode PoolDbCnvSvc::read | ( | pool::DataCallBack * | call,
|  | pool::Token & | tok
| ) |  | `[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.

Implements IPoolDbMgr.

Definition at line 650 of file PoolDbCnvSvc.cpp.

                                                                         {
      try  {
        DbContainer cntH(tok.technology());
        const DbTypeInfo* info = (const DbTypeInfo*)call->shape();
        StatusCode sc = connectContainer(FID,tok.dbID(),tok.contID(),pool::READ,info,cntH);
        if ( sc.isSuccess() )  {
          typedef pool::DbObjectHandle<pool::DbObject> ObjH;
          call->setHandler(&m_handler);
          return ObjH::openEx(cntH, tok, call, pool::READ).isSuccess() ? S_OK : S_FAIL;
        }
        else if ( sc == BAD_DATA_CONNECTION )  {
          return sc;
        }
      }
      catch (std::exception& e)  {
        std::string err="read> Cannot read object:"+tok.toString()+" ";
        return error(err+e.what(), false);
      }
      catch (...)   {
        std::string err = "read> Cannot read object:"+tok.toString();
        return error(err+" [Unknown fatal exception]", false);
      }
      return error("read> Cannot read object:"+tok.toString(), false);
    }

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

Read existing object.

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

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.

Implements IPoolDbMgr.

Definition at line 640 of file PoolDbCnvSvc.cpp.

                                                                            {
      StatusCode sc = read(call, *pA->token());
      if ( sc.isSuccess() || sc == BAD_DATA_CONNECTION )  {
        return sc;
      }
      std::string err="read> Cannot read object:"+pA->registry()->identifier()+" ";
      return error(err, false);
    }

StatusCode PoolDbCnvSvc::setDataProvider | ( | IDataProviderSvc * | pDataSvc ) | `[virtual]`

Connect to data provider service.

Re-connects to data manager service.

Parameters:

  pDataSvc | New data provider object.

Returns:
  Status code indicating success or failure.

Reimplemented from ConversionSvc.

Definition at line 270 of file PoolDbCnvSvc.cpp.

                                                                        {
      IDataManagerSvc* tmp = m_dataMgr;
      if (pDataSvc)  {
        StatusCode status =
          pDataSvc->queryInterface(IDataManagerSvc::interfaceID(), pp_cast<void>(&m_dataMgr));
        if ( !status.isSuccess() )    {
          return error("Cannot connect to \"IDataManagerSvc\" interface.");
        }
      }
      if ( tmp ) tmp->release();
      return ConversionSvc::setDataProvider(pDataSvc);
    }

StatusCode PoolDbCnvSvc::updateServiceState | ( | IOpaqueAddress * | pAddress ) | `[virtual]`

Update state of the service.

Reimplemented from ConversionSvc.

Definition at line 208 of file PoolDbCnvSvc.cpp.

                                                                            {
      return S_OK;
    }

## Member Data Documentation

IPoolCacheSvc* PoolDbCnvSvc::m_cacheSvc`[protected]`

Reference to POOL cache service.

Definition at line 93 of file PoolDbCnvSvc.h.

std::string PoolDbCnvSvc::m_cacheSvcName`[protected]`

Name of the POOL cache service instance to connect to.

Definition at line 66 of file PoolDbCnvSvc.h.

Gaudi::IFileCatalog* PoolDbCnvSvc::m_catalog`[protected]`

Reference to the file catalog.

Definition at line 111 of file PoolDbCnvSvc.h.

bool PoolDbCnvSvc::m_checkFIDs`[protected]`

Flag to enforce FID checking and verification.

Definition at line 108 of file PoolDbCnvSvc.h.

std::vector<std::string> PoolDbCnvSvc::m_containerOpts`[protected]`

Buffer for container options.

Definition at line 87 of file PoolDbCnvSvc.h.

PoolDbDataConnection* PoolDbCnvSvc::m_current`[protected]`

On writing: reference to active output stream.

Definition at line 96 of file PoolDbCnvSvc.h.

std::vector<std::string> PoolDbCnvSvc::m_databaseOpts`[protected]`

Buffer for database options.

Definition at line 84 of file PoolDbCnvSvc.h.

IDataManagerSvc* PoolDbCnvSvc::m_dataMgr`[protected]`

Services needed for proper operation: Data Manager.

Definition at line 90 of file PoolDbCnvSvc.h.

std::vector<std::string> PoolDbCnvSvc::m_domainOpts`[protected]`

Buffer for domain options.

Definition at line 81 of file PoolDbCnvSvc.h.

pool::DbDomain PoolDbCnvSvc::m_domH`[protected]`

POOL technology domain handle.

Definition at line 102 of file PoolDbCnvSvc.h.

pool::DbDefaultDataHandler PoolDbCnvSvc::m_handler`[protected]`

POOL Datahandler.

Definition at line 99 of file PoolDbCnvSvc.h.

std::string PoolDbCnvSvc::m_implementation`[protected]`

Name of the OODataBase implementation.

Definition at line 69 of file PoolDbCnvSvc.h.

bool PoolDbCnvSvc::m_incidentEnabled`[protected]`

Flag to enable incidents on FILE_OPEN.

Definition at line 120 of file PoolDbCnvSvc.h.

IIncidentSvc* PoolDbCnvSvc::m_incidentSvc`[protected]`

Reference to incident service.

Definition at line 117 of file PoolDbCnvSvc.h.

Gaudi::IIODataManager* PoolDbCnvSvc::m_ioMgr`[protected]`

Reference to the I/O data manager.

Definition at line 114 of file PoolDbCnvSvc.h.

std::string PoolDbCnvSvc::m_recordName`[protected]`

ROOT name of optional records triggering incident.

Definition at line 75 of file PoolDbCnvSvc.h.

bool PoolDbCnvSvc::m_safeTransactions`[protected]`

Flag to indicate safe transactions if requested.

Definition at line 78 of file PoolDbCnvSvc.h.

std::string PoolDbCnvSvc::m_serverConnect`[protected]`

Connection string to server.

Definition at line 72 of file PoolDbCnvSvc.h.

std::string PoolDbCnvSvc::m_shareFiles`[protected]`

Share files ? If set to YES, files will not be closed on finalize.

Definition at line 105 of file PoolDbCnvSvc.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/GaudiPoolDb/GaudiPoolDb/PoolDbCnvSvc.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/GaudiPoolDb/src/PoolDbCnvSvc.cpp

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