stream  0.10.0
stream analysis framework
Public Member Functions | Protected Attributes
hadaq::HldFile Class Reference

Reading of HLD files. More...

#include <hadaq/HldFile.h>

Inheritance diagram for hadaq::HldFile:
dabc::BasicFile

Public Member Functions

bool OpenWrite (const char *fname, uint32_t rid=0)
 Open file with specified name for writing.
 
bool OpenRead (const char *fname)
 Opened file for reading. More...
 
void Close ()
 Close file.
 
uint32_t GetRunId () const
 Returns runid, assigned with the file.
 
bool eof () const
 When file open for reading, method returns true when file end was achieved.
 
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...
 
- Public Member Functions inherited from dabc::BasicFile
void SetIO (FileInterface *_io, bool _ioowner=false)
 
bool isOpened () const
 
bool isReading () const
 
bool isWriting () const
 
bool eof () const
 
int GetIntPar (const char *parname)
 Return integer file parameter.
 
bool GetStrPar (const char *parname, char *sbuf, int sbuflen)
 Return string file parameter.
 
bool IsRFIO ()
 Returns true when RFIO is used.
 

Protected Attributes

uint32_t fRunNumber
 ! run number
 
bool fEOF
 ! flag indicate that end-of-file was reached
 
- Protected Attributes inherited from dabc::BasicFile
FileInterfaceio
 ! interface to the file system
 
bool iowoner
 ! if true, io object owned by file
 
FileInterface::Handle fd
 ! file descriptor
 
bool fReadingMode
 ! reading/writing mode
 

Additional Inherited Members

- Protected Member Functions inherited from dabc::BasicFile
bool CloseBasicFile ()
 
void CheckIO ()
 

Detailed Description

Reading of HLD files.

Member Function Documentation

◆ OpenRead()

bool hadaq::HldFile::OpenRead ( const char *  fname)

Opened file for reading.

Internal buffer required when data read partially and must be kept there.

◆ ReadBuffer()

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.

◆ WriteBuffer()

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.


The documentation for this class was generated from the following files: