| The Gaudi Framework v29r0 (ff2e7097)

- 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 294 of file IFileMgr.h.

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

Definition at line 254 of file IFileMgr.h.

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

Definition at line 255 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 253 of file IFileMgr.h.

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

Definition at line 256 of file IFileMgr.h.

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

Definition at line 257 of file IFileMgr.h.

typedef int Io::close_t

Definition at line 250 of file IFileMgr.h.

typedef int Io::Fd

Definition at line 171 of file IFileMgr.h.

typedef int Io::open_t

Definition at line 249 of file IFileMgr.h.

typedef int Io::reopen_t

Definition at line 251 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 284 of file IFileMgr.h.

284 { OPEN = 0, CLOSE, REOPEN, OPEN_ERR, CLOSE_ERR, REOPEN_ERR, INVALID_ACTION };
Io::REOPEN
Definition: IFileMgr.h:284
Io::OPEN
Definition: IFileMgr.h:284
Io::INVALID_ACTION
Definition: IFileMgr.h:284
Io::REOPEN_ERR
Definition: IFileMgr.h:284
Io::CLOSE
Definition: IFileMgr.h:284
Io::CLOSE_ERR
Definition: IFileMgr.h:284
Io::OPEN_ERR
Definition: IFileMgr.h:284

enum Io::IoFlag

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

Definition at line 26 of file IFileMgr.h.

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

enum Io::IoTech

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

Definition at line 157 of file IFileMgr.h.

157 { UNKNOWN, POSIX, ROOT, BS, HDF5, SQLITE };
Io::BS
Definition: IFileMgr.h:157
Io::ROOT
Definition: IFileMgr.h:157
Io::HDF5
Definition: IFileMgr.h:157
Io::SQLITE
Definition: IFileMgr.h:157
Io::POSIX
Definition: IFileMgr.h:157
Io::UNKNOWN
Definition: IFileMgr.h:157

## Function Documentation

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

Definition at line 110 of file IFileMgr.h.

111 {
112 static const std::map<std::string, IoFlag> s_n = {{{"READ", Io::READ},
113 {"WRITE", Io::WRITE},
114 {"RDWR", Io::RDWR},
115 {"CREATE", Io::CREATE},
116 {"EXCL", Io::EXCL},
117 {"TRUNC", Io::TRUNC},
118 {"APPEND", Io::APPEND},
119 {"INVALID", Io::INVALID}}};
120
121 IoFlags fl( Io::INVALID );
122 size_t j( 0 ), k( 0 );
123 std::string fs;
124 while ( ( k = f.find( "|", j ) ) != std::string::npos ) {
125 fs = f.substr( j, k - j );
126 if ( s_n.find( fs ) == s_n.end() ) {
127 return Io::INVALID;
128 }
129 if ( fl.isInvalid() ) {
130 fl = s_n.at( fs );
131 } else {
132 fl = fl | s_n.at( fs );
133 }
134 j = k + 1;
135 }
136 fs = f.substr( j );
137 if ( s_n.find( fs ) == s_n.end() ) {
138 return Io::INVALID;
139 }
140 if ( fl.isInvalid() ) {
141 fl = s_n.at( fs );
142 } else {
143 fl = fl | s_n.at( fs );
144 }
145 return fl;
146 }
Io::TRUNC
Definition: IFileMgr.h:33
Io::INVALID
Definition: IFileMgr.h:37
Io::RDWR
Definition: IFileMgr.h:29
std::map::end
T end(T...args)
Io::EXCL
Definition: IFileMgr.h:32
std::map
STL class.
std::string
STL class.
std::map::at
T at(T...args)
Io::WRITE
Definition: IFileMgr.h:28
Io::READ
Definition: IFileMgr.h:27
std::string::find
T find(T...args)
Io::APPEND
Definition: IFileMgr.h:35
Io::CREATE
Definition: IFileMgr.h:31
std::string::substr
T substr(T...args)

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

Definition at line 148 of file IFileMgr.h.

148 { return s << IoFlagName( f ); }

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

Definition at line 149 of file IFileMgr.h.

149 { return s << IoFlagName( f ); }

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

Definition at line 159 of file IFileMgr.h.

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

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

Definition at line 286 of file IFileMgr.h.

287 {
288 static const std::array<const char*, INVALID_ACTION + 1> tbl = {
289 {"OPEN", "CLOSE", "REOPEN", "OPEN_ERR", "CLOSE_ERR", "REOPEN_ERR", "INVALID_ACTION"}};
290 return t < tbl.size() ? s << tbl[t] : s;
291 }
std::array::size
T size(T...args)
gaudirun.s
string s
Definition: gaudirun.py:253
std::array
STL class.