| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

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

    00256   : Converter(typ, clid, svc), m_dbMgr(0), m_dataMgr(0),
    00257     m_objGuid(pool::Guid::null()), m_call(0)
    00258 {
    00259   s_count->increment();
    00260   m_objGuid.Data1 = clid;
    00261 }

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

Standard Destructor.

Definition at line 264 of file PoolDbBaseCnv.cpp.

    00264                                {
    00265   pool::releasePtr(m_dbMgr);
    00266   s_count->decrement();
    00267 }

## Member Function Documentation

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

    00353                                                         {
    00354   if ( 0 != pRegistry )   {
    00355     return pRegistry->identifier();
    00356   }
    00357   return "";
    00358 }

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

    00501 {
    00502   try   {
    00503     PoolDbAddress* pA = dynamic_cast<PoolDbAddress*>(pAddress);
    00504     if ( pA )  {
    00505       PoolDbObjectContext ctxt(this, pAddress->registry());
    00506       pool::DataCallBack* call = m_call->clone();
    00507       StatusCode sc = m_dbMgr->read(call, pA);
    00508       if ( sc.isSuccess() )  {
    00509         refpObject = (DataObject*)call->object();
    00510         call->release();
    00511         return StatusCode::SUCCESS;
    00512       }
    00513       call->release();
    00514       std::string tag = pA->par()[0]+":"+pA->par()[1];
    00515       if ( sc.getCode() == IPoolDbMgr::BAD_DATA_CONNECTION )  {
    00516         if ( m_badFiles.find(tag) != m_badFiles.end() ) {
    00517           return sc;  // Let's save us the additional printout
    00518         }
    00519         m_badFiles.insert(tag);
    00520       }
    00521       MsgStream log(msgSvc(),"PoolDbBaseCnv");
    00522       log << MSG::ERROR << "createObj> Cannot access the object:"+tag << endmsg;
    00523       return StatusCode::FAILURE;
    00524     }
    00525     return makeError("createObj> Invalid object address.", false);
    00526   }
    00527   catch (std::exception& e)  {
    00528     return makeError(std::string("createObj> Caught exception:")+e.what(), false);
    00529   }
    00530   catch(...)  {
    00531   }
    00532   return makeError("createObj> Unknown exception occurred.", false);
    00533 }

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

Definition at line 448 of file PoolDbBaseCnv.cpp.

    00449 {
    00450   typedef std::vector<IRegistry*> Leaves;
    00451   PoolDbLinkManager* refs = new PoolDbLinkManager;
    00452   Leaves leaves;
    00453   StatusCode status = m_dataMgr->objectLeaves(pObj, leaves);
    00454   if ( status.isSuccess() )  {
    00455     for(Leaves::iterator i=leaves.begin(), iend=leaves.end(); i != iend; ++i)  {
    00456       IRegistry* pR = *i;
    00457       IOpaqueAddress* pA = pR->address();
    00458       if ( 0 != pA )  {
    00459         PoolDbAddress*  pdbA = dynamic_cast<PoolDbAddress*>(pA);
    00460         if ( 0 != pdbA )  {
    00461           pool::Token* tok = const_cast<pool::Token*>(pdbA->token());
    00462           if ( tok )  {
    00463             tok->addRef();
    00464             refs->references().push_back(tok);
    00465             refs->links().push_back(pR->name());
    00466           }
    00467           else  {
    00468             // What should we do here ?
    00469             // Not so clear...
    00470           }
    00471         }
    00472         else  {
    00473           const std::string*   spar = pA->par();
    00474           const unsigned long* ipar = pA->ipar();
    00475           pool::Guid guid(pool::Guid::null());
    00476           guid.Data1 = pA->clID();
    00477           pool::Token* tok = new pool::Token();
    00478           tok->setClassID(guid);
    00479           tok->setTechnology(pA->svcType());
    00480           tok->setDb(spar[0]).setCont(spar[1]);
    00481           tok->oid().first  = ipar[0];
    00482           tok->oid().second = ipar[1];
    00483           refs->references().push_back(tok);
    00484           refs->links().push_back(pR->name());
    00485         }
    00486       }
    00487       else    {
    00488         // This is not really an error, it only means that the object
    00489         // pointed to is not persistent. Hence, this link cannot be followed
    00490         // from the data written.
    00491       }
    00492     }
    00493   }
    00494   return refs;
    00495 }

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

    00585 {
    00586   try   {
    00587     refpA = 0;
    00588     if ( pObj )  {
    00589       IRegistry* pReg = pObj->registry();
    00590       if ( pReg )  {
    00591         PoolDbAddress* pA = 0;
    00592         std::string cnt = containerName(pReg);
    00593         PoolDbObjectContext ctxt(this, pObj->registry());
    00594         pool::DataCallBack* call = m_call->clone();
    00595         call->setObject(pObj);
    00596         StatusCode sc = m_dbMgr->markWrite(call, cnt, &pA);
    00597         if ( sc.isSuccess() )  {
    00598           refpA = pA;
    00599           return sc;
    00600         }
    00601       }
    00602       return makeError("createRep> Invalid object registry entry.");
    00603     }
    00604     return makeError("createRep> Invalid object reference.");
    00605   }
    00606   catch (std::exception& e)  {
    00607     makeError(std::string("createRep> Caught exception:")+e.what());
    00608   }
    00609   catch (...)   {
    00610     return makeError("createRep> Unknown Fatal Exception.");
    00611   }
    00612   return makeError("createRep> Fatal Error.");
    00613 }

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

    00378 {
    00379   if ( printLinks() )  {
    00380     MsgStream log(msgSvc(), "dumpReferences");
    00381     LinkManager* mgr = pObj->linkMgr();
    00382     for ( int i = 0; i < mgr->size(); ++i)  {
    00383       LinkManager::Link* lnk = mgr->link(i);
    00384       log << MSG::ALWAYS << "PUT> " << pObj->registry()->identifier() << "[" << i << "] = " << lnk->path() << endmsg;
    00385     }
    00386   }
    00387   return StatusCode::SUCCESS;
    00388 }

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

    00538 {
    00539   return updateObjRefs(pAddress, pObject);
    00540 }

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

    00643 {
    00644   return updateRepRefs(pAddr, pObj);
    00645 }

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

