DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
dd4hep file source 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_source () | |
Default Constructor. More... | |
dd4hep_file_source (const dd4hep_file_source< T > &other) | |
Copy constructor. More... | |
dd4hep_file_source (handle_type h, dd4hep_file_flags flags) | |
Constructors taking file desciptors. More... | |
dd4hep_file_source (const char *name, BOOST_IOS::openmode mode=BOOST_IOS::in) | |
Constructors taking file desciptors. More... | |
void | open (handle_type h, dd4hep_file_flags flags) |
open overload taking file desciptors More... | |
void | open (const char *path, BOOST_IOS::openmode mode=BOOST_IOS::in) |
open overload taking C-style string More... | |
void | open (const std::string &path, BOOST_IOS::openmode mode=BOOST_IOS::in) |
open overload taking a std::string More... | |
template<typename Path > | |
void | open (const Path &path, BOOST_IOS::openmode mode=BOOST_IOS::in) |
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 | read (char_type *s, std::streamsize n) |
Read from input stream. More... | |
std::streamsize | read (char_type *s, std::streamsize n) |
Specialization for standard file descriptor files according to the posix standard. More... | |
std::streamsize | read (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 source extension to boost::iostreams
Basic data sources 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 47 of file IoStreams.h.
typedef descriptor::char_type dd4hep::dd4hep_file_source< T >::char_type |
Definition at line 143 of file IoStreams.h.
typedef dd4hep_file<T> dd4hep::dd4hep_file_source< T >::descriptor |
Definition at line 137 of file IoStreams.h.
typedef descriptor::handle_type dd4hep::dd4hep_file_source< T >::handle_type |
Definition at line 142 of file IoStreams.h.
|
inline |
Default Constructor.
Definition at line 151 of file IoStreams.h.
|
inline |
Copy constructor.
Definition at line 154 of file IoStreams.h.
|
inlineexplicit |
Constructors taking file desciptors.
Definition at line 158 of file IoStreams.h.
|
inlineexplicit |
Constructors taking file desciptors.
Definition at line 162 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 170 of file IoStreams.h.
|
inline |
open overload taking a Boost.Filesystem path
Definition at line 178 of file IoStreams.h.
|
inline |
open overload taking a std::string
Definition at line 174 of file IoStreams.h.
|
inline |
open overload taking file desciptors
Definition at line 166 of file IoStreams.h.
std::streamsize dd4hep::dd4hep_file< int >::read |
Specialization for standard file descriptor files according to the posix standard.
Definition at line 59 of file IoStreams.cpp.
std::streamsize dd4hep::dd4hep_file< TFile * >::read |
Specialization for the usage of TFile structures.
Definition at line 105 of file IoStreams.cpp.
std::streamsize dd4hep::dd4hep_file< T >::read |
Read from input stream.
std::streampos dd4hep::dd4hep_file< T >::seek |
Direct access: set file pointer of the stream.
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< int >::seek |
Specialization for standard file descriptor files according to the posix standard.
Definition at line 67 of file IoStreams.cpp.