00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef DBCNV_NTUPLES_DBUSERDATABASECNV_H
00010 #define DBCNV_NTUPLES_DBUSERDATABASECNV_H 1
00011
00012
00013 #include "GaudiDb/DbGenericConverter.h"
00014
00015
00016 class ISvcLocator;
00017 class IOODataBase;
00018 class DbAddress;
00019
00044 class DbUserDataBaseCnv : public DbGenericConverter {
00045 protected:
00047 DbUserDataBaseCnv( const CLID& clid, IOODataBase* db, ISvcLocator* svc )
00048 : DbGenericConverter(clid, db, svc) {
00049 m_persSvcName = m_cnvSvcName;
00050 m_dataSvcName = m_cnvSvcName.substr(0,m_cnvSvcName.rfind("."));
00051 }
00053 virtual ~DbUserDataBaseCnv() {
00054 }
00056 virtual const std::string containerName(IDataDirectory* pDir) const {
00057 const std::string& path = pDir->fullpath();
00058 long loc = path.find('/',1);
00059 std::string local = "<local>";
00060 if ( loc > 0 ) {
00061 loc = path.find('/',++loc);
00062 if ( loc > 0 ) {
00063 local += path.substr(loc,path.length()-loc);
00064 }
00065 }
00066 return local;
00067 }
00068 };
00069 #endif // DBCNV_NTUPLES_DBUSERDATABASECNV_H