DABC (Data Acquisition Backbone Core)
2.9.9
|
Input object for MBS-events generator. More...
#include <mbs/GeneratorInput.h>
Public Member Functions | |
GeneratorInput (const dabc::Url &url) | |
virtual unsigned | Read_Complete (dabc::Buffer &buf) |
Complete reading of the buffer from source,. More... | |
virtual bool | Read_Init (const dabc::WorkerRef &wrk, const dabc::Command &cmd) |
Initialize data input, using port and command. More... | |
virtual unsigned | Read_Size () |
Defines required buffer size for next operation. More... | |
virtual double | Read_Timeout () |
Provide timeout value. More... | |
virtual | ~GeneratorInput () |
Public Member Functions inherited from dabc::DataInput | |
virtual unsigned | Read_Start (Buffer &buf) |
Prepare buffer for reading (if required) More... | |
virtual bool | Read_Stat (dabc::Command cmd) |
Provide timeout value. More... | |
Buffer | ReadBuffer () |
Reads complete buffer. More... | |
virtual | ~DataInput () |
Protected Attributes | |
uint32_t | fEventCount |
current event id More... | |
uint16_t | fFirstProcId |
procid of first subevent More... | |
uint32_t | fFullId |
subevent id, if number subevents==1 and nonzero More... | |
double | fGenerTimeout |
timeout used to avoid 100% CPU load More... | |
bool | fIsGo4RandomFormat |
is subevents should be filled with random numbers More... | |
uint16_t | fNumSubevents |
number of subevents to generate More... | |
uint32_t | fSubeventSize |
size of each subevent More... | |
bool | fTimeoutSwitch |
boolean used to generate timeouts More... | |
uint64_t | fTotalSize |
total size of generated events More... | |
uint64_t | fTotalSizeLimit |
limit of generated events size More... | |
Additional Inherited Members | |
Protected Member Functions inherited from dabc::DataInput | |
virtual WorkerAddon * | Read_GetAddon () |
Returns addon, provided by data input If specified, supposed that I/O object is double-deriver from DataInput and Addon. More... | |
Input object for MBS-events generator.
It can generate MBS events for testing. Configuration in xml file look like:
Following parameters are supported: numsub - number of subevents procid - procid of first subevent size - size of each subevent go4 - if true (default), generates go4-specific data, used in all examples fullid - fullid of first subevent total - size limit of generated events in MB tmout - delay between two generated buffers (in ms)
Definition at line 42 of file GeneratorInput.h.
mbs::GeneratorInput::GeneratorInput | ( | const dabc::Url & | url | ) |
Definition at line 39 of file GeneratorInput.cxx.
|
inlinevirtual |
Definition at line 57 of file GeneratorInput.h.
|
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
[in] | wrk | reference on input port |
[in] | cmd | reference on command object |
Reimplemented from dabc::DataInput.
Definition at line 63 of file GeneratorInput.cxx.
|
virtual |
Defines required buffer size for next operation.
Reimplemented from dabc::DataInput.
Definition at line 68 of file GeneratorInput.cxx.
|
virtual |
Complete reading of the buffer from source,.
Reimplemented from dabc::DataInput.
Definition at line 81 of file GeneratorInput.cxx.
|
inlinevirtual |
Provide timeout value.
When Read_Size or Read_Complete operations returns di_RepeatTimeout argument, specified timeout will be used before next operation will be done
Reimplemented from dabc::DataInput.
Definition at line 65 of file GeneratorInput.h.
|
protected |
current event id
Definition at line 44 of file GeneratorInput.h.
|
protected |
number of subevents to generate
Definition at line 45 of file GeneratorInput.h.
|
protected |
procid of first subevent
Definition at line 46 of file GeneratorInput.h.
|
protected |
size of each subevent
Definition at line 47 of file GeneratorInput.h.
|
protected |
is subevents should be filled with random numbers
Definition at line 48 of file GeneratorInput.h.
|
protected |
subevent id, if number subevents==1 and nonzero
Definition at line 49 of file GeneratorInput.h.
|
protected |
total size of generated events
Definition at line 50 of file GeneratorInput.h.
|
protected |
limit of generated events size
Definition at line 51 of file GeneratorInput.h.
|
protected |
timeout used to avoid 100% CPU load
Definition at line 52 of file GeneratorInput.h.
|
protected |
boolean used to generate timeouts
Definition at line 53 of file GeneratorInput.h.