| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# PoolDbBaseCnv Class Reference

`#include <PoolDb/PoolDbBaseCnv.h>`

Inheritance diagram for PoolDbBaseCnv:

[legend]
Collaboration diagram for PoolDbBaseCnv:

[legend]

List of all members.

## 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.

## 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.

## 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 233 of file PoolDbBaseCnv.cpp.

    00234 : Converter(typ, clid, svc), m_objGuid(pool::Guid::null()), m_call(0)
    00235 {
    00236   s_count->increment();
    00237   m_dbMgr = 0;
    00238   m_objGuid.Data1 = clid;
    00239 }

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

Standard Destructor.

Definition at line 242 of file PoolDbBaseCnv.cpp.

    00242                                {
    00243   pool::releasePtr(m_dbMgr);
    00244   s_count->decrement();
    00245 }

## 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 332 of file PoolDbBaseCnv.cpp.

    00333 {
    00334   MsgStream log(messageService(),"PoolDbBaseCnv");
    00335   log << MSG::ERROR << "Trouble with class:" << m_objGuid.toString() << " ";
    00336   if ( m_class ) log << "<" << m_class.Name(ROOT::Reflex::SCOPED) << "> ";
    00337   log << endmsg;
    00338   log << msg << endmsg;
    00339   if ( rethrow )  {
    00340     pool::debugBreak("Error:"+msg, "PoolDbBaseCnv", true);
    00341   }
    00342   return StatusCode::FAILURE;
    00343 }

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 325 of file PoolDbBaseCnv.cpp.

    00325                                                         {
    00326   if ( 0 != pRegistry )   {
    00327     return pRegistry->identifier();
    00328   }
    00329   return "";
    00330 }

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

Converter overrides: Initialize the Db converter.

Initialize the converter.

Reimplemented from Converter.

Definition at line 248 of file PoolDbBaseCnv.cpp.

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

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

Converter overrides: Finalize the Db data converter.

Finalize the Db converter.

Reimplemented from Converter.

Definition at line 316 of file PoolDbBaseCnv.cpp.

    00316                                      {
    00317   pool::releasePtr(m_call);
    00318   pool::releasePtr(m_dbMgr);
    00319   pool::releasePtr(m_dataMgr);
    00320   return Converter::finalize();
    00321 }

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 472 of file PoolDbBaseCnv.cpp.

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

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 509 of file PoolDbBaseCnv.cpp.

    00510 {
    00511   return updateObjRefs(pAddress, pObject);
    00512 }

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 516 of file PoolDbBaseCnv.cpp.

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

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 535 of file PoolDbBaseCnv.cpp.

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

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 554 of file PoolDbBaseCnv.cpp.

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

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 612 of file PoolDbBaseCnv.cpp.

    00613 {
    00614   return updateRepRefs(pAddr, pObj);
    00615 }

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 587 of file PoolDbBaseCnv.cpp.

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

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 619 of file PoolDbBaseCnv.cpp.

    00620 {
    00621   if ( pObj ) {
    00622     return StatusCode::SUCCESS;
    00623   }
    00624   return makeError("updateRepRefs> Invalid object reference.");
    00625 }

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

Definition at line 420 of file PoolDbBaseCnv.cpp.

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

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 363 of file PoolDbBaseCnv.cpp.

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

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 346 of file PoolDbBaseCnv.cpp.

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

## 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_v20r3/GaudiPoolDb/GaudiPoolDb/PoolDbBaseCnv.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r3/GaudiPoolDb/src/PoolDbBaseCnv.cpp