DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Protected Member Functions | Protected Attributes
hadaq::HldOutput Class Reference

Implementation of file output for HLD files. More...

#include <hadaq/HldOutput.h>

Inheritance diagram for hadaq::HldOutput:
dabc::FileOutput dabc::DataOutput

Public Member Functions

 HldOutput (const dabc::Url &url)
 
virtual unsigned Write_Buffer (dabc::Buffer &buf)
 Start writing of buffer to output. More...
 
virtual bool Write_Init ()
 This is generic virtual method to initialize output before real work is started. More...
 
virtual bool Write_Restart (dabc::Command cmd)
 Method used to restart output - like recreate new output file. More...
 
virtual bool Write_Retry ()
 Returns true if output object can be reinitialized for recover error. More...
 
virtual bool Write_Stat (dabc::Command cmd)
 Fill different statistic parameters into provided command. More...
 
virtual ~HldOutput ()
 
- Public Member Functions inherited from dabc::FileOutput
virtual std::string ProvideInfo ()
 Method can be used to get debug info about output. More...
 
void SetIO (dabc::FileInterface *io)
 
virtual ~FileOutput ()
 
- Public Member Functions inherited from dabc::DataOutput
void SetInfoParName (const std::string &name)
 Methods set parameter name, which could be used for debug output. More...
 
virtual unsigned Write_Check ()
 Check if output can be done. More...
 
virtual unsigned Write_Complete ()
 Complete writing of the buffer. More...
 
virtual void Write_Flush ()
 Flush output object, called when buffer with EOL type is appeared. More...
 
virtual double Write_Timeout ()
 Timeout in seconds for write operation. More...
 
bool WriteBuffer (Buffer &buf)
 Write buffer to the output. More...
 
virtual ~DataOutput ()
 

Protected Member Functions

bool CloseFile ()
 
bool StartNewFile ()
 
char * Unit (unsigned long v)
 
- Protected Member Functions inherited from dabc::FileOutput
void AccountBuffer (unsigned sz, int numev=0)
 
bool CheckBufferForNextFile (unsigned sz)
 Return true if new file should be started. More...
 
const std::string & CurrentFileName () const
 
 FileOutput (const dabc::Url &url, const std::string &ext="")
 
int GetSizeLimitMB () const
 
std::string ProduceFileName (const std::string &suffix)
 
void ProduceNewFileName ()
 
- Protected Member Functions inherited from dabc::DataOutput
 DataOutput (const dabc::Url &url)
 
void ShowInfo (int lvl, const std::string &info)
 
virtual WorkerAddonWrite_GetAddon ()
 Returns addon, provided by data output If specified, supposed that I/O object is double-derived from DataOutput and Addon. More...
 

Protected Attributes

uint16_t fEBNumber
 id of parent event builder process More...
 
uint32_t fEventNumber
 used to count event numbers when writing plain subevents More...
 
hadaq::HldFile fFile
 
std::string fLastPrefix
 last prefix submitted from BNet master More...
 
uint32_t fLastRunNumber
 id number of last written run More...
 
bool fLtsm
 true if we write to ltsm More...
 
bool fPlainName
 if true no any runid extensions appended to file name More...
 
bool fRfio
 true if we write to rfio More...
 
std::string fRunInfoToOraFilename
 
uint32_t fRunNumber
 id number of current run (can be 0 when data are ignored) More...
 
bool fRunSlave
 true if run id is controlled by combiner More...
 
std::string fUrlOptions
 remember URL options, may be used for RFIO file open More...
 
bool fUseDaqDisk
 true if /data number is taken from daq_disk (HADES setup) More...
 
- Protected Attributes inherited from dabc::FileOutput
std::string fCurrentFileName
 
int fCurrentFileNumber
 
long fCurrentFileSize
 
std::string fFileExtens
 
std::string fFileName
 
dabc::FileInterfacefIO
 
int fSizeLimitMB
 
long fTotalFileSize
 
long fTotalNumBufs
 
long fTotalNumEvents
 
- Protected Attributes inherited from dabc::DataOutput
std::string fInfoName
 

Detailed Description

Implementation of file output for HLD files.

Definition at line 31 of file HldOutput.h.

Constructor & Destructor Documentation

◆ HldOutput()

