| # Gaudi Framework, version v21r9 |

Home |  | Generated: 3 May 2010

# PoolDbBaseCnv Class Reference

Description: Definition of the generic Db data converter. More...

`#include <PoolDb/PoolDbBaseCnv.h>`

Inheritance diagram for PoolDbBaseCnv:

[legend]
Collaboration diagram for PoolDbBaseCnv:

[legend]

List of all members.

## Public Member Functions
| PoolDbBaseCnv (long typ, const CLID &clid, ISvcLocator *svc)
| Initializing Constructor.
virtual | ~PoolDbBaseCnv ()
| Standard Destructor.
virtual StatusCode | initialize ()
| Converter overrides: Initialize the Db converter.
virtual StatusCode | finalize ()
| Converter overrides: Finalize the Db data converter.
virtual long | repSvcType () const
| Retrieve the class type of the data store the converter uses.
virtual StatusCode | createObj (IOpaqueAddress *pAddr, DataObject *&refpObj)
| Converter overrides: Create transient object from persistent data.
virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddr, DataObject *pObj)
| Converter overrides: Resolve the references of the created transient object.
virtual StatusCode | updateObj (IOpaqueAddress *pAddr, DataObject *pObj)
| Converter overrides: Update transient object from persistent data.
virtual StatusCode | updateObjRefs (IOpaqueAddress *pAddr, DataObject *pObj)
| Converter overrides: Update the references of an updated transient object.
virtual StatusCode | createRep (DataObject *pObj, IOpaqueAddress *&refpAddr)
| Converter overrides: Convert the transient object to the requested representation.
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddr, DataObject *pObj)
| Converter overrides: Resolve the references of the converted object.
virtual StatusCode | updateRep (IOpaqueAddress *pAddr, DataObject *pObj)
| Converter overrides: Update the converted representation of a transient object.
virtual StatusCode | updateRepRefs (IOpaqueAddress *pAddr, DataObject *pObj)
| Converter overrides: Update the references of an already converted object.
virtual PoolDbLinkManager * | createReferences (DataObject *pObj)
virtual StatusCode | setReferences (PoolDbLinkManager *pMgr, LinkManager *pLinks, DataObject *pObj, IRegistry *pReg)
| Set the references of a DataObject when reading.
virtual StatusCode | dumpReferences (PoolDbLinkManager *pMgr, LinkManager *pLinks, DataObject *pObj, IRegistry *pReg)
| Dump the references of a DataObject after writing.
## Protected Member Functions
StatusCode | makeError (const std::string &msg, bool rethrow=true)
| Standard way to print errors.
virtual const std::string | containerName (IRegistry *pReg) const
| Retrieve the name of the container a given object is placed into.
## Protected Attributes
IPoolDbMgr * | m_dbMgr
| Services needed for proper operation: POOL database manager.
IDataManagerSvc * | m_dataMgr
| Services needed for proper operation: Gaudi datastore manager.
pool::Guid | m_objGuid
| Object Guid.
ROOT::Reflex::Type | m_class
| Reference to seal reflection class.
pool::DataCallBack * | m_call
| Definition callback.
std::set< std::string > | m_badFiles
| Set with bad files/tables.

## Detailed Description

Description: Definition of the generic Db data converter.

The generic data converter provides the infrastructure of all data converters. The templated class takes two arguments: The Transient and the Persistent object type.

For a detailed description of the overridden function see the the base class.

Author:
  M.Frank

Version:
  1.0

Definition at line 45 of file PoolDbBaseCnv.h.

## Constructor & Destructor Documentation

PoolDbBaseCnv::PoolDbBaseCnv | ( | long | typ,
|  | const CLID & | clid,
|  | ISvcLocator * | svc |
| ) |  |  |

Initializing Constructor.

Standard Constructor.

Parameters:

  | typ | [IN] Concrete storage type of the converter
  | clid | [IN] Class identifier of the object
  | svc | [IN] Pointer to service locator object

Returns:
  Reference to PoolDbBaseCnv object

