| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

# IODataManager.h

Go to the documentation of this file.

    00001 #ifndef GAUDIUTILS_IODATAMANAGER_H
    00002 #define GAUDIUTILS_IODATAMANAGER_H
    00003
    00004 // C++ include files
    00005 #include <map>
    00006 // Framework include files
    00007 #include "GaudiKernel/Service.h"
    00008 #include "GaudiUtils/IIODataManager.h"
    00009
    00010 class IIncidentSvc;
    00011
    00012 /*
    00013  *  LHCb namespace declaration
    00014  */
    00015 namespace Gaudi  {
    00016
    00017   // Forward declarations
    00018   class IFileCatalog;
    00019   class RawDataConnectionEntry;
    00020
    00029   class IODataManager : public extends1<Service, IIODataManager> {
    00030   protected:
    00031     typedef const std::string& CSTR;
    00032     struct Entry  {
    00033       std::string      type;
    00034       IoType           ioType;
    00035       IDataConnection* connection;
    00036       bool             keepOpen;
    00037       Entry(CSTR tech,bool k, IoType iot,IDataConnection* con)
    00038       : type(tech), ioType(iot), connection(con), keepOpen(k) {
    00039       }
    00040     };
    00041     typedef std::map<std::string,Entry*>       ConnectionMap;
    00042     typedef std::map<std::string, std::string> FidMap;
    00043
    00045     std::string          m_catalogSvcName;
    00047     int                  m_ageLimit;
    00049     bool                 m_useGFAL;
    00051     bool                 m_quarantine;
    00052
    00054     ConnectionMap        m_connectionMap;
    00056     SmartIF<IFileCatalog> m_catalog;
    00058     FidMap               m_fidMap;
    00059     StatusCode connectDataIO(int typ, IoType rw, CSTR fn, CSTR technology, bool keep,Connection* con);
    00060     StatusCode reconnect(Entry* e);
    00061     StatusCode error(CSTR msg, bool rethrow);
    00062     StatusCode establishConnection(Connection* con);
    00063
    00064     SmartIF<IIncidentSvc> m_incSvc;
    00065
    00066   public:
    00067
    00073     IODataManager(CSTR nam, ISvcLocator* loc);
    00074
    00076     virtual ~IODataManager()  {}
    00077
    00079     virtual StatusCode initialize();
    00080
    00082     virtual StatusCode finalize();
    00083
    00085     virtual StatusCode connectRead(bool keep_open, Connection* ioDesc);
    00087     virtual StatusCode connectWrite(Connection* con,IoType mode=Connection::CREATE,CSTR doctype="UNKNOWN");
    00089     virtual StatusCode disconnect(Connection* ioDesc);
    00091     virtual Connection* connection(const std::string& dsn) const;
    00093     virtual Connections connections(const IInterface* owner) const;
    00095     virtual StatusCode read(Connection* ioDesc, void* const data, size_t len);
    00097     virtual StatusCode write(Connection* con, const void* data, int len);
    00099     virtual long long int seek(Connection* ioDesc, long long int where, int origin);
    00100   };
    00101 }         // End namespace Gaudi
    00102 #endif    // GAUDIUTILS_IODATAMANAGER_H

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