| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- File List
- File Members

# RConverter.h

Go to the documentation of this file.

    00001 // $Id: RConverter.h,v 1.8 2006/11/30 20:51:35 mato Exp $
    00002 #ifndef ROOTHISTCNV_RCONVERTER_H
    00003 #define ROOTHISTCNV_RCONVERTER_H 1
    00004
    00005 // Include files
    00006 #include "GaudiKernel/Converter.h"
    00007 #include "GaudiKernel/CnvFactory.h"
    00008 #include "TDirectory.h"
    00009 #include <string>
    00010 #include <map>
    00011
    00012 // Forward declarations
    00013 class ISvcLocator;
    00014 class TObject;
    00015 class TTree;
    00016 class TFile;
    00017
    00018 class GlobalDirectoryRestore  {
    00019   TDirectory* m_current;
    00020 public:
    00021   GlobalDirectoryRestore() {
    00022     m_current = gDirectory;
    00023   }
    00024   virtual ~GlobalDirectoryRestore()  {
    00025     gDirectory = m_current;
    00026   }
    00027 };
    00028
    00029 namespace RootHistCnv {
    00030
    00036   class RConverter : public Converter   {
    00037   public:
    00039     virtual StatusCode createRep(DataObject*      pObj,
    00040                                  IOpaqueAddress*& refpAddr);
    00042     static long storageType()    {         return ROOT_StorageType;    }
    00043     long repSvcType() const      {         return i_repSvcType();      }
    00044
    00045     StatusCode error(const std::string& msg);
    00046     StatusCode regTFile(const std::string, const TFile*);
    00047     StatusCode findTFile(const std::string, TFile*&);
    00048
    00049     std::string diskDirectory(const std::string& loc);
    00050     std::string directory(const std::string& loc);
    00051     void setDirectory(const std::string& loc);
    00052     void setDiskDirectory(const std::string& loc);
    00053     StatusCode createDirectory(const std::string& loc);
    00054     StatusCode createDiskDirectory(const std::string& loc);
    00055     std::string getDirectory();
    00056
    00057     std::string convertId(const std::string& ) const ;
    00058
    00059   protected:
    00061     RConverter( const CLID& clid, ISvcLocator* svc )
    00062     : Converter(storageType(), clid, svc)  {    }
    00064     virtual ~RConverter() {     }
    00066     virtual StatusCode readObject( IOpaqueAddress* pAddr,
    00067                                    DataObject*& refpObj);
    00069     virtual TObject* createPersistent(DataObject* pObj);
    00071     StatusCode createAddress( DataObject* pObject,
    00072                               TDirectory* pDir,
    00073                               TObject* pTObject,
    00074                               IOpaqueAddress*& refpAddr);
    00075
    00076     StatusCode createAddress(const std::string& rzdir,
    00077                              const CLID& clid,
    00078                              long id,
    00079                              TObject* pTobj,
    00080                              IOpaqueAddress*& refpAddress);
    00081
    00082     StatusCode createAddress(const std::string& rzdir,
    00083                              const CLID& clid,
    00084                              const std::string& title,
    00085                              TObject* pTobj,
    00086                              IOpaqueAddress*& refpAddress);
    00087
    00089     TDirectory* changeDirectory(DataObject* pObject);
    00090   };
    00091 };    // namespace RootHistCnv
    00092
    00093 #endif    // RootHistCnv_RConverter_H