Definition at line 238 of file PoolDbBaseCnv.cpp.

    00239 : Converter(typ, clid, svc), m_objGuid(pool::Guid::null()), m_call(0)
    00240 {
    00241   s_count->increment();
    00242   m_dbMgr = 0;
    00243   m_objGuid.Data1 = clid;
    00244 }

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

Standard Destructor.

Definition at line 247 of file PoolDbBaseCnv.cpp.

    00247                                {
    00248   pool::releasePtr(m_dbMgr);
    00249   s_count->decrement();
    00250 }

## Member Function Documentation

StatusCode PoolDbBaseCnv::makeError | ( | const std::string & | msg,
|  | bool | rethrow = `true` |
| ) |  |  | `[protected]`

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 must be thrown

Returns:
  Status code returning failure.

Definition at line 337 of file PoolDbBaseCnv.cpp.

    00338 {
    00339   MsgStream log(msgSvc(),"PoolDbBaseCnv");
    00340   log << MSG::ERROR << "Trouble with class:" << m_objGuid.toString() << " ";
    00341   if ( m_class ) log << "<" << m_class.Name(ROOT::Reflex::SCOPED) << "> ";
    00342   log << endmsg;
    00343   log << msg << endmsg;
    00344   if ( rethrow )  {
    00345     pool::debugBreak("Error:"+msg, "PoolDbBaseCnv", true);
    00346   }
    00347   return StatusCode::FAILURE;
    00348 }

const std::string PoolDbBaseCnv::containerName | ( | IRegistry * | pReg | ) | const`[protected, virtual]`

Retrieve the name of the container a given object is placed into.

Parameters:

  | pReg | [IN] Pointer to registry entry.

Returns:
  Name of the container the object should be put to.

Reimplemented in PoolDbDatabaseCnv, and PoolDbStatCnv.

Definition at line 330 of file PoolDbBaseCnv.cpp.

    00330                                                         {
    00331   if ( 0 != pRegistry )   {
    00332     return pRegistry->identifier();
    00333   }
    00334   return "";
    00335 }

StatusCode PoolDbBaseCnv::initialize | ( |  | ) | `[virtual]`

Converter overrides: Initialize the Db converter.

Initialize the converter.

Reimplemented from Converter.

Definition at line 253 of file PoolDbBaseCnv.cpp.

    00253                                        {
    00254   StatusCode status = Converter::initialize();
    00255   MsgStream log(msgSvc(),"PoolDbBaseCnv");
    00256   if ( !status.isSuccess() )   {
    00257     log << MSG::ERROR << "Cannot initialize base class \"Converter\"" << endmsg;
    00258     return status;
    00259   }
    00260   IPoolDbMgr **ptr1 = &m_dbMgr;
    00261   status = conversionSvc()->queryInterface(IPoolDbMgr::interfaceID(), (void**)ptr1);
    00262   if ( !status.isSuccess() )    {
    00263     log << MSG::ERROR << "Cannot connect to \"IPoolDbMgr\" interface." << endmsg;
    00264     return status;
    00265   }
    00266   IDataManagerSvc **ptr2 = &m_dataMgr;
    00267   status = dataProvider()->queryInterface(IDataManagerSvc::interfaceID(), (void**)ptr2);
    00268   if ( !status.isSuccess() )    {
    00269     log << MSG::ERROR << "Cannot connect to \"IDataManagerSvc\" interface." << endmsg;
    00270     return status;
    00271   }
    00272   const pool::DbTypeInfo* shapeH = 0;
    00273   const ROOT::Reflex::Type refH = ROOT::Reflex::Type::ByName("PoolDbLinkManager");
    00274   if ( !refH )  {
    00275     log << MSG::ERROR << "Dictionary for class \"PoolDbLinkManager\" missing." << endmsg;
    00276     return StatusCode::FAILURE;
    00277   }
    00278   const ROOT::Reflex::Type lnkH = ROOT::Reflex::Type::ByName("LinkManager");
    00279   if ( !lnkH )  {
    00280     log << MSG::ERROR << "Dictionary for class \"LinkManager\" missing." << endmsg;
    00281     return StatusCode::FAILURE;
    00282   }
    00283   m_class = pool::DbReflex::forGuid(m_objGuid);
    00284   if ( !m_class )  {
    00285     // This may fail if the dictionary is not yet loaded, therefore it is not going to report an ERROR
    00286     log << MSG::DEBUG << "Dictionary for class with GUID:" << m_objGuid.toString()
    00287         << " missing." << endmsg;
    00288     return StatusCode::FAILURE;
    00289   }
    00290   if ( !pool::DbTransform::getShape(m_objGuid, shapeH).isSuccess() )  {
    00291     std::vector<const pool::DbColumn*> c;
    00292     c.push_back(new pool::DbColumn(m_class.Name(),
    00293                 m_class.Name(ROOT::Reflex::SCOPED),
    00294                 pool::DbColumn::POINTER,
    00295                 0));
    00296     c.push_back(new pool::DbColumn("Links",
    00297                 lnkH.Name(ROOT::Reflex::SCOPED),
    00298                 pool::DbColumn::POINTER,
    00299                 0));
    00300     c.push_back(new pool::DbColumn("Refs",
    00301                 refH.Name(ROOT::Reflex::SCOPED),
    00302                 pool::DbColumn::POINTER,
    00303                 0));
    00304     shapeH = pool::DbTypeInfo::create(m_objGuid, c);
    00305   }
    00306   if ( shapeH ) {
    00307     log << MSG::DEBUG << "Created object shape for class:"
    00308         << m_class.Name(ROOT::Reflex::SCOPED) << endmsg
    00309         << shapeH->toString() << endmsg;
    00310     m_call = new PoolDbDataObjectHandler(m_class);
    00311     m_call->setShape(shapeH);
    00312   }
    00313   else  {
    00314     return makeError("Failed to create POOL shape information for GUID:"+
    00315                       m_objGuid.toString(),false);
    00316   }
    00317   return status;
    00318 }

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

