![]() |
|
|
Generated: 24 Nov 2008 |
#include <PoolDb/PoolDbCnvSvc.h>


PoolDbCnvSvc class implementation definition.
Definition at line 45 of file PoolDbCnvSvc.h.
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 | queryInterface (const InterfaceID &riid, void **ppvInterface) |
| ConversionSvc overload: Query interface. | |
| 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 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. | |
| 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. | |
Classes | |
| struct | DbH |
| typedef std::pair< void*, const ROOT::Reflex::Type > PoolDbCnvSvc::ObjH |
Definition at line 60 of file PoolDbCnvSvc.h.
| typedef std::map<std::string, DbH> PoolDbCnvSvc::DbMap |
Definition at line 61 of file PoolDbCnvSvc.h.
| typedef std::map<std::string, std::string> PoolDbCnvSvc::DbFidMap |
Definition at line 62 of file PoolDbCnvSvc.h.
| PoolDbCnvSvc::PoolDbCnvSvc | ( | const std::string & | name, | |
| ISvcLocator * | svc | |||
| ) |
Standard constructor.
| PoolDbCnvSvc::~PoolDbCnvSvc | ( | ) | [virtual] |
| StatusCode PoolDbCnvSvc::updateServiceState | ( | IOpaqueAddress * | pAddress | ) | [virtual] |
Update state of the service.
Reimplemented from ConversionSvc.
Definition at line 194 of file PoolDbCnvSvc.cpp.
00194 { 00195 return S_OK; 00196 }
| StatusCode PoolDbCnvSvc::error | ( | const std::string & | msg, | |
| bool | rethrow = true | |||
| ) |
Standard way to print errors.
after the printout an exception is thrown.
| msg | [IN] Message string to be printed. | |
| rethrow | [IN] Flag to indicate if an exception should be thrown |
| StatusCode PoolDbCnvSvc::setDataProvider | ( | IDataProviderSvc * | pDataSvc | ) | [virtual] |
Connect to data provider service.
Re-connects to data manager service.
| pDataSvc | New data provider object. |
Reimplemented from ConversionSvc.
Definition at line 256 of file PoolDbCnvSvc.cpp.
00256 { 00257 IDataManagerSvc* tmp = m_dataMgr; 00258 if (pDataSvc) { 00259 StatusCode status = 00260 pDataSvc->queryInterface(IID_IDataManagerSvc, pp_cast<void>(&m_dataMgr)); 00261 if ( !status.isSuccess() ) { 00262 return error("Cannot connect to \"IDataManagerSvc\" interface."); 00263 } 00264 } 00265 if ( tmp ) tmp->release(); 00266 return ConversionSvc::setDataProvider(pDataSvc); 00267 }
| StatusCode PoolDbCnvSvc::queryInterface | ( | const InterfaceID & | riid, | |
| void ** | ppvInterface | |||
| ) | [virtual] |
ConversionSvc overload: Query interface.
Query interface.
Reimplemented from ConversionSvc.
Definition at line 104 of file PoolDbCnvSvc.cpp.
00104 { 00105 if ( IID_IPoolDbMgr == riid ) { 00106 *ppvInterface = (IPoolDbMgr*)this; 00107 addRef(); 00108 return S_OK; 00109 } 00110 // Interface is not directly availible: try out a base class 00111 return ConversionSvc::queryInterface(riid, ppvInterface); 00112 }
| StatusCode PoolDbCnvSvc::initialize | ( | ) | [virtual] |
ConversionSvc overload: initialize Db service.
Initialize the Db data persistency service.
Reimplemented from ConversionSvc.
Definition at line 115 of file PoolDbCnvSvc.cpp.
00115 { 00116 StatusCode status = ConversionSvc::initialize(); 00117 MsgStream log(messageService(), name()); 00118 if ( !status.isSuccess() ) { 00119 log << MSG::ERROR << "Failed to initialize ConversionSvc base class." 00120 << endmsg; 00121 return status; 00122 } 00123 status = accessStorageType(m_implementation, m_type); 00124 if ( !status.isSuccess() ) { 00125 log << MSG::ERROR << "Failed to connect to POOL implementation:" 00126 << m_implementation << endmsg; 00127 return status; 00128 } 00129 status = service(m_cacheSvcName, m_cacheSvc); 00130 if ( !status.isSuccess() ) { 00131 log << MSG::ERROR << "Failed to connect to POOL cache service:" 00132 << m_cacheSvcName << endmsg; 00133 return status; 00134 } 00135 status = service("IODataManager", m_ioMgr); 00136 if( !status.isSuccess() ) { 00137 log << MSG::ERROR 00138 << "Unable to localize interface from service:IODataManager" << endreq; 00139 return status; 00140 } 00141 status = service("FileCatalog", m_catalog); 00142 if( !status.isSuccess() ) { 00143 log << MSG::ERROR 00144 << "Unable to localize interface from service:FileCatalog" << endreq; 00145 return status; 00146 } 00147 DbOptionCallback cb(m_cacheSvc->callbackHandler()); 00148 if ( m_domH.open(m_cacheSvc->session(),m_type,pool::UPDATE).isSuccess() ) { 00149 SmartIF<IProperty> prp(m_ioMgr); 00150 IntegerProperty ageLimit; 00151 ageLimit.assign(prp->getProperty("AgeLimit")); 00152 log << MSG::DEBUG << "POOL agelimit is set to " << ageLimit.value() << endmsg; 00153 m_domH.setAgeLimit(ageLimit.value()); 00154 return S_OK; 00155 } 00156 return S_OK; 00157 }
| StatusCode PoolDbCnvSvc::finalize | ( | void | ) | [virtual] |
ConversionSvc overload: Finalize Db service.
Finalize the Db data persistency service.
Reimplemented from ConversionSvc.
Definition at line 160 of file PoolDbCnvSvc.cpp.
00160 { 00161 MsgStream log(messageService(),name()); 00162 DbOptionCallback cb(m_cacheSvc->callbackHandler()); 00163 if ( m_ioMgr ) { 00164 if ( ::toupper(m_shareFiles[0]) != 'Y' ) { 00165 IIODataManager::Connections cons = m_ioMgr->connections(this); 00166 for(IIODataManager::Connections::iterator i=cons.begin(); i != cons.end(); ++i) { 00167 if ( m_ioMgr->disconnect(*i).isSuccess() ) { 00168 log << MSG::INFO << "Disconnected data IO:" << (*i)->fid(); 00169 log << "[" << (*i)->pfn() << "]"; 00170 log << endmsg; 00171 delete (*i); 00172 } 00173 } 00174 } 00175 else { 00176 log << MSG::INFO << "File sharing enabled. Do not retire files." << endmsg; 00177 } 00178 m_ioMgr->release(); 00179 m_ioMgr = 0; 00180 } 00181 m_domH.close(); 00182 m_domH = 0; 00183 if ( m_dataMgr ) m_dataMgr->clearStore().ignore(); 00184 pool::releasePtr(m_dataMgr); 00185 pool::releasePtr(m_catalog); 00186 pool::releasePtr(m_cacheSvc); 00187 StatusCode status = ConversionSvc::finalize(); 00188 log << MSG::DEBUG << "POOL conversion service finalized " << name() << " "; 00189 log << (const char*)(status.isSuccess() ? "successfully" : "with errors") << endmsg; 00190 return status; 00191 }
| 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 200 of file PoolDbCnvSvc.cpp.
00201 { 00202 IConverter* pConverter; 00203 ConverterID cnvid(POOL_StorageType, wanted); 00204 pConverter = PluginService::CreateWithId<IConverter*>(cnvid, typ, wanted, serviceLocator()); 00205 if ( 0 == pConverter ) { 00206 const CLID gen_clids[] = { 00207 /* ObjectList */ CLID_Any + CLID_ObjectList, 00208 /* ObjectVector */ CLID_Any + CLID_ObjectVector, 00209 /* Keyed Map */ CLID_Any + CLID_ObjectVector+0x00030000, 00210 /* Keyed Hashmap */ CLID_Any + CLID_ObjectVector+0x00040000, 00211 /* Keyed redirection array */ CLID_Any + CLID_ObjectVector+0x00050000, 00212 /* Standard, non-container */ CLID_Any 00213 }; 00214 for ( unsigned int i = 0; i < sizeof(gen_clids)/sizeof(gen_clids[0]); i++ ) { 00215 if ( (wanted>>16) == (gen_clids[i]>>16) ) { 00216 ConverterID cnvid(POOL_StorageType, gen_clids[i]); 00217 pConverter = PluginService::CreateWithId<IConverter*>(cnvid, typ, wanted, serviceLocator()); 00218 if ( 0 != pConverter ) { 00219 return pConverter; 00220 } 00221 } 00222 } 00223 // Check if a converter using object update is needed 00224 if ( (wanted>>24) != 0 ) { 00225 ConverterID cnvid(POOL_StorageType, CLID_Any | 1<<31); 00226 pConverter = PluginService::CreateWithId<IConverter*>(cnvid, typ, wanted, serviceLocator()); 00227 if ( 0 != pConverter ) { 00228 return pConverter; 00229 } 00230 } 00231 // If we do not have found any suitable container after searching 00232 // for standard containers, we will use the "ANY" converter 00233 // ... and pray for everything will go well. 00234 ConverterID cnvid(POOL_StorageType, CLID_Any); 00235 pConverter = PluginService::CreateWithId<IConverter*>(cnvid, typ, wanted, serviceLocator()); 00236 if ( 0 != pConverter ) { 00237 MsgStream log(msgSvc(), name()); 00238 log << MSG::INFO << "Using \"Any\" converter " 00239 << "for objects of type " 00240 << std::showbase << std::hex << wanted << endmsg; 00241 } 00242 } 00243 return pConverter; 00244 }
| void PoolDbCnvSvc::loadConverter | ( | DataObject * | pObject | ) | [virtual] |
ConversionSvc overload: Load the class (dictionary) for the converter.
Reimplemented from ConversionSvc.
Definition at line 246 of file PoolDbCnvSvc.cpp.
00246 { 00247 if (pObject) { 00248 MsgStream log(msgSvc(), name()); 00249 std::string cname = System::typeinfoName(typeid(*pObject)); 00250 log << MSG::DEBUG << "Trying to 'Autoload' dictionary for class " << cname << endmsg; 00251 gInterpreter->EnableAutoLoading(); 00252 gInterpreter->AutoLoad(cname.c_str()); 00253 } 00254 }
| virtual IPoolCacheSvc* PoolDbCnvSvc::cacheSvc | ( | ) | const [inline, virtual] |
Access to cache service.
Implements IPoolDbMgr.
Definition at line 157 of file PoolDbCnvSvc.h.
00157 { return m_cacheSvc; }
| 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.
Implements IPoolDbMgr.
| virtual StatusCode PoolDbCnvSvc::connectOutput | ( | const std::string & | outputFile, | |
| const std::string & | openMode | |||
| ) | [virtual] |
Connect the output file to the service with open mode.
| outputFile | String containig output file | |
| openMode | String containig opening mode of the output file |
Reimplemented from ConversionSvc.
| StatusCode PoolDbCnvSvc::connectDatabase | ( | int | typ, | |
| const std::string & | outputFile, | |||
| pool::DbAccessMode | openMode, | |||
| PoolDbDataConnection ** | con | |||
| ) |
Connect the output file to the service with open mode.
| outputFile | String containig output file | |
| openMode | Opening mode of the output file | |
| con | Data connection reference |
| 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.
| 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 |
| 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.
| 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 |
Implements IPoolDbMgr.
| virtual StatusCode PoolDbCnvSvc::connectOutput | ( | const std::string & | outputFile | ) | [virtual] |
Connect the output file to the service.
| outputFile | String containig output file |
Reimplemented from ConversionSvc.
| virtual StatusCode PoolDbCnvSvc::commitOutput | ( | const std::string & | outputFile, | |
| bool | do_commit | |||
| ) | [virtual] |
Commit pending output.
| outputFile | String containig output file | |
| do_commit | if true commit the output and flush eventually pending items to the database if false, discard pending buffers. Note: The possibility to commit or rollback depends on the database technology used! |
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.
| dbName | String containing name of the database | |
| cntName | String containing the name of the container object | |
| cntH | Reference to the POOL container object |
Implements IPoolDbMgr.
| virtual StatusCode PoolDbCnvSvc::disconnect | ( | const std::string & | dbName | ) | [virtual] |
Disconnect from an existing data stream.
| dbName | String containing name of the database |
Implements IPoolDbMgr.
| 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 infotmation together with the triple (database name/container name/object name).
| refLink | Reference to abstract link information | |
| dbName | Database name | |
| containerName | Object container name | |
| refpAddress | Opaque address information to retrieve object |
Reimplemented from ConversionSvc.
Definition at line 468 of file PoolDbCnvSvc.cpp.
00473 { 00474 PoolDbAddress* pA = 0; 00475 pool::Guid guid = pool::Guid::null(); 00476 std::auto_ptr<pool::Token> tok(new pool::Token()); 00477 guid.Data1 = clid; 00478 tok->setDb(par[0]); 00479 tok->setCont(par[1]); 00480 tok->setTechnology(typ); 00481 tok->setClassID(guid); 00482 tok->oid().first = ip[0]; 00483 tok->oid().second = ip[1]; 00484 if ( createAddress(tok.get(), &pA).isSuccess() ) { 00485 refpAddress = pA; 00486 tok->release(); 00487 tok.release(); 00488 return S_OK; 00489 } 00490 return error("createAddress> Failed to create opaque address."); 00491 }
| StatusCode PoolDbCnvSvc::createAddress | ( | pool::Token * | pToken, | |
| PoolDbAddress ** | ppAddress | |||
| ) | [virtual] |
IPoolDbMgr implementation: Address creation.
Create an address using an existing POOL token object.
| pToken | Reference to valid POOL token object. | |
| ppAddress | Opaque address information to retrieve object |
Implements IPoolDbMgr.
Definition at line 494 of file PoolDbCnvSvc.cpp.
00494 { 00495 if ( pTok ) { 00496 *ppAdd = new PoolDbAddress(pTok); 00497 return S_OK; 00498 } 00499 return error("createAddress> Failed to create opaque address from POOL token."); 00500 }
| 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.
| criteria | Selection criteria to restrict iteration | |
| dbName | String containing name of the database | |
| cntName | String containing the name of the container object |
Implements IPoolDbMgr.
| virtual StatusCode PoolDbCnvSvc::markWrite | ( | pool::DataCallBack * | call, | |
| const std::string & | cntName, | |||
| PoolDbAddress ** | ppAddr = 0 | |||
| ) | [virtual] |
Marks a reference to be written.
| call | Pointer to callback object | |
| cntName | Container name the object should be written to. | |
| refpAddr | Persistent object location to be used for link setup. |
Implements IPoolDbMgr.
| StatusCode PoolDbCnvSvc::markUpdate | ( | pool::DataCallBack * | call, | |
| PoolDbAddress * | pAddr | |||
| ) | [virtual] |
Mark an object for update.
| call | Pointer to callback object | |
| pAddr | Persistent object location to be used for link setup. |
Implements IPoolDbMgr.
Definition at line 549 of file PoolDbCnvSvc.cpp.
00549 { 00550 if ( pA && call ) { 00551 pool::Token* tok = pA->token(); 00552 DbContainer cntH(POOL_StorageType); 00553 const DbTypeInfo* info = (const DbTypeInfo*)call->shape(); 00554 StatusCode sc = connectContainer(FID,tok->dbID(),tok->contID(),pool::UPDATE,info,cntH); 00555 if ( sc.isSuccess() ) { 00556 call->setHandler(&m_handler); 00557 if ( cntH.update(call, tok->oid()).isSuccess() ) { 00558 return S_OK; 00559 } 00560 return error("markUpdate> Failed to update object:"+tok->toString()); 00561 } 00562 MsgStream log(messageService(), name()); 00563 log << MSG::ERROR << "markUpdate> The container " 00564 << tok->dbID() << "::" << tok->contID() 00565 << " cannot be accessed." << endmsg 00566 << "Was this object really read from the container " 00567 << "the object token claims?" 00568 << endmsg; 00569 return S_FAIL; 00570 } 00571 return error("createRep> Invalid object address for update."); 00572 }
| 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.
| call | Pointer to callback object | |
| pAddr | Pointer to valid object address. |
Implements IPoolDbMgr.
Definition at line 575 of file PoolDbCnvSvc.cpp.
00575 { 00576 StatusCode sc = read(call, *pA->token()); 00577 if ( sc.isSuccess() || sc == BAD_DATA_CONNECTION ) { 00578 return sc; 00579 } 00580 std::string err="read> Cannot read object:"+pA->registry()->identifier()+" "; 00581 return error(err, false); 00582 }
| StatusCode PoolDbCnvSvc::read | ( | pool::DataCallBack * | call, | |
| pool::Token & | tok | |||
| ) | [virtual] |
Read existing object. Open transaction in read mode if not active.
| call | Pointer to callback object | |
| tok | Reference to pool token describing the object |
Implements IPoolDbMgr.
Definition at line 585 of file PoolDbCnvSvc.cpp.
00585 { 00586 try { 00587 DbContainer cntH(tok.technology()); 00588 const DbTypeInfo* info = (const DbTypeInfo*)call->shape(); 00589 StatusCode sc = connectContainer(FID,tok.dbID(),tok.contID(),pool::READ,info,cntH); 00590 if ( sc.isSuccess() ) { 00591 typedef pool::DbObjectHandle<pool::DbObject> ObjH; 00592 call->setHandler(&m_handler); 00593 return ObjH::openEx(cntH, tok, call, pool::READ).isSuccess() ? S_OK : S_FAIL; 00594 } 00595 else if ( sc == BAD_DATA_CONNECTION ) { 00596 return sc; 00597 } 00598 } 00599 catch (std::exception& e) { 00600 std::string err="read> Cannot read object:"+tok.toString()+" "; 00601 return error(err+e.what(), false); 00602 } 00603 catch (...) { 00604 std::string err = "read> Cannot read object:"+tok.toString(); 00605 return error(err+" [Unknown fatal exception]", false); 00606 } 00607 return error("read> Cannot read object:"+tok.toString(), false); 00608 }
std::string PoolDbCnvSvc::m_cacheSvcName [protected] |
Name of the POOL cache service instance to connect to.
Definition at line 66 of file PoolDbCnvSvc.h.
std::string PoolDbCnvSvc::m_implementation [protected] |
std::string PoolDbCnvSvc::m_serverConnect [protected] |
bool PoolDbCnvSvc::m_safeTransactions [protected] |
std::vector<std::string> PoolDbCnvSvc::m_domainOpts [protected] |
std::vector<std::string> PoolDbCnvSvc::m_databaseOpts [protected] |
std::vector<std::string> PoolDbCnvSvc::m_containerOpts [protected] |
IDataManagerSvc* PoolDbCnvSvc::m_dataMgr [protected] |
IPoolCacheSvc* PoolDbCnvSvc::m_cacheSvc [protected] |
PoolDbDataConnection* PoolDbCnvSvc::m_current [protected] |
pool::DbDefaultDataHandler PoolDbCnvSvc::m_handler [protected] |
pool::DbDomain PoolDbCnvSvc::m_domH [protected] |
std::string PoolDbCnvSvc::m_shareFiles [protected] |
Share files ? If set to YES, files will not be closed on finalize.
Definition at line 102 of file PoolDbCnvSvc.h.
bool PoolDbCnvSvc::m_checkFIDs [protected] |
Gaudi::IFileCatalog* PoolDbCnvSvc::m_catalog [protected] |
Gaudi::IIODataManager* PoolDbCnvSvc::m_ioMgr [protected] |