Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

DbUserDataBaseCnv.h

Go to the documentation of this file.
00001 //====================================================================
00002 //  User data converter class definition
00003 //--------------------------------------------------------------------
00004 //
00005 //  Package    : DbCnv/NTuples ( The LHCb Offline System)
00006 //  Author     : M.Frank
00007 //
00008 //====================================================================
00009 #ifndef DBCNV_NTUPLES_DBUSERDATABASECNV_H
00010 #define DBCNV_NTUPLES_DBUSERDATABASECNV_H 1
00011 
00012 // Include files
00013 #include "GaudiDb/DbGenericConverter.h"
00014 
00015 // Forward declarations
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

Generated at Wed Nov 21 12:22:20 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000