Converter overrides: Finalize the Db data converter.

Finalize the Db converter.

Reimplemented from Converter.

Definition at line 321 of file PoolDbBaseCnv.cpp.

    00321                                      {
    00322   pool::releasePtr(m_call);
    00323   pool::releasePtr(m_dbMgr);
    00324   pool::releasePtr(m_dataMgr);
    00325   return Converter::finalize();
    00326 }

virtual long PoolDbBaseCnv::repSvcType | ( |  | ) | const`[inline, virtual]`

Retrieve the class type of the data store the converter uses.

Implements IConverter.

Definition at line 97 of file PoolDbBaseCnv.h.

    00097                                    {
    00098     return i_repSvcType();
    00099   }

StatusCode PoolDbBaseCnv::createObj | ( | IOpaqueAddress * | pAddr,
|  | DataObject *& | refpObj |
| ) |  |  | `[virtual]`

Converter overrides: Create transient object from persistent data.

Db specific implementation: Create an empty transient object: Default: DataObject.

Parameters:

  | pAddr | [IN] Pointer to object address.
  | refpObj | [OUT] Location to pointer to store data object

Returns:
  Status code indicating success or failure.

Reimplemented from Converter.

Reimplemented in PoolDbDatabaseCnv, PoolDbDirectoryCnv, and PoolDbNTupleCnv.

Definition at line 477 of file PoolDbBaseCnv.cpp.

    00478 {
    00479   try   {
    00480     PoolDbAddress* pA = dynamic_cast<PoolDbAddress*>(pAddress);
    00481     if ( pA )  {
    00482       PoolDbObjectContext ctxt(this, pAddress->registry());
    00483       pool::DataCallBack* call = m_call->clone();
    00484       StatusCode sc = m_dbMgr->read(call, pA);
    00485       if ( sc.isSuccess() )  {
    00486         refpObject = (DataObject*)call->object();
    00487         call->release();
    00488         return StatusCode::SUCCESS;
    00489       }
    00490       call->release();
    00491       std::string tag = pA->par()[0]+":"+pA->par()[1];
    00492       if ( sc.getCode() == IPoolDbMgr::BAD_DATA_CONNECTION )  {
    00493         if ( m_badFiles.find(tag) != m_badFiles.end() ) {
    00494           return sc;  // Let's save us the additional printout
    00495         }
    00496         m_badFiles.insert(tag);
    00497       }
    00498       MsgStream log(msgSvc(),"PoolDbBaseCnv");
    00499       log << MSG::ERROR << "createObj> Cannot access the object:"+tag << endmsg;
    00500       return StatusCode::FAILURE;
    00501     }
    00502     return makeError("createObj> Invalid object address.", false);
    00503   }
    00504   catch (std::exception& e)  {
    00505     return makeError(std::string("createObj> Caught exception:")+e.what(), false);
    00506   }
    00507   catch(...)  {
    00508   }
    00509   return makeError("createObj> Unknown exception occurred.", false);
    00510 }

