| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IODataManager.h
Go to the documentation of this file.
1 #ifndef GAUDIUTILS_IODATAMANAGER_H
2 #define GAUDIUTILS_IODATAMANAGER_H
3
4 // C++ include files
5 #include <map>
6 // Framework include files
7 #include "GaudiKernel/Service.h"
8 #include "GaudiUtils/IIODataManager.h"
9
10 class IIncidentSvc;
11
12 /*
13 * LHCb namespace declaration
14 */
15 namespace Gaudi {
16
17 // Forward declarations
18 class IFileCatalog;
19 class RawDataConnectionEntry;
20
29 class IODataManager : public extends1<Service, IIODataManager> {
30 protected:
31 typedef const std::string& CSTR;
32 struct Entry {
33 std::string type;
34 IoType ioType;
35 IDataConnection* connection;
36 bool keepOpen;
37 Entry(CSTR tech,bool k, IoType iot,IDataConnection* con)
38 : type(tech), ioType(iot), connection(con), keepOpen(k) {
39 }
40 };
41 typedef std::map<std::string,Entry*> ConnectionMap;
42 typedef std::map<std::string, std::string> FidMap;
43
45 std::string m_catalogSvcName;
47 int m_ageLimit;
49 bool m_useGFAL;
51 bool m_quarantine;
54 bool m_disablePFNWarning;
55
57 ConnectionMap m_connectionMap;
59 SmartIF<IFileCatalog> m_catalog;
61 FidMap m_fidMap;
62 StatusCode connectDataIO(int typ, IoType rw, CSTR fn, CSTR technology, bool keep,Connection* con);
63 StatusCode reconnect(Entry* e);
64 StatusCode error(CSTR msg, bool rethrow);
65 StatusCode establishConnection(Connection* con);
66
67 SmartIF<IIncidentSvc> m_incSvc;
68
69 public:
70
76 IODataManager(CSTR nam, ISvcLocator* loc);
77
79 virtual ~IODataManager() {}
80
82 virtual StatusCode initialize();
83
85 virtual StatusCode finalize();
86
88 virtual StatusCode connectRead(bool keep_open, Connection* ioDesc);
90 virtual StatusCode connectWrite(Connection* con,IoType mode=Connection::CREATE,CSTR doctype="UNKNOWN");
92 virtual StatusCode disconnect(Connection* ioDesc);
94 virtual Connection* connection(const std::string& dsn) const;
96 virtual Connections connections(const IInterface* owner) const;
98 virtual StatusCode read(Connection* ioDesc, void* const data, size_t len);
100 virtual StatusCode write(Connection* con, const void* data, int len);
102 virtual long long int seek(Connection* ioDesc, long long int where, int origin);
103 };
104 } // End namespace Gaudi
105 #endif // GAUDIUTILS_IODATAMANAGER_H