Belle II Software development
|
A class to manage I/O for a chain of blocked files. More...
#include <PXDLocalDAQFile.h>
Public Member Functions | |
PXDLocalDAQFile (const std::string &filename) | |
Constructor. | |
~PXDLocalDAQFile () | |
Destructor. | |
PXDLocalDAQFile (const PXDLocalDAQFile &)=delete | |
No copying. | |
PXDLocalDAQFile & | operator= (const PXDLocalDAQFile &)=delete |
No assignment. | |
int | status () const |
Returns status after constructor call. | |
int | read (char *buf, int max) |
Read a record from a file. | |
int | read_data (char *data, size_t len) |
Read a record from a file. | |
Private Member Functions | |
void | openFile (std::string filename) |
actually open the file | |
Private Attributes | |
std::string | m_filename |
Name of the opened file. | |
int | m_fd { -1} |
file descriptor. | |
bool | m_compressed {false} |
is file bzip2 compressed? | |
std::unique_ptr< std::ios > | m_stream |
pointer to the filtering input or output stream | |
A class to manage I/O for a chain of blocked files.
Definition at line 22 of file PXDLocalDAQFile.h.
|
explicit |
Constructor.
Definition at line 25 of file PXDLocalDAQFile.cc.
~PXDLocalDAQFile | ( | ) |
Destructor.
Definition at line 65 of file PXDLocalDAQFile.cc.
|
private |
actually open the file
Definition at line 52 of file PXDLocalDAQFile.cc.
int read | ( | char * | buf, |
int | max | ||
) |
Read a record from a file.
Returns the data size read.
Definition at line 76 of file PXDLocalDAQFile.cc.
int read_data | ( | char * | data, |
size_t | len | ||
) |
Read a record from a file.
Returns the data size if successfully read, otherwise 0.
Definition at line 107 of file PXDLocalDAQFile.cc.
int status | ( | ) | const |
Returns status after constructor call.
If success, fd is returned. If not, -1
Definition at line 71 of file PXDLocalDAQFile.cc.
|
private |
is file bzip2 compressed?
Definition at line 48 of file PXDLocalDAQFile.h.
|
private |
file descriptor.
Definition at line 47 of file PXDLocalDAQFile.h.
|
private |
Name of the opened file.
Definition at line 46 of file PXDLocalDAQFile.h.
|
private |
pointer to the filtering input or output stream
Definition at line 49 of file PXDLocalDAQFile.h.