StatusCode PoolDbBaseCnv::fillObjRefs | ( | IOpaqueAddress * | pAddr,
|  | DataObject * | pObj |
| ) |  |  | `[virtual]`

Converter overrides: Resolve the references of the created transient object.

Resolve the references of the created transient object.

Parameters:

  | pAddr | [IN] Pointer to object address.
  | pObj | [IN] Pointer to data object

Returns:
  Status code indicating success or failure.

Reimplemented from Converter.

Reimplemented in PoolDbDirectoryCnv, and PoolDbNTupleCnv.

Definition at line 514 of file PoolDbBaseCnv.cpp.

    00515 {
    00516   return updateObjRefs(pAddress, pObject);
    00517 }

StatusCode PoolDbBaseCnv::updateObj | ( | IOpaqueAddress * | pAddr,
|  | DataObject * | pObj |
| ) |  |  | `[virtual]`

Converter overrides: Update transient object from persistent data.

Db specific implementation: Update a transient object: Default: DataObject.

Parameters:

  | pAddr | [IN] Pointer to object address.
  | pObj | [IN] Pointer to data object

Returns:
  Status code indicating success or failure.

Reimplemented from Converter.

Reimplemented in PoolDbDirectoryCnv, and PoolDbNTupleCnv.

Definition at line 521 of file PoolDbBaseCnv.cpp.

    00522 {
    00523   try  {
    00524     PoolDbAddress* pA = dynamic_cast<PoolDbAddress*>(pAddr);
    00525     if ( 0 != pA ) {
    00526       return makeError("updateObj> Sorry folks, not yet implemented...");
    00527     }
    00528     return makeError("updateObj> Invalid opaque object address.");
    00529   }
    00530   catch (std::exception& e)  {
    00531     return makeError(std::string("updateObj> Caught exception:")+e.what());
    00532   }
    00533   catch (...)  {
    00534   }
    00535   return makeError("updateObj> Unknown Error - exception was thrown.");
    00536 }

StatusCode PoolDbBaseCnv::updateObjRefs | ( | IOpaqueAddress * | pAddr,
|  | DataObject * | pObj |
| ) |  |  | `[virtual]`

Converter overrides: Update the references of an updated transient object.

Update the references of an updated transient object.

Parameters:

  | pAddr | [IN] Pointer to object address.
  | pObj | [IN] Pointer to data object

Returns:
  Status code indicating success or failure.

Reimplemented from Converter.

Reimplemented in PoolDbDirectoryCnv, PoolDbKeyedContainerCnv, and PoolDbNTupleCnv.

Definition at line 540 of file PoolDbBaseCnv.cpp.

    00541 {
    00542   if ( 0 != pObj )  {
    00543     if ( printLinks() )  {
    00544       MsgStream log(msgSvc(), "updateObjRefs");
    00545       LinkManager* mgr = pObj->linkMgr();
    00546       std::string id = pObj->registry()->identifier();
    00547       for ( int i = 0; i < mgr->size(); ++i)  {
    00548         LinkManager::Link* lnk = mgr->link(i);
    00549         log << MSG::ALWAYS << "GET> " << id << "[" << i << "] = " << lnk->path() << endmsg;
    00550       }
    00551     }
    00552     return StatusCode::SUCCESS;
    00553   }
    00554   return makeError("updateObjRefs> Invalid object reference.");
    00555 }

StatusCode PoolDbBaseCnv::createRep | ( | DataObject * | pObj,
|  | IOpaqueAddress *& | refpAddr |
| ) |  |  | `[virtual]`

Converter overrides: Convert the transient object to the requested representation.