Converter overrides: Finalize the Db data converter.

Finalize the Db converter.

Reimplemented from Converter.

Definition at line 339 of file PoolDbBaseCnv.cpp.

    00339                                      {
    00340   pool::DbTypeInfo* shapeH = 0;
    00341   if ( m_call ) {
    00342     shapeH = dynamic_cast<pool::DbTypeInfo*>((pool::Shape*)m_call->shape());
    00343     if ( shapeH ) shapeH->deleteRef();
    00344   }
    00345   pool::releasePtr(m_call);
    00346   pool::releasePtr(m_dbMgr);
    00347   pool::releasePtr(m_dataMgr);
    00348   return Converter::finalize();
    00349 }

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

Converter overrides: Initialize the Db converter.

Initialize the converter.

Reimplemented from Converter.

Definition at line 270 of file PoolDbBaseCnv.cpp.

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

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

    00361 {
    00362   MsgStream log(msgSvc(),"PoolDbBaseCnv");
    00363   log << MSG::ERROR << "Trouble with class:" << m_objGuid.toString() << " ";
    00364   if ( m_class ) log << "<" << m_class.Name(ROOT::Reflex::SCOPED) << "> ";
    00365   log << endmsg;
    00366   log << msg << endmsg;
    00367   if ( rethrow )  {
    00368     pool::debugBreak("Error:"+msg, "PoolDbBaseCnv", true);
    00369   }
    00370   return StatusCode::FAILURE;
    00371 }

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

    00395 {
    00396   std::string tmp;
    00397   LinkManager* pmgr = pObj->linkMgr();
    00398   for(int i = 0; i < pLinks->size(); ++i)  {
    00399     LinkManager::Link* lnk = pLinks->link(i);
    00400     pmgr->addLink(lnk->path(), 0);
    00401   }
    00402   size_t ref_size  = mgr->references().size();
    00403   for(size_t j = 0; j < ref_size; ++j) {
    00404     IOpaqueAddress* pA = 0;
    00405     const pool::Token* token = mgr->references()[j];
    00406     std::string& location = mgr->links()[j];
    00407     long typ = token->technology();
    00408     CLID clid = token->classID().Data1;
    00409     std::string spar[]   = {token->dbID(),
    00410                             token->contID()};
    00411     unsigned long ipar[] = {token->oid().first,
    00412                             token->oid().second};
    00413     StatusCode sc = addressCreator()->createAddress(typ,clid,spar,ipar,pA);
    00414     if ( sc.isSuccess() )  {
    00415       // Temporary fix for all files written with previous release(s)
    00416       // The fix should be removed when these files are obsolete
    00417       if ( location.substr(0,7) == "/Event/" )  {
    00418         size_t idx = location.rfind("/");
    00419         tmp = (idx==std::string::npos) ? location : location.substr(idx);
    00420         location = tmp;
    00421       }
    00422       sc = m_dataMgr->registerAddress(pReg, location, pA);
    00423       if ( sc.isSuccess() )  {
    00424         // MsgStream log(msgSvc(), "Reflection");
    00425         // log << MSG::ALWAYS << "Registered:" << pReg->identifier() << " as " << location << endmsg;
    00426         continue;
    00427       }
    00428       pA->release();
    00429       ROOT::Reflex::Type classH = pool::DbReflex::forGuid(token->classID());
    00430       MsgStream err(msgSvc(), "Reflection");
    00431       if ( 0 == classH ) {
    00432         err << MSG::ERROR << "No reflection information availible for class ID:"
    00433             << token->classID().toString() << endmsg;
    00434       }
    00435       else {
    00436         err << MSG::ERROR << "Reflection information availible for class ID:"
    00437             << token->classID().toString() << endmsg
    00438             << classH.Name(ROOT::Reflex::SCOPED) << endmsg;
    00439       }
    00440       makeError("setReferences> Failed to register opaque address:"+location+
    00441                 "\n"+token->toString());
    00442     }
    00443   }
    00444   return StatusCode::SUCCESS;
    00445 }

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

    00545 {
    00546   try  {
    00547     PoolDbAddress* pA = dynamic_cast<PoolDbAddress*>(pAddr);
    00548     if ( 0 != pA ) {
    00549       return makeError("updateObj> Sorry folks, not yet implemented...");
    00550     }
    00551     return makeError("updateObj> Invalid opaque object address.");
    00552   }
    00553   catch (std::exception& e)  {
    00554     return makeError(std::string("updateObj> Caught exception:")+e.what());
    00555   }
    00556   catch (...)  {
    00557   }
    00558   return makeError("updateObj> Unknown Error - exception was thrown.");
    00559 }

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, and PoolDbNTupleCnv.

