| The Gaudi Framework v27r1

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

- Namespace List
- Namespace Members

Classes | Typedefs | Enumerations | Functions
Io Namespace Reference

## Classes
class | FileAttr
struct | FileHdlr
class | IoFlags

## Typedefs
typedef int | Fd
typedef int | open_t
typedef int | close_t
typedef int | reopen_t
typedef std::function< Io::open_t(const std::string &, Io::IoFlags, const std::string &, Io::Fd &, void *&)> | bfcn_open_t
typedef std::function< Io::close_t(Io::Fd)> | bfcn_close_t
typedef std::function< Io::close_t(void *)> | bfcn_closeP_t
typedef std::function< Io::reopen_t(Io::Fd, Io::IoFlags)> | bfcn_reopen_t
typedef std::function< Io::reopen_t(void *, Io::IoFlags)> | bfcn_reopenP_t
typedef std::function< StatusCode(FILEMGR_CALLBACK_ARGS) > | bfcn_action_t

## Enumerations
enum | IoFlag { READ = O_RDONLY, WRITE = O_WRONLY, RDWR = O_RDWR, CREATE = O_CREAT, EXCL = O_EXCL, TRUNC = O_TRUNC, APPEND = O_APPEND, INVALID = 1<<31 }
enum | IoTech { UNKNOWN, POSIX, ROOT, BS, HDF5, SQLITE }
enum | Action { OPEN = 0, CLOSE, REOPEN, OPEN_ERR, CLOSE_ERR, REOPEN_ERR, INVALID_ACTION }

## Functions
IoFlags | IoFlagFromName (const std::string &f)
std::ostream & | operator<< (std::ostream &s, const IoFlag &f)
std::ostream & | operator<< (std::ostream &s, const IoFlags &f)
std::ostream & | operator<< (std::ostream &s, const IoTech &t)
std::ostream & | operator<< (std::ostream &s, const Action &t)

## Typedef Documentation

typedef std::function<StatusCode (FILEMGR_CALLBACK_ARGS) > Io::bfcn_action_t

Definition at line 309 of file IFileMgr.h.

typedef std::function<Io::close_t(Io::Fd)> Io::bfcn_close_t

Definition at line 257 of file IFileMgr.h.

typedef std::function<Io::close_t(void*)> Io::bfcn_closeP_t

Definition at line 258 of file IFileMgr.h.

typedef std::function<Io::open_t(const std::string&, Io::IoFlags, const std::string&, Io::Fd&, void*&)> Io::bfcn_open_t

Definition at line 256 of file IFileMgr.h.

typedef std::function<Io::reopen_t(Io::Fd,Io::IoFlags)> Io::bfcn_reopen_t

Definition at line 259 of file IFileMgr.h.

typedef std::function<Io::reopen_t(void*,Io::IoFlags)> Io::bfcn_reopenP_t

Definition at line 260 of file IFileMgr.h.

typedef int Io::close_t

Definition at line 253 of file IFileMgr.h.

typedef int Io::Fd

Definition at line 172 of file IFileMgr.h.

typedef int Io::open_t

Definition at line 252 of file IFileMgr.h.

typedef int Io::reopen_t

Definition at line 254 of file IFileMgr.h.

## Enumeration Type Documentation

enum Io::Action

Enumerator
OPEN |
CLOSE |
REOPEN |
OPEN_ERR |
CLOSE_ERR |
REOPEN_ERR |
INVALID_ACTION |

Definition at line 290 of file IFileMgr.h.

290 {
291 OPEN = 0,
292 CLOSE,
293 REOPEN,
294 OPEN_ERR,
295 CLOSE_ERR,
296 REOPEN_ERR,
297 INVALID_ACTION
298 };
Io::REOPEN
Definition: IFileMgr.h:293
Io::OPEN
Definition: IFileMgr.h:291
Io::INVALID_ACTION
Definition: IFileMgr.h:297
Io::REOPEN_ERR
Definition: IFileMgr.h:296
Io::CLOSE
Definition: IFileMgr.h:292
Io::CLOSE_ERR
Definition: IFileMgr.h:295
Io::OPEN_ERR
Definition: IFileMgr.h:294

enum Io::IoFlag

Enumerator
READ |
WRITE |
RDWR |
CREATE |
EXCL |
TRUNC |
APPEND |
INVALID |

Definition at line 25 of file IFileMgr.h.

25 {
26 READ = O_RDONLY,
27 WRITE = O_WRONLY,
28 RDWR = O_RDWR,
29
30 CREATE = O_CREAT,
31 EXCL = O_EXCL,
32 TRUNC = O_TRUNC,
33
34 APPEND = O_APPEND,
35
36 INVALID = 1<<31
37 };
Io::TRUNC
Definition: IFileMgr.h:32
Io::INVALID
Definition: IFileMgr.h:36
Io::RDWR
Definition: IFileMgr.h:28
Io::EXCL
Definition: IFileMgr.h:31
Io::WRITE
Definition: IFileMgr.h:27
Io::READ
Definition: IFileMgr.h:26
Io::APPEND
Definition: IFileMgr.h:34
Io::CREATE
Definition: IFileMgr.h:30