Create persistent representation of the object.

Parameters:

  | pObj | [IN] Pointer to data object
  | refpAddr | [OUT] Location to store pointer to object address.

Returns:
  Status code indicating success or failure.

Reimplemented from Converter.

Reimplemented in PoolDbDirectoryCnv, and PoolDbNTupleCnv.

Definition at line 559 of file PoolDbBaseCnv.cpp.

    00560 {
    00561   try   {
    00562     refpA = 0;
    00563     if ( pObj )  {
    00564       IRegistry* pReg = pObj->registry();
    00565       if ( pReg )  {
    00566         PoolDbAddress* pA = 0;
    00567         std::string cnt = containerName(pReg);
    00568         PoolDbObjectContext ctxt(this, pObj->registry());
    00569         pool::DataCallBack* call = m_call->clone();
    00570         call->setObject(pObj);
    00571         StatusCode sc = m_dbMgr->markWrite(call, cnt, &pA);
    00572         if ( sc.isSuccess() )  {
    00573           refpA = pA;
    00574           return sc;
    00575         }
    00576       }
    00577       return makeError("createRep> Invalid object registry entry.");
    00578     }
    00579     return makeError("createRep> Invalid object reference.");
    00580   }
    00581   catch (std::exception& e)  {
    00582     makeError(std::string("createRep> Caught exception:")+e.what());
    00583   }
    00584   catch (...)   {
    00585     return makeError("createRep> Unknown Fatal Exception.");
    00586   }
    00587   return makeError("createRep> Fatal Error.");
    00588 }

StatusCode PoolDbBaseCnv::fillRepRefs | ( | IOpaqueAddress * | pAddr,
|  | DataObject * | pObj |
| ) |  |  | `[virtual]`

Converter overrides: Resolve the references of the converted object.

Resolve the references of the converted object.

Parameters:

  | pAddr | [IN] Pointer to object address.
  | pObj | [IN] Pointer to data object

Returns:
  Status code indicating success or failure.

Reimplemented from Converter.

Reimplemented in PoolDbNTupleCnv.

Definition at line 617 of file PoolDbBaseCnv.cpp.

    00618 {
    00619   return updateRepRefs(pAddr, pObj);
    00620 }

StatusCode PoolDbBaseCnv::updateRep | ( | IOpaqueAddress * | pAddr,
|  | DataObject * | pObj |
| ) |  |  | `[virtual]`

Converter overrides: Update the converted representation of a transient object.

Update the converted representation of a transient object.

Parameters:

  | pAddr | [IN] Pointer to object address.
  | pObj | [IN] Pointer to data object

Returns:
  Status code indicating success or failure.

Reimplemented from Converter.

Reimplemented in PoolDbDirectoryCnv, and PoolDbNTupleCnv.

Definition at line 592 of file PoolDbBaseCnv.cpp.

    00592                                                                  {
    00593   try   {
    00594     PoolDbAddress* pA = dynamic_cast<PoolDbAddress*>(pAddr);
    00595     if ( 0 != pA )  {
    00596       if ( pObj )  {
    00597         PoolDbObjectContext ctxt(this, pAddr->registry());
    00598         pool::DataCallBack* call = m_call->clone();
    00599         call->setObject(pObj);
    00600         return m_dbMgr->markUpdate(call, pA);
    00601       }
    00602       return makeError("updateRep> Invalid object reference.");
    00603     }
    00604     return makeError("updateRep> Invalid opaque object address.");
    00605   }
    00606   catch (std::exception& e)  {
    00607     makeError(std::string("updateRep> Caught exception:")+e.what());
    00608   }
    00609   catch (...)   {
    00610     return makeError("updateRep> Unknown Fatal Exception.");
    00611   }
    00612   return makeError("updateRep> Fatal Error.");
    00613 }

StatusCode PoolDbBaseCnv::updateRepRefs | ( | IOpaqueAddress * | pAddr,
|  | DataObject * | pObj |
| ) |  |  | `[virtual]`

Converter overrides: Update the references of an already converted object.

Update the references of an already converted object.

Parameters:

  | pAddr | [IN] Pointer to object address.
  | pObj | [IN] Pointer to data object

