| The Gaudi Framework v32r1 (f65d50dc)

IFileMgr.h
Go to the documentation of this file.
1 // IFileMgr.h
3 // Manages all file open/reopen/close
4 // Author: C.Leggett
6
7 #ifndef GAUDIKERNEL_IFILEMGR_H
8 #define GAUDIKERNEL_IFILEMGR_H 1
9
10 #include "GaudiKernel/ClassID.h"
11 #include "GaudiKernel/IService.h"
12
13 #include <bitset>
14 #include <fcntl.h>
15 #include <functional>
16 #include <map>
17 #include <string>
18 #include <vector>
19
20 namespace Io {
21
22 //
23 // Io modes
24 //
25
26 enum IoFlag {
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 };
39
40 class IoFlags final {
41 public:
42 IoFlags() = default;
43 IoFlags( int i ) : _f( i ){};
44
45 int f() const { return _f; }
46
47 bool operator==( const IoFlags& fa ) const { return ( _f == fa.f() ); }
48 bool operator==( const int& fa ) const { return ( _f == fa ); }
49
50 IoFlags operator|( const IoFlags& fa ) const { return ( _f | fa.f() ); }
51 IoFlags operator|( const int& fa ) const { return ( _f | fa ); }
52
53 operator int() const { return _f; }
54
55 bool isRead() const { return ( _f == READ ); }
56 bool isWrite() const { return ( ( _f & WRITE ) != 0 ); }
57 bool isRdWr() const { return ( ( _f & RDWR ) != 0 ); }
58 bool isInvalid() const { return ( ( _f & INVALID ) != 0 ); }
59
60 bool match( const IoFlags& fa, bool strict = true ) const {
61 if ( strict ) { return ( _f == fa ); }
62 // only look at first 2 bits
63 return ( ( _f & 3 ) == ( fa & 3 ) );
64 }
65
66 std::string bits() const {
67 std::string s;
68 int f( _f );
69 const int SHIFT = 8 * sizeof( int ) - 1;
70 const unsigned MASK = 1 << SHIFT;
71
72 for ( int i = 1; i <= SHIFT + 1; ++i ) {
73 s += ( f & MASK ? '1' : '0' );
74 f <<= 1;
75 if ( i % 8 == 0 ) s += ' ';
76 }
77 return s;
78 }
79
80 private:
81 int _f = INVALID;
82 };
83
84 static std::string IoFlagName( IoFlags f ) {
85 static const std::map<IoFlag, std::string> s_names = {{{READ, "READ"},
86 {WRITE, "WRITE"},
87 {RDWR, "RDWR"},
88 {CREATE, "CREATE"},
89 {EXCL, "EXCL"},
90 {TRUNC, "TRUNC"},
91 {APPEND, "APPEND"},
92 {INVALID, "INVALID"}}};
93 if ( f.isRead() ) return s_names.at( READ );
94
95 std::string ff;
96 for ( int i = 0; i < 32; ++i ) {
97 auto b = ( 1 << i );
98 if ( b & f ) ff += s_names.at( ( IoFlag )( b ) ) + "|";
99 }
100 ff.erase( ff.length() - 1 );
101 return ff;
102 }
103
104 inline IoFlags IoFlagFromName( const std::string& f ) {
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 }
136
137 inline std::ostream& operator<<( std::ostream& s, const IoFlag& f ) { return s << IoFlagName( f ); }
138 inline std::ostream& operator<<( std::ostream& s, const IoFlags& f ) { return s << IoFlagName( f ); }
139
140 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
141
142 //
143 // Technologies
144 //
145
146 enum IoTech { UNKNOWN, POSIX, ROOT, BS, HDF5, SQLITE };
147
148 inline std::ostream& operator<<( std::ostream& s, const IoTech& t ) {
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 }
152
153 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
154
155 //
156 // File Attributes
157 //
158
159 typedef int Fd;
160
161 class FileAttr final {
162 public:
163 FileAttr() = default;
164 FileAttr( Fd f, std::string n, std::string d, IoTech t, IoFlags fa, void* p, bool o, bool s = false )
165 : m_fd( f )
166 , m_name( std::move( n ) )
167 , m_desc( std::move( d ) )
168 , m_tech( t )
169 , m_flags( fa )
170 , m_iflags( fa )
171 , m_fptr( p )
172 , m_isOpen( o )
173 , m_shared( s ){};
174
175 Fd fd() const { return m_fd; }
176 const std::string& name() const { return m_name; }
177 const std::string& desc() const { return m_desc; }
178 IoTech tech() const { return m_tech; }
179 IoFlags flags() const { return m_flags; }
180 IoFlags iflags() const { return m_iflags; }
181 void* fptr() const { return m_fptr; }
182 bool isOpen() const { return m_isOpen; }
183 bool isShared() const { return m_shared; }
184
185 void fd( Fd f ) { m_fd = f; }
186 void name( const std::string& n ) { m_name = n; }
187 void desc( const std::string& d ) { m_desc = d; }
188 void tech( const IoTech& t ) { m_tech = t; }
189 void flags( const IoFlags& f ) { m_flags = f; }
190 void iflags( const IoFlags& f ) { m_iflags = f; }
191 void fptr( void* v ) { m_fptr = v; }
192 void isOpen( bool b ) { m_isOpen = b; }
193 void isShared( bool s ) { m_shared = s; }
194
195 friend std::ostream& operator<<( std::ostream& os, const FileAttr& fa ) {
196 os << "name: \"" << fa.name() << "\" tech: " << fa.tech() << " desc: " << fa.desc()
197 << " flags: " << IoFlagName( fa.flags() ) << " i_flags: " << IoFlagName( fa.iflags() ) << " Fd: " << fa.fd()
198 << " ptr: " << fa.fptr() << ( fa.isOpen() ? " [o]" : " [c]" ) << ( fa.isShared() ? " [s]" : " [u]" );
199 return os;
200 }
201
202 bool operator==( const FileAttr& fa ) const {
203 return ( m_fd == fa.fd() && m_name == fa.name() && m_desc == fa.desc() && m_tech == fa.tech() &&
204 m_flags == fa.flags() && m_fptr == fa.fptr() && m_isOpen == fa.isOpen() && m_shared == fa.isShared() );
205 }
206
207 bool operator<( const FileAttr& rhs ) const {
208 if ( m_name != rhs.name() ) {
209 return ( m_name < rhs.name() );
210 } else {
211 return ( m_flags < rhs.iflags() );
212 }
213 }
214
215 private:
216 Fd m_fd = -1;
217 std::string m_name;
218 std::string m_desc;
219 IoTech m_tech = UNKNOWN;
220 IoFlags m_flags = INVALID;
221 IoFlags m_iflags = INVALID;
222 void* m_fptr = nullptr;
223 bool m_isOpen = false;
224 bool m_shared = false;
225 };
226
227 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
228
229 //
230 // Handler functions
231 //
232
233 typedef int open_t;
234 typedef int close_t;
235 typedef int reopen_t;
236
237 typedef std::function<Io::open_t( const std::string&, Io::IoFlags, const std::string&, Io::Fd&, void*& )> bfcn_open_t;
238 typedef std::function<Io::close_t( Io::Fd )> bfcn_close_t;
239 typedef std::function<Io::close_t( void* )> bfcn_closeP_t;
240 typedef std::function<Io::reopen_t( Io::Fd, Io::IoFlags )> bfcn_reopen_t;
241 typedef std::function<Io::reopen_t( void*, Io::IoFlags )> bfcn_reopenP_t;
242
243 // file handler functions: open, close, reopen
244 struct FileHdlr final {
245 IoTech tech = UNKNOWN;
246
247 bfcn_open_t b_open_fcn;
248 bfcn_close_t b_close_fcn;
249 bfcn_closeP_t b_closeP_fcn;
250 bfcn_reopen_t b_reopen_fcn;
251 bfcn_reopenP_t b_reopenP_fcn;
252
253 FileHdlr() = default;
254 FileHdlr( IoTech t, bfcn_open_t o, bfcn_close_t c, bfcn_reopen_t r )
255 : tech( t ), b_open_fcn( o ), b_close_fcn( c ), b_reopen_fcn( r ){};
256 FileHdlr( IoTech t, bfcn_open_t o, bfcn_closeP_t c, bfcn_reopenP_t r )
257 : tech( t ), b_open_fcn( o ), b_closeP_fcn( c ), b_reopenP_fcn( r ){};
258 FileHdlr( IoTech t, bfcn_open_t o, bfcn_close_t c1, bfcn_closeP_t c2, bfcn_reopen_t r1, bfcn_reopenP_t r2 )
259 : tech( t ), b_open_fcn( o ), b_close_fcn( c1 ), b_closeP_fcn( c2 ), b_reopen_fcn( r1 ), b_reopenP_fcn( r2 ){};
260 };
261
262 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
263
264 //
265 // Callback Actions
266 //
267
268 enum Action { OPEN = 0, CLOSE, REOPEN, OPEN_ERR, CLOSE_ERR, REOPEN_ERR, INVALID_ACTION };
269 using Action_bitmap = std::bitset<INVALID_ACTION + 1>;
270
271 inline std::ostream& operator<<( std::ostream& s, const Action& t ) {
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 }
276
277 #define FILEMGR_CALLBACK_ARGS const Io::FileAttr*, const std::string&
278 typedef std::function<StatusCode( FILEMGR_CALLBACK_ARGS )> bfcn_action_t;
279 } // namespace Io
280
281 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
282 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
283
284 class GAUDI_API IFileMgr : virtual public IService {
285
286 public:
287 DeclareInterfaceID( IFileMgr, 1, 0 );
288
289 // register handler function for file technology
290 virtual StatusCode regHandler( Io::FileHdlr ) = 0;
291
292 virtual StatusCode deregHandler( const Io::IoTech& ) = 0;
293
294 virtual StatusCode hasHandler( const Io::IoTech& ) const = 0;
295
296 // get handler from technology
297 virtual StatusCode getHandler( const Io::IoTech&, Io::FileHdlr& ) const = 0;
298 // get handler from file name
299 virtual StatusCode getHandler( const std::string&, Io::FileHdlr& ) const = 0;
300
301 // get file attributes from file name
302 virtual int getFileAttr( const std::string&, std::vector<const Io::FileAttr*>& ) const = 0;
303 // get file attributes from file descriptor
304 virtual StatusCode getFileAttr( const Io::Fd, const Io::FileAttr*& ) const = 0;
305 // get file attributes from file ptr
306 virtual StatusCode getFileAttr( void*, const Io::FileAttr*& ) const = 0;
307
308 virtual void listHandlers() const = 0;
309 virtual void listFiles() const = 0;
310
311 // get all files known to mgr. return numbers found.
312 // will replace contents of FILES
313 virtual int getFiles( std::vector<std::string>& FILES, bool onlyOpen = true ) const = 0;
314 virtual int getFiles( std::vector<const Io::FileAttr*>& FILES, bool onlyOpen = true ) const = 0;
315
316 // get all files of specific IoTech. returns number found.
317 // will replace contents of FILES
318 virtual int getFiles( const Io::IoTech&, std::vector<std::string>& FILES, bool onlyOpen = true ) const = 0;
319 virtual int getFiles( const Io::IoTech&, std::vector<const Io::FileAttr*>& FILES, bool onlyOpen = true ) const = 0;
320
321 // get all file of specific IoTech and access mode.
322 // will replace contents of FILES
323 // If IoTech == UNKNOWN, get all. returns number found
324 virtual int getFiles( const Io::IoTech&, const Io::IoFlags&, std::vector<std::string>& FILES,
325 bool onlyOpen = true ) const = 0;
326 virtual int getFiles( const Io::IoTech&, const Io::IoFlags&, std::vector<const Io::FileAttr*>& FILES,
327 bool onlyOpen = true ) const = 0;
328
329 // get all descriptors known to mgr. returns number found
330 virtual int getFd( std::vector<Io::Fd>& ) const = 0;
331 // get all descriptors of specific IoTech. return number found
332 virtual int getFd( const Io::IoTech&, std::vector<Io::Fd>& ) const = 0;
333 // get all descriptors of specific IoTech and access mode.
334 // If IoTech == INVALID, get all. returns number found
335 virtual int getFd( const Io::IoTech&, const Io::IoFlags&, std::vector<Io::Fd>& ) const = 0;
336
337 // get file name given Fd or ptr. Returns empty string if fails
338 virtual const std::string& fname( const Io::Fd& ) const = 0;
339 virtual const std::string& fname( void* ) const = 0;
340
341 // get Fd given file name. Returns -1 if fails
342 virtual Io::Fd fd( const std::string& ) const = 0;
343 virtual Io::Fd fd( void* fptr ) const = 0;
344
345 // get ptr given file name. Returns 0 if fails
346 virtual void* fptr( const std::string& ) const = 0;
347 virtual void* fptr( const Io::Fd& ) const = 0;
348
349 virtual int getLastError( std::string& ) const = 0;
350
351 // Open file, get Fd and ptr
352 virtual Io::open_t open( const Io::IoTech&, const std::string& caller, const std::string& fname, const Io::IoFlags&,
353 Io::Fd&, void*&, const std::string& desc, const bool shared = false ) = 0;
354
355 // Open file, get Fd
356 virtual Io::open_t open( const Io::IoTech&, const std::string& caller, const std::string& fname, const Io::IoFlags&,
357 Io::Fd&, const std::string& desc, const bool shared = false ) = 0;
358
359 // Open file, get ptr
360 virtual Io::open_t open( const Io::IoTech&, const std::string& caller, const std::string& fname, const Io::IoFlags&,
361 void*&, const std::string& desc, const bool shared = false ) = 0;
362
363 // Close file by Fd or ptr
364 virtual Io::close_t close( const Io::Fd, const std::string& caller ) = 0;
365 virtual Io::close_t close( void*, const std::string& caller ) = 0;
366
367 // Reopen file by Fd or ptr
368 virtual Io::reopen_t reopen( const Io::Fd, const Io::IoFlags&, const std::string& ) = 0;
369 virtual Io::reopen_t reopen( void*, const Io::IoFlags&, const std::string& ) = 0;
370
371 // Callback actions
372 virtual StatusCode regAction( Io::bfcn_action_t, const Io::Action&, const std::string& d = "" ) = 0;
373 virtual StatusCode regAction( Io::bfcn_action_t, const Io::Action&, const Io::IoTech&,
374 const std::string& d = "" ) = 0;
375
376 // Suppress callback action(s) for specific file.
377 virtual void suppressAction( const std::string& ) = 0;
378 virtual void suppressAction( const std::string&, const Io::Action& ) = 0;
379 };
380 #endif
Io::bfcn_reopenP_t
std::function< Io::reopen_t(void *, Io::IoFlags)> bfcn_reopenP_t
Definition: IFileMgr.h:241
Io::IoTech
IoTech
Definition: IFileMgr.h:146
Io::IoFlags::operator|
IoFlags operator|(const IoFlags &fa) const
Definition: IFileMgr.h:50
ClassID.h
Io::FileAttr::flags
void flags(const IoFlags &f)
Definition: IFileMgr.h:189
Io::BS
Definition: IFileMgr.h:146
Io
Definition: IFileMgr.h:20
gaudirun.fd
fd
Definition: gaudirun.py:559
Io::ROOT
Definition: IFileMgr.h:146
Io::HDF5
Definition: IFileMgr.h:146
System::getLastError
GAUDI_API unsigned long getLastError()
Get last system known error.
Definition: System.cpp:252
Io::FileAttr::m_fd
Fd m_fd
Definition: IFileMgr.h:216
gaudirun.c
c
Definition: gaudirun.py:487
IFileMgr
Definition: IFileMgr.h:284
Io::REOPEN
Definition: IFileMgr.h:268
Io::TRUNC
Definition: IFileMgr.h:33
std::function
Io::OPEN
Definition: IFileMgr.h:268
Io::FileAttr::m_flags
IoFlags m_flags
Definition: IFileMgr.h:220
Io::reopen_t
int reopen_t
Definition: IFileMgr.h:235
Io::Fd
int Fd
Definition: IFileMgr.h:159
Io::FileAttr::m_tech
IoTech m_tech
Definition: IFileMgr.h:219
Io::FileAttr::m_iflags
IoFlags m_iflags
Definition: IFileMgr.h:221
Io::INVALID
Definition: IFileMgr.h:37
Io::FileHdlr::b_reopen_fcn
bfcn_reopen_t b_reopen_fcn
Definition: IFileMgr.h:250
Io::IoFlag
IoFlag
Definition: IFileMgr.h:26
Io::FileAttr::name
void name(const std::string &n)
Definition: IFileMgr.h:186
Io::bfcn_close_t
std::function< Io::close_t(Io::Fd)> bfcn_close_t
Definition: IFileMgr.h:238
Io::FileAttr::FileAttr
FileAttr()=default
Io::FileAttr::name
const std::string & name() const
Definition: IFileMgr.h:176
Io::open_t
int open_t
Definition: IFileMgr.h:233
std
STL namespace.
Io::FileAttr::tech
IoTech tech() const
Definition: IFileMgr.h:178
Io::RDWR
Definition: IFileMgr.h:29
Io::bfcn_reopen_t
std::function< Io::reopen_t(Io::Fd, Io::IoFlags)> bfcn_reopen_t
Definition: IFileMgr.h:240
Io::FileAttr::fptr
void * fptr() const
Definition: IFileMgr.h:181
std::map::end
T end(T... args)
Io::IoFlags::f
int f() const
Definition: IFileMgr.h:45
Io::IoFlags::operator==
bool operator==(const int &fa) const
Definition: IFileMgr.h:48
Io::bfcn_open_t
std::function< Io::open_t(const std::string &, Io::IoFlags, const std::string &, Io::Fd &, void *&)> bfcn_open_t
Definition: IFileMgr.h:237
Io::EXCL
Definition: IFileMgr.h:32
Io::INVALID_ACTION
Definition: IFileMgr.h:268
Io::IoFlags::isWrite
bool isWrite() const
Definition: IFileMgr.h:56
Io::FileHdlr::FileHdlr
FileHdlr(IoTech t, bfcn_open_t o, bfcn_close_t c, bfcn_reopen_t r)
Definition: IFileMgr.h:254
Io::FileAttr::fd
Fd fd() const
Definition: IFileMgr.h:175
Io::REOPEN_ERR
Definition: IFileMgr.h:268
std::map
STL class.
Io::FileAttr::fptr
void fptr(void *v)
Definition: IFileMgr.h:191
Io::FileAttr::flags
IoFlags flags() const
Definition: IFileMgr.h:179
std::string
STL class.
Io::CLOSE
Definition: IFileMgr.h:268
FILEMGR_CALLBACK_ARGS
#define FILEMGR_CALLBACK_ARGS
Definition: IFileMgr.h:277
Io::FileAttr::isShared
bool isShared() const
Definition: IFileMgr.h:183
Io::IoFlags::IoFlags
IoFlags(int i)
Definition: IFileMgr.h:43
Io::bfcn_closeP_t
std::function< Io::close_t(void *)> bfcn_closeP_t
Definition: IFileMgr.h:239
Io::FileAttr::FileAttr
FileAttr(Fd f, std::string n, std::string d, IoTech t, IoFlags fa, void *p, bool o, bool s=false)
Definition: IFileMgr.h:164
Io::Action
Action
Definition: IFileMgr.h:268
std::map::at
T at(T... args)
Io::CLOSE_ERR
Definition: IFileMgr.h:268
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:210
Io::SQLITE
Definition: IFileMgr.h:146
Io::FileAttr::iflags
void iflags(const IoFlags &f)
Definition: IFileMgr.h:190
Io::FileAttr::m_fptr
void * m_fptr
Definition: IFileMgr.h:222
Io::POSIX
Definition: IFileMgr.h:146
Io::IoFlagFromName
IoFlags IoFlagFromName(const std::string &f)
Definition: IFileMgr.h:104
Io::FileAttr::m_isOpen
bool m_isOpen
Definition: IFileMgr.h:223
Io::WRITE
Definition: IFileMgr.h:28
Io::IoFlags::_f
int _f
Definition: IFileMgr.h:81
IService
General service interface definition.
Definition: IService.h:18
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
Io::IoFlags::isRdWr
bool isRdWr() const
Definition: IFileMgr.h:57
Io::FileAttr::fd
void fd(Fd f)
Definition: IFileMgr.h:185
Io::IoFlags
Definition: IFileMgr.h:40
Io::FileHdlr::b_close_fcn
bfcn_close_t b_close_fcn
Definition: IFileMgr.h:248
Io::operator<<
std::ostream & operator<<(std::ostream &s, const IoFlag &f)
Definition: IFileMgr.h:137
std::string::erase
T erase(T... args)
Io::FileHdlr
Definition: IFileMgr.h:244
Io::FileHdlr::b_closeP_fcn
bfcn_closeP_t b_closeP_fcn
Definition: IFileMgr.h:249
Io::FileAttr::m_desc
std::string m_desc
Definition: IFileMgr.h:218
Io::READ
Definition: IFileMgr.h:27
Io::FileHdlr::FileHdlr
FileHdlr(IoTech t, bfcn_open_t o, bfcn_closeP_t c, bfcn_reopenP_t r)
Definition: IFileMgr.h:256
Io::FileHdlr::b_reopenP_fcn
bfcn_reopenP_t b_reopenP_fcn
Definition: IFileMgr.h:251
Io::FileAttr::isOpen
bool isOpen() const
Definition: IFileMgr.h:182
IService.h
Io::IoFlags::match
bool match(const IoFlags &fa, bool strict=true) const
Definition: IFileMgr.h:60
Io::IoFlags::operator==
bool operator==(const IoFlags &fa) const
Definition: IFileMgr.h:47
Io::FileAttr::desc
const std::string & desc() const
Definition: IFileMgr.h:177
Io::bfcn_action_t
std::function< StatusCode(FILEMGR_CALLBACK_ARGS)> bfcn_action_t
Definition: IFileMgr.h:278
Io::FileAttr::tech
void tech(const IoTech &t)
Definition: IFileMgr.h:188
Io::FileHdlr::FileHdlr
FileHdlr(IoTech t, bfcn_open_t o, bfcn_close_t c1, bfcn_closeP_t c2, bfcn_reopen_t r1, bfcn_reopenP_t r2)
Definition: IFileMgr.h:258
std::string::find
T find(T... args)
Io::APPEND
Definition: IFileMgr.h:35
std::string::length
T length(T... args)
Io::FileHdlr::b_open_fcn
bfcn_open_t b_open_fcn
Definition: IFileMgr.h:247
std::vector
STL class.
Io::FileAttr::operator<
bool operator<(const FileAttr &rhs) const
Definition: IFileMgr.h:207
Io::IoFlags::isInvalid
bool isInvalid() const
Definition: IFileMgr.h:58
Io::CREATE
Definition: IFileMgr.h:31
Io::IoFlags::bits
std::string bits() const
Definition: IFileMgr.h:66
Io::IoFlags::isRead
bool isRead() const
Definition: IFileMgr.h:55
gaudirun.s
string s
Definition: gaudirun.py:316
std::array
STL class.
Io::FileAttr::isOpen
void isOpen(bool b)
Definition: IFileMgr.h:192
std::string::substr
T substr(T... args)
IService::DeclareInterfaceID
DeclareInterfaceID(IService, 4, 0)
InterfaceID.
Io::FileAttr::desc
void desc(const std::string &d)
Definition: IFileMgr.h:187
Io::FileAttr::iflags
IoFlags iflags() const
Definition: IFileMgr.h:180
Io::UNKNOWN
Definition: IFileMgr.h:146
Io::IoFlags::IoFlags
IoFlags()=default
Io::FileAttr::m_name
std::string m_name
Definition: IFileMgr.h:217
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
std::ostream
STL class.
Io::IoFlags::operator|
IoFlags operator|(const int &fa) const
Definition: IFileMgr.h:51
Io::FileAttr::operator==
bool operator==(const FileAttr &fa) const
Definition: IFileMgr.h:202
std::bitset
STL class.
Io::FileHdlr::tech
IoTech tech
Definition: IFileMgr.h:245
Io::FileHdlr::FileHdlr
FileHdlr()=default
Io::OPEN_ERR
Definition: IFileMgr.h:268
Io::close_t
int close_t
Definition: IFileMgr.h:234
Io::FileAttr::operator<<
friend std::ostream & operator<<(std::ostream &os, const FileAttr &fa)
Definition: IFileMgr.h:195
Io::FileAttr::m_shared
bool m_shared
Definition: IFileMgr.h:224
Io::FileAttr::isShared
void isShared(bool s)
Definition: IFileMgr.h:193
Io::FileAttr
Definition: IFileMgr.h:161