| # Gaudi Framework, version v23r0 |

Home |  | Generated: Mon Jan 30 2012

# RootCnvSvc.h

Go to the documentation of this file.

    00001 // $Id: RootCnvSvc.h,v 1.7 2010-09-14 06:01:12 frankb Exp $
    00002 //====================================================================
    00003 //      RootCnvSvc definition
    00004 //--------------------------------------------------------------------
    00005 //
    00006 //      Author     : M.Frank
    00007 //====================================================================
    00008 #ifndef GAUDIROOTCNV_GAUDIROOTCNVSVC_H
    00009 #define GAUDIROOTCNV_GAUDIROOTCNVSVC_H
    00010 // $Header: /afs/cern.ch/project/cvs/reps/lhcb/Online/RootCnv/src/RootCnvSvc.h,v 1.7 2010-09-14 06:01:12 frankb Exp $
    00011
    00012 // Framework include files
    00013 #include "GaudiKernel/ConversionSvc.h"
    00014 #include "GaudiKernel/DataObject.h"
    00015 #include "GaudiKernel/ClassID.h"
    00016
    00017 // C++ include files
    00018 #include <set>
    00019
    00020 // Forward declarations
    00021 class IDataManagerSvc;
    00022 class IIncidentSvc;
    00023 class TClass;
    00024
    00025 /*
    00026  * Gaudi namespace declaration
    00027  */
    00028 namespace Gaudi {
    00029
    00030   // Forward declarations
    00031   class IIODataManager;
    00032   class IDataConnection;
    00033   class RootDataConnection;
    00034   class RootConnectionSetup;
    00035
    00046   class GAUDI_API RootCnvSvc : public ConversionSvc  {
    00047   protected:
    00048
    00050     Gaudi::IIODataManager*      m_ioMgr;
    00052     IIncidentSvc*               m_incidentSvc;
    00054     Gaudi::RootDataConnection*  m_current;
    00056     TClass*                     m_classRefs;
    00058     TClass*                     m_classDO;
    00060     RootConnectionSetup*        m_setup;
    00062     std::string                 m_currSection;
    00063
    00065     bool                        m_incidentEnabled;
    00067     std::string                 m_shareFiles;
    00069     std::string                 m_recordName;
    00071     std::string                 m_ioPerfStats;
    00073     std::set<std::string>       m_badFiles;
    00074
    00076     MsgStream*                  m_log;
    00077
    00079     TClass* getClass(DataObject* pObject);
    00081     MsgStream& log() const {   return *m_log; }
    00082
    00083   public:
    00084
    00086     RootCnvSvc(const std::string& name, ISvcLocator* svc);
    00087
    00089     virtual ~RootCnvSvc();
    00090
    00092     virtual StatusCode updateServiceState(IOpaqueAddress* /* pAddress */)
    00093     { return StatusCode::SUCCESS;                  }
    00094
    00100     StatusCode error(const std::string& msg);
    00101
    00108     StatusCode connectDatabase(const std::string& dataset, int mode, RootDataConnection** con);
    00109
    00110   public:
    00111
    00113     //const std::string& section() const { return m_section; }
    00114
    00116     virtual StatusCode initialize();
    00117
    00119     virtual StatusCode finalize();
    00120
    00122     virtual IConverter* createConverter(long typ,
    00123                                         const CLID& wanted,
    00124                                         const ICnvFactory* fac);
    00125
    00127     virtual void loadConverter(DataObject* pObj);
    00128
    00135     virtual StatusCode connectOutput(const std::string& outputFile,
    00136                                      const std::string& openMode);
    00137
    00143     virtual StatusCode connectOutput(const std::string& outputFile);
    00144
    00155     virtual StatusCode commitOutput(const std::string& outputFile,
    00156                                     bool               do_commit);
    00157
    00163     virtual StatusCode disconnect(const std::string& dbName);
    00164
    00176     virtual StatusCode createAddress( long                 svc_type,
    00177                                       const CLID&          clid,
    00178                                       const std::string*   par,
    00179                                       const unsigned long* ip,
    00180                                       IOpaqueAddress*&     refpAddress);
    00181
    00191     virtual StatusCode createAddress( long svc_type,
    00192                                       const CLID& clid,
    00193                                       const std::string& refAddress,
    00194                                       IOpaqueAddress*& refpAddress) {
    00195       return this->ConversionSvc::createAddress(svc_type,clid,refAddress,refpAddress);
    00196     }
    00197
    00204     virtual StatusCode createNullRep(const std::string& path);
    00205
    00212     virtual StatusCode createNullRef(const std::string& path);
    00213
    00221     virtual StatusCode i__createRep(DataObject* pObj, IOpaqueAddress*& refpAddr);
    00222
    00223
    00231     virtual StatusCode i__fillRepRefs(IOpaqueAddress* pAddr,DataObject* pObj);
    00232
    00240     virtual StatusCode i__createObj(IOpaqueAddress* pAddr, DataObject*& refpObj);
    00241
    00249     virtual StatusCode i__fillObjRefs(IOpaqueAddress* pAddr, DataObject* pObj);
    00250   };
    00251 }
    00252
    00253 #endif  // GAUDIROOTCNV_GAUDIROOTCNVSVC_H

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