Returns:
  Status code indicating success or failure.

Reimplemented from Converter.

Reimplemented in PoolDbDirectoryCnv, and PoolDbNTupleCnv.

Definition at line 624 of file PoolDbBaseCnv.cpp.

    00625 {
    00626   if ( pObj ) {
    00627     return StatusCode::SUCCESS;
    00628   }
    00629   return makeError("updateRepRefs> Invalid object reference.");
    00630 }

PoolDbLinkManager * PoolDbBaseCnv::createReferences | ( | DataObject * | pObj | ) | `[virtual]`

Definition at line 425 of file PoolDbBaseCnv.cpp.

    00426 {
    00427   typedef std::vector<IRegistry*> Leaves;
    00428   PoolDbLinkManager* refs = new PoolDbLinkManager;
    00429   Leaves leaves;
    00430   StatusCode status = m_dataMgr->objectLeaves(pObj, leaves);
    00431   if ( status.isSuccess() )  {
    00432     for(Leaves::iterator i=leaves.begin(), iend=leaves.end(); i != iend; ++i)  {
    00433       IRegistry* pR = *i;
    00434       IOpaqueAddress* pA = pR->address();
    00435       if ( 0 != pA )  {
    00436         PoolDbAddress*  pdbA = dynamic_cast<PoolDbAddress*>(pA);
    00437         if ( 0 != pdbA )  {
    00438           pool::Token* tok = const_cast<pool::Token*>(pdbA->token());
    00439           if ( tok )  {
    00440             tok->addRef();
    00441             refs->references().push_back(tok);
    00442             refs->links().push_back(pR->name());
    00443           }
    00444           else  {
    00445             // What should we do here ?
    00446             // Not so clear...
    00447           }
    00448         }
    00449         else  {
    00450           const std::string*   spar = pA->par();
    00451           const unsigned long* ipar = pA->ipar();
    00452           pool::Guid guid(pool::Guid::null());
    00453           guid.Data1 = pA->clID();
    00454           pool::Token* tok = new pool::Token();
    00455           tok->setClassID(guid);
    00456           tok->setTechnology(pA->svcType());
    00457           tok->setDb(spar[0]).setCont(spar[1]);
    00458           tok->oid().first  = ipar[0];
    00459           tok->oid().second = ipar[1];
    00460           refs->references().push_back(tok);
    00461           refs->links().push_back(pR->name());
    00462         }
    00463       }
    00464       else    {
    00465         // This is not really an error, it only means that the object
    00466         // pointed to is not persistent. Hence, this link cannot be followed
    00467         // from the data written.
    00468       }
    00469     }
    00470   }
    00471   return refs;
    00472 }

StatusCode PoolDbBaseCnv::setReferences | ( | PoolDbLinkManager * | pMgr,
|  | LinkManager * | pLinks,
|  | DataObject * | pObj,
|  | IRegistry * | pReg |
| ) |  |  | `[virtual]`

Set the references of a DataObject when reading.

Parameters:

  | pMgr | [IN] Pointer to POOL Link manager object
  | pLinks | [IN] Pointer to intermediate link manager
  | pObj | [IN] Pointer to data object
  | pReg | [IN] Pointer to registry entry

Returns:
  Status code indicating success or failure.

