|
DABC (Data Acquisition Backbone Core)
2.9.9
|
HLD file implementation. More...
#include <hadaq/HldFile.h>
Public Member Functions | |
| void | Close () |
| Close file. More... | |
| bool | eof () const |
| When file open for reading, method returns true when file end was achieved. More... | |
| uint32_t | GetRunId () const |
| Returns runid, assigned with the file. More... | |
| HldFile () | |
| flag indicate that end-of-file was reached More... | |
| bool | OpenRead (const char *fname, const char *opt=0) |
| Opened file for reading. More... | |
| bool | OpenWrite (const char *fname, uint32_t rid=0, const char *opt=0) |
| Open file with specified name for writing. More... | |
| bool | ReadBuffer (void *ptr, uint32_t *bufsize, bool onlyevent=false) |
| Read one or several elements to provided user buffer When called, bufsize should has available buffer size, after call contains actual size read. More... | |
| bool | WriteBuffer (void *buf, uint32_t bufsize) |
| Write user buffer to file without reformatting User must be aware about correct formatting of data. More... | |
| ~HldFile () | |
Public Member Functions inherited from dabc::BasicFile | |
| BasicFile () | |
| bool | eof () const |
| int | GetIntPar (const char *parname) |
| Return integer file parameter. More... | |
| bool | GetStrPar (const char *parname, char *sbuf, int sbuflen) |
| Return string file parameter. More... | |
| bool | isOpened () const |
| bool | isReading () const |
| bool | IsRFIO () |
| Returns true when RFIO is used. More... | |
| bool | isWriting () const |
| void | SetIO (FileInterface *_io, bool _ioowner=false) |
| ~BasicFile () | |
Protected Attributes | |
| bool | fEOF |
| run number More... | |
| uint32_t | fRunNumber |
Protected Attributes inherited from dabc::BasicFile | |
| FileInterface::Handle | fd |
| if true, io object owned by file More... | |
| bool | fReadingMode |
| file descriptor More... | |
| FileInterface * | io |
| bool | iowoner |
| interface to the file system More... | |
Additional Inherited Members | |
Protected Member Functions inherited from dabc::BasicFile | |
| void | CheckIO () |
| bool | CloseBasicFile () |
| reading/writing mode More... | |
| hadaq::HldFile::HldFile | ( | ) |
flag indicate that end-of-file was reached
Definition at line 19 of file HldFile.cxx.
| hadaq::HldFile::~HldFile | ( | ) |
Definition at line 26 of file HldFile.cxx.
| bool hadaq::HldFile::OpenWrite | ( | const char * | fname, |
| uint32_t | rid = 0, |
||
| const char * | opt = 0 |
||
| ) |
Open file with specified name for writing.
Definition at line 31 of file HldFile.cxx.
| bool hadaq::HldFile::OpenRead | ( | const char * | fname, |
| const char * | opt = 0 |
||
| ) |
Opened file for reading.
Internal buffer required when data read partially and must be kept there.
Definition at line 63 of file HldFile.cxx.
| void hadaq::HldFile::Close | ( | ) |
Close file.
Definition at line 108 of file HldFile.cxx.
|
inline |
|
inline |
| bool hadaq::HldFile::ReadBuffer | ( | void * | ptr, |
| uint32_t * | bufsize, | ||
| bool | onlyevent = false |
||
| ) |
Read one or several elements to provided user buffer When called, bufsize should has available buffer size, after call contains actual size read.
If /param onlyevent=true, the only hadaq element will be read. Returns true if any data were successfully read.
Definition at line 139 of file HldFile.cxx.
| bool hadaq::HldFile::WriteBuffer | ( | void * | buf, |
| uint32_t | bufsize | ||
| ) |
Write user buffer to file without reformatting User must be aware about correct formatting of data.
Returns true if data was written.
Definition at line 126 of file HldFile.cxx.