![]() |
![]() |
DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep
Rev:Unversioneddirectory
|
DD4hep file handling extension to boost::iostreams. More...
#include <IoStreams.h>
Classes | |
struct | category |
Public Types | |
typedef T | handle_type |
typedef char | char_type |
typedef boost::iostreams::stream_offset | stream_offset |
typedef boost::iostreams::detail::path | detail_path |
Public Member Functions | |
dd4hep_file () | |
dd4hep_file (handle_type fd, dd4hep_file_flags) | |
dd4hep_file (const char *fname, BOOST_IOS::openmode mode) | |
void | open (handle_type fd, dd4hep_file_flags flags) |
void | open (const char *path, BOOST_IOS::openmode mode=BOOST_IOS::in|BOOST_IOS::out) |
bool | is_open () const |
void | close () |
std::streamsize | read (char_type *s, std::streamsize n) |
std::streamsize | write (const char_type *s, std::streamsize n) |
std::streampos | seek (stream_offset off, BOOST_IOS::seekdir way) |
handle_type | handle () const |
template<> | |
void | open (const char *path, BOOST_IOS::openmode mode) |
template<> | |
dd4hep_file (handle_type fd, dd4hep_file_flags flags) | |
template<> | |
dd4hep_file (const char *fn, BOOST_IOS::openmode mode) | |
template<> | |
std::streamsize | read (char_type *s, std::streamsize n) |
template<> | |
std::streamsize | write (const char_type *s, std::streamsize n) |
template<> | |
std::streampos | seek (stream_offset off, BOOST_IOS::seekdir way) |
template<> | |
void | close () |
template<> | |
void | open (const char *path, BOOST_IOS::openmode mode) |
template<> | |
dd4hep_file (handle_type fd, dd4hep_file_flags flags) | |
template<> | |
dd4hep_file (const char *fname, BOOST_IOS::openmode mode) | |
template<> | |
std::streamsize | read (char_type *s, std::streamsize n) |
template<> | |
std::streamsize | write (const char_type *s, std::streamsize n) |
template<> | |
std::streampos | seek (stream_offset off, BOOST_IOS::seekdir way) |
template<> | |
void | close () |
Private Attributes | |
handle_type | m_handle |
dd4hep_file_flags | m_flag |
Friends | |
class | dd4hep_file_source< T > |
class | dd4hep_file_sink< T > |
DD4hep file handling extension to boost::iostreams.
Basic file handling for data sources and data sinks. Please see boost::iostreams for details. This got inspired by boost::iostreams::device::file_descriptor
The final aim is to hide all this behind a TFile object, so that we get the entire network file handling for free!
Note: Credits go to a large extend to the authors of boost::iostreams. Without their work I could not have done this!
Definition at line 74 of file IoStreams.h.
typedef char DD4hep::dd4hep_file< T >::char_type |
Definition at line 79 of file IoStreams.h.
typedef boost::iostreams::detail::path DD4hep::dd4hep_file< T >::detail_path |
Definition at line 81 of file IoStreams.h.
typedef T DD4hep::dd4hep_file< T >::handle_type |
Definition at line 78 of file IoStreams.h.
typedef boost::iostreams::stream_offset DD4hep::dd4hep_file< T >::stream_offset |
Definition at line 80 of file IoStreams.h.
|
inline |
Definition at line 85 of file IoStreams.h.
DD4hep::dd4hep_file< T >::dd4hep_file | ( | handle_type | fd, |
dd4hep_file_flags | |||
) |
DD4hep::dd4hep_file< T >::dd4hep_file | ( | const char * | fname, |
BOOST_IOS::openmode | mode | ||
) |
DD4hep::dd4hep_file< int >::dd4hep_file | ( | handle_type | fd, |
dd4hep_file_flags | flags | ||
) |
Definition at line 54 of file IoStreams.cpp.
DD4hep::dd4hep_file< int >::dd4hep_file | ( | const char * | fn, |
BOOST_IOS::openmode | mode | ||
) |
Definition at line 58 of file IoStreams.cpp.
References DD4hep::dd4hep_file< T >::open().
DD4hep::dd4hep_file< TFile * >::dd4hep_file | ( | handle_type | fd, |
dd4hep_file_flags | flags | ||
) |
Definition at line 100 of file IoStreams.cpp.
DD4hep::dd4hep_file< TFile * >::dd4hep_file | ( | const char * | fname, |
BOOST_IOS::openmode | mode | ||
) |
Definition at line 104 of file IoStreams.cpp.
References DD4hep::dd4hep_file< T >::open().
void DD4hep::dd4hep_file< int >::close | ( | ) |
Definition at line 74 of file IoStreams.cpp.
void DD4hep::dd4hep_file< T >::close | ( | ) |
void DD4hep::dd4hep_file< TFile * >::close | ( | ) |
Definition at line 129 of file IoStreams.cpp.
|
inline |
Definition at line 102 of file IoStreams.h.
References DD4hep::dd4hep_file< T >::m_handle.
|
inline |
Definition at line 97 of file IoStreams.h.
References DD4hep::dd4hep_file< T >::m_handle.
void DD4hep::dd4hep_file< int >::open | ( | const char * | path, |
BOOST_IOS::openmode | mode | ||
) |
Definition at line 48 of file IoStreams.cpp.
void DD4hep::dd4hep_file< TFile * >::open | ( | const char * | path, |
BOOST_IOS::openmode | mode | ||
) |
Definition at line 80 of file IoStreams.cpp.
void DD4hep::dd4hep_file< T >::open | ( | handle_type | fd, |
dd4hep_file_flags | flags | ||
) |
void DD4hep::dd4hep_file< T >::open | ( | const char * | path, |
BOOST_IOS::openmode | mode = BOOST_IOS::in|BOOST_IOS::out |
||
) |
std::streamsize DD4hep::dd4hep_file< int >::read | ( | char_type * | s, |
std::streamsize | n | ||
) |
Definition at line 62 of file IoStreams.cpp.
std::streamsize DD4hep::dd4hep_file< T >::read | ( | char_type * | s, |
std::streamsize | n | ||
) |
std::streamsize DD4hep::dd4hep_file< TFile * >::read | ( | char_type * | s, |
std::streamsize | n | ||
) |
Definition at line 108 of file IoStreams.cpp.
References _p.
std::streampos DD4hep::dd4hep_file< int >::seek | ( | stream_offset | off, |
BOOST_IOS::seekdir | way | ||
) |
Definition at line 70 of file IoStreams.cpp.
std::streampos DD4hep::dd4hep_file< T >::seek | ( | stream_offset | off, |
BOOST_IOS::seekdir | way | ||
) |
std::streampos DD4hep::dd4hep_file< TFile * >::seek | ( | stream_offset | off, |
BOOST_IOS::seekdir | way | ||
) |
Definition at line 125 of file IoStreams.cpp.
References _p.
std::streamsize DD4hep::dd4hep_file< int >::write | ( | const char_type * | s, |
std::streamsize | n | ||
) |
Definition at line 66 of file IoStreams.cpp.
std::streamsize DD4hep::dd4hep_file< T >::write | ( | const char_type * | s, |
std::streamsize | n | ||
) |
std::streamsize DD4hep::dd4hep_file< TFile * >::write | ( | const char_type * | s, |
std::streamsize | n | ||
) |
Definition at line 121 of file IoStreams.cpp.
|
friend |
Definition at line 77 of file IoStreams.h.
|
friend |
Definition at line 76 of file IoStreams.h.
|
private |
Definition at line 105 of file IoStreams.h.
|
private |
Definition at line 104 of file IoStreams.h.
Referenced by DD4hep::dd4hep_file< T >::handle(), and DD4hep::dd4hep_file< T >::is_open().