Definition at line 368 of file PoolDbBaseCnv.cpp.

    00372 {
    00373   std::string tmp;
    00374   LinkManager* pmgr = pObj->linkMgr();
    00375   for(int i = 0; i < pLinks->size(); ++i)  {
    00376     LinkManager::Link* lnk = pLinks->link(i);
    00377     pmgr->addLink(lnk->path(), 0);
    00378   }
    00379   size_t ref_size  = mgr->references().size();
    00380   for(size_t j = 0; j < ref_size; ++j) {
    00381     IOpaqueAddress* pA = 0;
    00382     const pool::Token* token = mgr->references()[j];
    00383     std::string& location = mgr->links()[j];
    00384     long typ = token->technology();
    00385     CLID clid = token->classID().Data1;
    00386     std::string spar[]   = {token->dbID(),
    00387                             token->contID()};
    00388     unsigned long ipar[] = {token->oid().first,
    00389                             token->oid().second};
    00390     StatusCode sc = addressCreator()->createAddress(typ,clid,spar,ipar,pA);
    00391     if ( sc.isSuccess() )  {
    00392       // Temporary fix for all files written with previous release(s)
    00393       // The fix should be removed when these files are obsolete
    00394       if ( location.substr(0,7) == "/Event/" )  {
    00395         size_t idx = location.rfind("/");
    00396         tmp = location.substr(idx);
    00397         location = tmp;
    00398       }
    00399       sc = m_dataMgr->registerAddress(pReg, location, pA);
    00400       if ( sc.isSuccess() )  {
    00401         // MsgStream log(msgSvc(), "Reflection");
    00402         // log << MSG::ALWAYS << "Registered:" << pReg->identifier() << " as " << location << endmsg;
    00403         continue;
    00404       }
    00405       pA->release();
    00406       ROOT::Reflex::Type classH = pool::DbReflex::forGuid(token->classID());
    00407       MsgStream err(msgSvc(), "Reflection");
    00408       if ( 0 == classH ) {
    00409         err << MSG::ERROR << "No reflection information availible for class ID:"
    00410             << token->classID().toString() << endmsg;
    00411       }
    00412       else {
    00413         err << MSG::ERROR << "Reflection information availible for class ID:"
    00414             << token->classID().toString() << endmsg
    00415             << classH.Name(ROOT::Reflex::SCOPED) << endmsg;
    00416       }
    00417       makeError("setReferences> Failed to register opaque address:"+location+
    00418                 "\n"+token->toString());
    00419     }
    00420   }
    00421   return StatusCode::SUCCESS;
    00422 }

StatusCode PoolDbBaseCnv::dumpReferences | ( | PoolDbLinkManager * | pMgr,
|  | LinkManager * | pLinks,
|  | DataObject * | pObj,
|  | IRegistry * | pReg |
| ) |  |  | `[virtual]`

Dump the references of a DataObject after writing.

Parameters:

  | pMgr | [IN] Pointer to POOL Link manager object
  | pLinks | [IN] Pointer to intermediate link manager
  | pObj | [IN] Pointer to data object
  | pReg | [IN] Pointer to registry entry

Returns:
  Status code indicating success or failure.

Definition at line 351 of file PoolDbBaseCnv.cpp.

    00355 {
    00356   if ( printLinks() )  {
    00357     MsgStream log(msgSvc(), "dumpReferences");
    00358     LinkManager* mgr = pObj->linkMgr();
    00359     for ( int i = 0; i < mgr->size(); ++i)  {
    00360       LinkManager::Link* lnk = mgr->link(i);
    00361       log << MSG::ALWAYS << "PUT> " << pObj->registry()->identifier() << "[" << i << "] = " << lnk->path() << endmsg;
    00362     }
    00363   }
    00364   return StatusCode::SUCCESS;
    00365 }

## Member Data Documentation

IPoolDbMgr* PoolDbBaseCnv::m_dbMgr`[protected]`

Services needed for proper operation: POOL database manager.

Definition at line 48 of file PoolDbBaseCnv.h.

IDataManagerSvc* PoolDbBaseCnv::m_dataMgr`[protected]`

Services needed for proper operation: Gaudi datastore manager.

Definition at line 50 of file PoolDbBaseCnv.h.

pool::Guid PoolDbBaseCnv::m_objGuid`[protected]`

Object Guid.

Definition at line 52 of file PoolDbBaseCnv.h.

ROOT::Reflex::Type PoolDbBaseCnv::m_class`[protected]`

Reference to seal reflection class.

Definition at line 54 of file PoolDbBaseCnv.h.

pool::DataCallBack* PoolDbBaseCnv::m_call`[protected]`

Definition callback.

Definition at line 56 of file PoolDbBaseCnv.h.

std::set<std::string> PoolDbBaseCnv::m_badFiles`[protected]`

Set with bad files/tables.

Definition at line 58 of file PoolDbBaseCnv.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r9/GaudiPoolDb/GaudiPoolDb/PoolDbBaseCnv.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r9/GaudiPoolDb/src/PoolDbBaseCnv.cpp