ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaRoot
AthenaRootComps
src
IoSvc.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// IoSvc.h
8
// Header file for class IoSvc
9
// Author: S.Binet<binet@cern.ch>
11
#ifndef ATHENASERVICES_IOSVC_H
12
#define ATHENASERVICES_IOSVC_H 1
13
14
// STL includes
15
#include <string>
16
#include <unordered_map>
17
18
// FrameWork includes
19
#include "
AthenaBaseComps/AthService.h
"
20
21
// AthenaKernel
22
#include "
AthenaRootKernel/IIoSvc.h
"
23
24
// Forward declaration
25
class
ISvcLocator;
26
template
<
class
TYPE>
class
SvcFactory
;
27
28
29
30
class
IoSvc
31
:
public
extends<::AthService, ::IIoSvc>
32
{
33
friend
class
SvcFactory
<
IoSvc
>;
34
36
// Public methods:
38
public
:
39
typedef
IIoSvc::Fd
Fd
;
40
42
IoSvc
(
const
std::string& name, ISvcLocator* pSvcLocator );
43
45
virtual
~IoSvc
();
46
47
// Assignment operator:
48
//IoSvc &operator=(const IoSvc &alg);
49
51
52
virtual
StatusCode
initialize
()
override
;
53
virtual
StatusCode
finalize
()
override
;
55
57
// Const methods:
59
61
virtual
bool
has_fd
(
Fd
fd
)
const override
;
62
65
virtual
Fd
fd
(
const
std::string&
fname
)
const override
;
66
69
virtual
const
std::string&
fname
(
Fd
fd
)
const override
;
70
72
virtual
IoType
mode
(
Fd
fd
)
const override
;
73
75
// Non-const methods:
77
80
virtual
Fd
open
(
const
std::string&
fname
,
IoType
mode
)
override
;
81
83
virtual
StatusCode
close
(
Fd
fd
)
override
;
84
86
// Private data:
88
private
:
89
91
IoSvc
();
92
93
struct
FdInfos
{
94
std::string
fname
;
95
IIoSvc::IoType
mode
{};
96
};
97
98
typedef
std::unordered_map<Fd, FdInfos>
FdMap_t
;
99
101
FdMap_t
m_fds
;
102
104
Fd
m_last_fd
;
105
};
106
107
#endif
//> !ATHENASERVICES_IOSVC_H
AthService.h
IIoSvc.h
IoType
IIoSvc::IoType IoType
Definition
IoSvc.cxx:23
IIoSvc::IoType
IoType
I/O Connection types.
Definition
IIoSvc.h:41
IIoSvc::Fd
int Fd
unix-y file descriptor
Definition
IIoSvc.h:38
IoSvc::open
virtual Fd open(const std::string &fname, IoType mode) override
open file fname with open mode mode
Definition
IoSvc.cxx:120
IoSvc::mode
virtual IoType mode(Fd fd) const override
retrieve the open mode associated with file descriptor fd
Definition
IoSvc.cxx:108
IoSvc::fname
virtual const std::string & fname(Fd fd) const override
retrieve the file fname associated with file descriptor fd
Definition
IoSvc.cxx:96
IoSvc::fd
virtual Fd fd(const std::string &fname) const override
retrieve the file descriptor associated with file fname
Definition
IoSvc.cxx:79
IoSvc::initialize
virtual StatusCode initialize() override
Gaudi Service Implementation.
Definition
IoSvc.cxx:51
IoSvc::IoSvc
IoSvc()
Default constructor:
IoSvc::close
virtual StatusCode close(Fd fd) override
close file fd
Definition
IoSvc.cxx:147
IoSvc::m_last_fd
Fd m_last_fd
last created Fd
Definition
IoSvc.h:104
IoSvc::Fd
IIoSvc::Fd Fd
Definition
IoSvc.h:39
IoSvc::finalize
virtual StatusCode finalize() override
Definition
IoSvc.cxx:58
IoSvc::FdMap_t
std::unordered_map< Fd, FdInfos > FdMap_t
Definition
IoSvc.h:98
IoSvc::m_fds
FdMap_t m_fds
map of fd->fdinfos
Definition
IoSvc.h:101
IoSvc::IoSvc
IoSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition
IoSvc.cxx:31
IoSvc::~IoSvc
virtual ~IoSvc()
Destructor:
Definition
IoSvc.cxx:46
IoSvc::has_fd
virtual bool has_fd(Fd fd) const override
test if a given file descriptor fd is known to us
Definition
IoSvc.cxx:71
SvcFactory
Definition
AthCnvSvc.h:28
IoSvc::FdInfos
Definition
IoSvc.h:93
IoSvc::FdInfos::fname
std::string fname
Definition
IoSvc.h:94
IoSvc::FdInfos::mode
IIoSvc::IoType mode
Definition
IoSvc.h:95
Generated on
for ATLAS Offline Software by
1.17.0