DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
dd4hep file sink extension to boost::iostreams More...
#include <IoStreams.h>
Classes | |
struct | category |
Helper structure to define boost::iostreams. More... | |
Public Types | |
typedef dd4hep_file< T > | descriptor |
typedef descriptor::handle_type | handle_type |
typedef descriptor::char_type | char_type |
Public Member Functions | |
dd4hep_file_sink () | |
Default constructor. More... | |
dd4hep_file_sink (const dd4hep_file_sink< T > &other) | |
Copy constructor. More... | |
dd4hep_file_sink (handle_type fd, dd4hep_file_flags flags) | |
Constructors taking file desciptors. More... | |
dd4hep_file_sink (const std::string &path, BOOST_IOS::openmode mode=BOOST_IOS::out) | |
Constructor taking a std::string. More... | |
dd4hep_file_sink (const char *path, BOOST_IOS::openmode mode=BOOST_IOS::out) | |
Constructor taking a C-style string. More... | |
template<typename Path > | |
dd4hep_file_sink (const Path &path, BOOST_IOS::openmode mode=BOOST_IOS::out) | |
Constructor taking a Boost.Filesystem path. More... | |
void | open (handle_type fd, dd4hep_file_flags flags) |
open overloads taking file descriptors More... | |
void | open (const std::string &path, BOOST_IOS::openmode mode=BOOST_IOS::out) |
open overload taking a std::string More... | |
void | open (const char *path, BOOST_IOS::openmode mode=BOOST_IOS::out) |
open overload taking C-style string More... | |
template<typename Path > | |
void | open (const Path &path, BOOST_IOS::openmode mode=BOOST_IOS::out) |
open overload taking a Boost.Filesystem path More... | |
bool | is_open () const |
Check if the file stream is opened. More... | |
void | close () |
Close the file stream. More... | |
void | close () |
Specialization for standard file descriptor files according to the posix standard. More... | |
void | close () |
Specialization for the usage of TFile structures. More... | |
std::streamsize | write (const char_type *s, std::streamsize n) |
Write to output stream. More... | |
std::streamsize | write (const char_type *s, std::streamsize n) |
Specialization for standard file descriptor files according to the posix standard. More... | |
std::streamsize | write (const char_type *s, std::streamsize n) |
Specialization for the usage of TFile structures. More... | |
std::streampos | seek (stream_offset off, BOOST_IOS::seekdir way) |
Direct access: set file pointer of the stream. More... | |
std::streampos | seek (stream_offset off, BOOST_IOS::seekdir way) |
Specialization for standard file descriptor files according to the posix standard. More... | |
std::streampos | seek (stream_offset off, BOOST_IOS::seekdir way) |
Specialization for the usage of TFile structures. More... | |
handle_type | handle () const |
Access to native stream handle. More... | |
dd4hep file sink extension to boost::iostreams
Basic data sink implementation. 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 48 of file IoStreams.h.
typedef descriptor::char_type dd4hep::dd4hep_file_sink< T >::char_type |
Definition at line 209 of file IoStreams.h.
typedef dd4hep_file<T> dd4hep::dd4hep_file_sink< T >::descriptor |
Definition at line 203 of file IoStreams.h.
typedef descriptor::handle_type dd4hep::dd4hep_file_sink< T >::handle_type |
Definition at line 208 of file IoStreams.h.
|
inline |
Default constructor.
Definition at line 217 of file IoStreams.h.
|
inline |
Copy constructor.
Definition at line 220 of file IoStreams.h.
|
inlineexplicit |
Constructors taking file desciptors.
Definition at line 224 of file IoStreams.h.
|
inlineexplicit |
Constructor taking a std::string.
Definition at line 228 of file IoStreams.h.
|
inlineexplicit |
Constructor taking a C-style string.
Definition at line 232 of file IoStreams.h.
|
inlineexplicit |
Constructor taking a Boost.Filesystem path.
Definition at line 237 of file IoStreams.h.
void dd4hep::dd4hep_file< T >::close |
Close the file stream.
void dd4hep::dd4hep_file< TFile * >::close |
Specialization for the usage of TFile structures.
Definition at line 126 of file IoStreams.cpp.
void dd4hep::dd4hep_file< int >::close |
Specialization for standard file descriptor files according to the posix standard.
Definition at line 71 of file IoStreams.cpp.
|
inline |
Access to native stream handle.
Definition at line 107 of file IoStreams.h.
|
inline |
Check if the file stream is opened.
Definition at line 105 of file IoStreams.h.
|
inline |
open overload taking C-style string
Definition at line 249 of file IoStreams.h.
|
inline |
open overload taking a Boost.Filesystem path
Definition at line 253 of file IoStreams.h.
|
inline |
open overload taking a std::string
Definition at line 245 of file IoStreams.h.
|
inline |
open overloads taking file descriptors
Definition at line 241 of file IoStreams.h.
std::streampos dd4hep::dd4hep_file< TFile * >::seek |
Specialization for the usage of TFile structures.
Definition at line 122 of file IoStreams.cpp.
std::streampos dd4hep::dd4hep_file< T >::seek |
Direct access: set file pointer of the stream.
std::streampos dd4hep::dd4hep_file< int >::seek |
Specialization for standard file descriptor files according to the posix standard.
Definition at line 67 of file IoStreams.cpp.
std::streamsize dd4hep::dd4hep_file< int >::write |
Specialization for standard file descriptor files according to the posix standard.
Definition at line 63 of file IoStreams.cpp.
std::streamsize dd4hep::dd4hep_file< TFile * >::write |
Specialization for the usage of TFile structures.
Definition at line 118 of file IoStreams.cpp.
std::streamsize dd4hep::dd4hep_file< T >::write |
Write to output stream.