enum Io::IoTech

Enumerator
UNKNOWN |
POSIX |
ROOT |
BS |
HDF5 |
SQLITE |

Definition at line 150 of file IFileMgr.h.

150 {
151 UNKNOWN,
152 POSIX,
153 ROOT,
154 BS,
155 HDF5,
156 SQLITE
157 };
Io::BS
Definition: IFileMgr.h:154
Io::ROOT
Definition: IFileMgr.h:153
Io::HDF5
Definition: IFileMgr.h:155
Io::SQLITE
Definition: IFileMgr.h:156
Io::POSIX
Definition: IFileMgr.h:152
Io::UNKNOWN
Definition: IFileMgr.h:151

## Function Documentation

IoFlags Io::IoFlagFromName | ( | const std::string & | f | ) |
| inline

Definition at line 102 of file IFileMgr.h.

102 {
103 static const std::map<std::string, IoFlag> s_n = { {
104 { "READ", Io::READ }, { "WRITE", Io::WRITE }, { "RDWR", Io::RDWR },
105 { "CREATE", Io::CREATE }, { "EXCL", Io::EXCL }, { "TRUNC", Io::TRUNC},
106 { "APPEND", Io::APPEND }, { "INVALID", Io::INVALID } } };
107
108 IoFlags fl(Io::INVALID);
109 size_t j(0),k(0);
110 std::string fs;
111 while ( (k=f.find("|",j)) != std::string::npos) {
112 fs = f.substr(j,k-j);
113 if (s_n.find(fs) == s_n.end()) {
114 return Io::INVALID;
115 }
116 if (fl.isInvalid()) {
117 fl = s_n.at(fs);
118 } else {
119 fl = fl | s_n.at(fs);
120 }
121 j = k+1;
122 }
123 fs = f.substr(j);
124 if (s_n.find(fs) == s_n.end()) {
125 return Io::INVALID;
126 }
127 if (fl.isInvalid()) {
128 fl = s_n.at(fs);
129 } else {
130 fl = fl | s_n.at(fs);
131 }
132 return fl;
133
134 }
Io::TRUNC
Definition: IFileMgr.h:32
Io::INVALID
Definition: IFileMgr.h:36
Io::RDWR
Definition: IFileMgr.h:28
std::map::end
T end(T...args)
Io::EXCL
Definition: IFileMgr.h:31
std::map
STL class.
std::string
STL class.
std::map::at
T at(T...args)
Io::WRITE
Definition: IFileMgr.h:27
Io::READ
Definition: IFileMgr.h:26
std::string::find
T find(T...args)
Io::APPEND
Definition: IFileMgr.h:34
Io::CREATE
Definition: IFileMgr.h:30
std::string::substr
T substr(T...args)

std::ostream& Io::operator<< | ( | std::ostream & | s,
|  | const IoFlag & | f
| ) |  |
| inline

Definition at line 136 of file IFileMgr.h.

136 {
137 return s << IoFlagName(f);
138 }

std::ostream& Io::operator<< | ( | std::ostream & | s,
|  | const IoFlags & | f
| ) |  |
| inline

Definition at line 139 of file IFileMgr.h.

139 {
140 return s << IoFlagName(f);
141
142 }

std::ostream& Io::operator<< | ( | std::ostream & | s,
|  | const IoTech & | t
| ) |  |
| inline

Definition at line 159 of file IFileMgr.h.

159 {
160 static const std::array<const char*, SQLITE+1> tbl = {
161 "UNKNOWN", "POSIX", "ROOT",
162 "BS", "HDF5", "SQLITE" };
163 return t < tbl.size() ? s << tbl[t] : s;
164 }
std::array::size
T size(T...args)
gaudirun.s
string s
Definition: gaudirun.py:245
std::array
STL class.

std::ostream& Io::operator<< | ( | std::ostream & | s,
|  | const Action & | t
| ) |  |
| inline

Definition at line 300 of file IFileMgr.h.

300 {
301 static const std::array<const char*, INVALID_ACTION+1> tbl = {
302 "OPEN", "CLOSE", "REOPEN",
303 "OPEN_ERR","CLOSE_ERR", "REOPEN_ERR",
304 "INVALID_ACTION" };
305 return t < tbl.size() ? s<< tbl[t] : s;
306 }
std::array::size
T size(T...args)
gaudirun.s
string s
Definition: gaudirun.py:245
std::array
STL class.