Definition at line 563 of file PoolDbBaseCnv.cpp.

    00564 {
    00565   if ( 0 != pObj )  {
    00566     // First call the reconfiguration callback
    00567     StatusCode sc = pObj->update();
    00568     if ( sc.isSuccess() && printLinks() )  {
    00569       MsgStream log(msgSvc(), "updateObjRefs");
    00570       LinkManager* mgr = pObj->linkMgr();
    00571       std::string id = pObj->registry()->identifier();
    00572       for ( int i = 0; i < mgr->size(); ++i)  {
    00573         LinkManager::Link* lnk = mgr->link(i);
    00574         log << MSG::ALWAYS << "GET> " << id << "[" << i << "] = " << lnk->path() << endmsg;
    00575       }
    00576     }
    00577     return sc;
    00578   }
    00579   return makeError("updateObjRefs> Invalid object reference.");
    00580 }

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

    00617                                                                  {
    00618   try   {
    00619     PoolDbAddress* pA = dynamic_cast<PoolDbAddress*>(pAddr);
    00620     if ( 0 != pA )  {
    00621       if ( pObj )  {
    00622         PoolDbObjectContext ctxt(this, pAddr->registry());
    00623         pool::DataCallBack* call = m_call->clone();
    00624         call->setObject(pObj);
    00625         return m_dbMgr->markUpdate(call, pA);
    00626       }
    00627       return makeError("updateRep> Invalid object reference.");
    00628     }
    00629     return makeError("updateRep> Invalid opaque object address.");
    00630   }
    00631   catch (std::exception& e)  {
    00632     makeError(std::string("updateRep> Caught exception:")+e.what());
    00633   }
    00634   catch (...)   {
    00635     return makeError("updateRep> Unknown Fatal Exception.");
    00636   }
    00637   return makeError("updateRep> Fatal Error.");
    00638 }

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

    00650 {
    00651   if ( pObj ) {
    00652     return StatusCode::SUCCESS;
    00653   }
    00654   return makeError("updateRepRefs> Invalid object reference.");
    00655 }

## Member Data Documentation

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

Set with bad files/tables.

Definition at line 58 of file PoolDbBaseCnv.h.

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

Definition callback.

Definition at line 56 of file PoolDbBaseCnv.h.

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

Reference to seal reflection class.

Definition at line 54 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.

IPoolDbMgr* PoolDbBaseCnv::m_dbMgr`[protected]`

Services needed for proper operation: POOL database manager.

Definition at line 48 of file PoolDbBaseCnv.h.

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

Object Guid.

Definition at line 52 of file PoolDbBaseCnv.h.

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

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

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