| The Gaudi Framework v32r1 (f65d50dc)

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
using | Action_bitmap = std::bitset< INVALID_ACTION+1 >
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

## ◆ Action_bitmap

using Io::Action_bitmap = typedef std::bitset<INVALID_ACTION + 1>

Definition at line 269 of file IFileMgr.h.

## ◆ bfcn_action_t

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

Definition at line 278 of file IFileMgr.h.

## ◆ bfcn_close_t

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

Definition at line 238 of file IFileMgr.h.

## ◆ bfcn_closeP_t

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

Definition at line 239 of file IFileMgr.h.

## ◆ bfcn_open_t

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

Definition at line 237 of file IFileMgr.h.

## ◆ bfcn_reopen_t

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

Definition at line 240 of file IFileMgr.h.

## ◆ bfcn_reopenP_t

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

Definition at line 241 of file IFileMgr.h.

## ◆ close_t

typedef int Io::close_t

Definition at line 234 of file IFileMgr.h.

## ◆ Fd

typedef int Io::Fd

Definition at line 159 of file IFileMgr.h.

## ◆ open_t

typedef int Io::open_t

Definition at line 233 of file IFileMgr.h.

## ◆ reopen_t

typedef int Io::reopen_t

Definition at line 235 of file IFileMgr.h.

## Enumeration Type Documentation

## ◆ Action

enum Io::Action

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

Definition at line 268 of file IFileMgr.h.

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

## ◆ IoFlag

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

## ◆ IoTech

enum Io::IoTech

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

Definition at line 146 of file IFileMgr.h.

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

## Function Documentation

## ◆ IoFlagFromName()

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

Definition at line 104 of file IFileMgr.h.

104 {
105 static const std::map<std::string, IoFlag> s_n = {{{"READ", Io::READ},
106 {"WRITE", Io::WRITE},
107 {"RDWR", Io::RDWR},
108 {"CREATE", Io::CREATE},
109 {"EXCL", Io::EXCL},
110 {"TRUNC", Io::TRUNC},
111 {"APPEND", Io::APPEND},
112 {"INVALID", Io::INVALID}}};
113
114 IoFlags fl( Io::INVALID );
115 size_t j( 0 ), k( 0 );
116 std::string fs;
117 while ( ( k = f.find( "|", j ) ) != std::string::npos ) {
118 fs = f.substr( j, k - j );
119 if ( s_n.find( fs ) == s_n.end() ) { return Io::INVALID; }
120 if ( fl.isInvalid() ) {
121 fl = s_n.at( fs );
122 } else {
123 fl = fl | s_n.at( fs );
124 }
125 j = k + 1;
126 }
127 fs = f.substr( j );
128 if ( s_n.find( fs ) == s_n.end() ) { return Io::INVALID; }
129 if ( fl.isInvalid() ) {
130 fl = s_n.at( fs );
131 } else {
132 fl = fl | s_n.at( fs );
133 }
134 return fl;
135 }
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)

## ◆ operator<<() [1/4]

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

Definition at line 137 of file IFileMgr.h.

137 { return s << IoFlagName( f ); }
gaudirun.s
string s
Definition: gaudirun.py:316

## ◆ operator<<() [2/4]

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

Definition at line 138 of file IFileMgr.h.

138 { return s << IoFlagName( f ); }
gaudirun.s
string s
Definition: gaudirun.py:316

## ◆ operator<<() [3/4]

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

Definition at line 148 of file IFileMgr.h.

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

## ◆ operator<<() [4/4]

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

Definition at line 271 of file IFileMgr.h.

271 {
272 static const std::array<const char*, INVALID_ACTION + 1> tbl = {
273 {"OPEN", "CLOSE", "REOPEN", "OPEN_ERR", "CLOSE_ERR", "REOPEN_ERR", "INVALID_ACTION"}};
274 return t < tbl.size() ? s << tbl[t] : s;
275 }
std::array::size
T size(T... args)
gaudirun.s
string s
Definition: gaudirun.py:316
std::array
STL class.