DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Protected Member Functions | Protected Attributes

Interface for implementing file inputs. More...

#include <dabc/DataIO.h>

Inheritance diagram for dabc::FileInput:
dabc::DataInput dabc::BinaryFileInput hadaq::HldInput mbs::LmdInput mbs::TextInput

Public Member Functions

virtual bool Read_Init (const WorkerRef &wrk, const Command &cmd)
 Initialize data input, using port and command. More...
 
virtual bool Read_Stat (dabc::Command cmd)
 Provide timeout value. More...
 
void SetIO (dabc::FileInterface *io)
 
virtual ~FileInput ()
 
- Public Member Functions inherited from dabc::DataInput
virtual unsigned Read_Complete (Buffer &buf)
 Complete reading of the buffer from source,. More...
 
virtual unsigned Read_Size ()
 Defines required buffer size for next operation. More...
 
virtual unsigned Read_Start (Buffer &buf)
 Prepare buffer for reading (if required) More...
 
virtual double Read_Timeout ()
 Provide timeout value. More...
 
Buffer ReadBuffer ()
 Reads complete buffer. More...
 
virtual ~DataInput ()
 

Protected Member Functions

void ClearCurrentFileName ()
 
const std::string & CurrentFileName () const
 
 FileInput (const dabc::Url &url)
 
bool InitFilesList ()
 
bool TakeNextFileName ()
 
- Protected Member Functions inherited from dabc::DataInput
virtual WorkerAddonRead_GetAddon ()
 Returns addon, provided by data input If specified, supposed that I/O object is double-deriver from DataInput and Addon. More...
 

Protected Attributes

std::string fCurrentName
 
std::string fFileName
 
dabc::Reference fFilesList
 
dabc::FileInterfacefIO
 
bool fLoop
 read file(s) in endless loop More...
 
double fReduce
 factor to reduce buffer size when reading More...
 

Detailed Description

Interface for implementing file inputs.

Provide convenient way for managing list of files as inputs.

Definition at line 246 of file DataIO.h.

Constructor & Destructor Documentation

◆ FileInput()

dabc::FileInput::FileInput ( const dabc::Url url)
protected

Definition at line 92 of file DataIO.cxx.

◆ ~FileInput()

dabc::FileInput::~FileInput ( )
virtual

Definition at line 105 of file DataIO.cxx.

Member Function Documentation

◆ InitFilesList()

bool dabc::FileInput::InitFilesList ( )
protected

Definition at line 125 of file DataIO.cxx.

◆ TakeNextFileName()

bool dabc::FileInput::TakeNextFileName ( )
protected

Definition at line 155 of file DataIO.cxx.

◆ CurrentFileName()

const std::string& dabc::FileInput::CurrentFileName ( ) const
inlineprotected

Definition at line 257 of file DataIO.h.

◆ ClearCurrentFileName()

void dabc::FileInput::ClearCurrentFileName ( )
inlineprotected

Definition at line 258 of file DataIO.h.

◆ SetIO()

void dabc::FileInput::SetIO ( dabc::FileInterface io)

Definition at line 115 of file DataIO.cxx.

◆ Read_Init()

bool dabc::FileInput::Read_Init ( const WorkerRef wrk,
const Command cmd 
)
virtual

Initialize data input, using port and command.

This is generic virtual method to initialize input, using configurations from Port and (or) from the Command

Parameters
[in]wrkreference on input port
[in]cmdreference on command object
Returns
false when method fails

Reimplemented from dabc::DataInput.

Reimplemented in dabc::BinaryFileInput, mbs::TextInput, mbs::LmdInput, and hadaq::HldInput.

Definition at line 139 of file DataIO.cxx.

◆ Read_Stat()

bool dabc::FileInput::Read_Stat ( dabc::Command  cmd)
virtual

Provide timeout value.

Take statistic from DataInput object

Reimplemented from dabc::DataInput.

Definition at line 167 of file DataIO.cxx.

Field Documentation

◆ fFileName

std::string dabc::FileInput::fFileName
protected

Definition at line 248 of file DataIO.h.

◆ fFilesList

dabc::Reference dabc::FileInput::fFilesList
protected

Definition at line 249 of file DataIO.h.

◆ fIO

dabc::FileInterface* dabc::FileInput::fIO
protected

Definition at line 250 of file DataIO.h.

◆ fCurrentName

std::string dabc::FileInput::fCurrentName
protected

Definition at line 251 of file DataIO.h.

◆ fLoop

bool dabc::FileInput::fLoop
protected

read file(s) in endless loop

Definition at line 252 of file DataIO.h.

◆ fReduce

double dabc::FileInput::fReduce
protected

factor to reduce buffer size when reading

Definition at line 253 of file DataIO.h.


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