hadaq::HldOutput::HldOutput ( const dabc::Url url)

Definition at line 34 of file HldOutput.cxx.

◆ ~HldOutput()

hadaq::HldOutput::~HldOutput ( )
virtual

Definition at line 79 of file HldOutput.cxx.

Member Function Documentation

◆ CloseFile()

bool hadaq::HldOutput::CloseFile ( )
protected

Definition at line 200 of file HldOutput.cxx.

◆ StartNewFile()

bool hadaq::HldOutput::StartNewFile ( )
protected

Definition at line 100 of file HldOutput.cxx.

◆ Unit()

char* hadaq::HldOutput::Unit ( unsigned long  v)
protected

◆ Write_Init()

bool hadaq::HldOutput::Write_Init ( )
virtual

This is generic virtual method to initialize output before real work is started.

If returns false, object is immediately deleted

Reimplemented from dabc::FileOutput.

Definition at line 85 of file HldOutput.cxx.

◆ Write_Retry()

bool hadaq::HldOutput::Write_Retry ( )
virtual

Returns true if output object can be reinitialized for recover error.

Reimplemented from dabc::DataOutput.

Definition at line 191 of file HldOutput.cxx.

◆ Write_Buffer()

unsigned hadaq::HldOutput::Write_Buffer ( dabc::Buffer buf)
virtual

Start writing of buffer to output.

Return values: do_Ok - operation is started, Write_Complete() must be called do_Error - error do_Skip - buffer must be skipped do_Close - output is closed

Reimplemented from dabc::DataOutput.

Definition at line 239 of file HldOutput.cxx.

◆ Write_Stat()

bool hadaq::HldOutput::Write_Stat ( dabc::Command  cmd)
virtual

Fill different statistic parameters into provided command.

Reimplemented from dabc::FileOutput.

Definition at line 226 of file HldOutput.cxx.

◆ Write_Restart()

bool hadaq::HldOutput::Write_Restart ( dabc::Command  cmd)
virtual

Method used to restart output - like recreate new output file.

Reimplemented from dabc::DataOutput.

Definition at line 211 of file HldOutput.cxx.

Field Documentation

◆ fRunSlave

bool hadaq::HldOutput::fRunSlave
protected

true if run id is controlled by combiner

Definition at line 34 of file HldOutput.h.

◆ fLastRunNumber

uint32_t hadaq::HldOutput::fLastRunNumber
protected

id number of last written run

Definition at line 35 of file HldOutput.h.

◆ fRunNumber

uint32_t hadaq::HldOutput::fRunNumber
protected

id number of current run (can be 0 when data are ignored)

Definition at line 36 of file HldOutput.h.

◆ fEventNumber

uint32_t hadaq::HldOutput::fEventNumber
protected

used to count event numbers when writing plain subevents

Definition at line 37 of file HldOutput.h.

◆ fEBNumber

uint16_t hadaq::HldOutput::fEBNumber
protected

id of parent event builder process

Definition at line 38 of file HldOutput.h.

◆ fUseDaqDisk

bool hadaq::HldOutput::fUseDaqDisk
protected

true if /data number is taken from daq_disk (HADES setup)

Definition at line 39 of file HldOutput.h.

◆ fRfio

bool hadaq::HldOutput::fRfio
protected

true if we write to rfio

Definition at line 40 of file HldOutput.h.

◆ fLtsm

bool hadaq::HldOutput::fLtsm
protected

true if we write to ltsm

Definition at line 41 of file HldOutput.h.

◆ fPlainName

bool hadaq::HldOutput::fPlainName
protected

if true no any runid extensions appended to file name

Definition at line 42 of file HldOutput.h.

◆ fUrlOptions

std::string hadaq::HldOutput::fUrlOptions
protected

remember URL options, may be used for RFIO file open

Definition at line 43 of file HldOutput.h.

◆ fLastPrefix

std::string hadaq::HldOutput::fLastPrefix
protected

last prefix submitted from BNet master

Definition at line 44 of file HldOutput.h.

◆ fRunInfoToOraFilename

std::string hadaq::HldOutput::fRunInfoToOraFilename
protected

Definition at line 46 of file HldOutput.h.

◆ fFile

hadaq::HldFile hadaq::HldOutput::fFile
protected

Definition at line 48 of file HldOutput.h.


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