DABC (Data Acquisition Backbone Core)
2.9.9
plugins
mbs
mbs
GeneratorInput.h
Go to the documentation of this file.
1
// $Id: GeneratorInput.h 4781 2021-07-14 12:28:15Z linev $
2
3
/************************************************************
4
* The Data Acquisition Backbone Core (DABC) *
5
************************************************************
6
* Copyright (C) 2009 - *
7
* GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
8
* Planckstr. 1, 64291 Darmstadt, Germany *
9
* Contact: http://dabc.gsi.de *
10
************************************************************
11
* This software can be used under the GPL license *
12
* agreements as stated in LICENSE.txt file *
13
* which is part of the distribution. *
14
************************************************************/
15
16
#ifndef MBS_GeneratorInput
17
#define MBS_GeneratorInput
18
19
#ifndef DABC_DataIO
20
#include "
dabc/DataIO.h
"
21
#endif
22
23
namespace
mbs
{
24
42
class
GeneratorInput
:
public
dabc::DataInput
{
43
protected
:
44
uint32_t
fEventCount
;
45
uint16_t
fNumSubevents
;
46
uint16_t
fFirstProcId
;
47
uint32_t
fSubeventSize
;
48
bool
fIsGo4RandomFormat
;
49
uint32_t
fFullId
;
50
uint64_t
fTotalSize
;
51
uint64_t
fTotalSizeLimit
;
52
double
fGenerTimeout
;
53
bool
fTimeoutSwitch
;
54
55
public
:
56
GeneratorInput
(
const
dabc::Url
& url);
57
virtual
~GeneratorInput
() {}
58
59
virtual
bool
Read_Init
(
const
dabc::WorkerRef
& wrk,
const
dabc::Command
& cmd);
60
61
virtual
unsigned
Read_Size
();
62
63
virtual
unsigned
Read_Complete
(
dabc::Buffer
& buf);
64
65
virtual
double
Read_Timeout
() {
return
fGenerTimeout
; }
66
67
};
68
69
}
70
71
72
#endif
DataIO.h
dabc::Buffer
Reference on memory from memory pool.
Definition:
Buffer.h:135
dabc::Command
Represents command with its arguments.
Definition:
Command.h:99
dabc::DataInput
Interface for implementing any kind of data input.
Definition:
DataIO.h:61
dabc::Url
Uniform Resource Locator interpreter.
Definition:
Url.h:33
dabc::WorkerRef
Reference on dabc::Worker
Definition:
Worker.h:466
mbs::GeneratorInput
Input object for MBS-events generator.
Definition:
GeneratorInput.h:42
mbs::GeneratorInput::fEventCount
uint32_t fEventCount
current event id
Definition:
GeneratorInput.h:44
mbs::GeneratorInput::fIsGo4RandomFormat
bool fIsGo4RandomFormat
is subevents should be filled with random numbers
Definition:
GeneratorInput.h:48
mbs::GeneratorInput::~GeneratorInput
virtual ~GeneratorInput()
Definition:
GeneratorInput.h:57
mbs::GeneratorInput::Read_Complete
virtual unsigned Read_Complete(dabc::Buffer &buf)
Complete reading of the buffer from source,.
Definition:
GeneratorInput.cxx:81
mbs::GeneratorInput::Read_Size
virtual unsigned Read_Size()
Defines required buffer size for next operation.
Definition:
GeneratorInput.cxx:68
mbs::GeneratorInput::fSubeventSize
uint32_t fSubeventSize
size of each subevent
Definition:
GeneratorInput.h:47
mbs::GeneratorInput::fNumSubevents
uint16_t fNumSubevents
number of subevents to generate
Definition:
GeneratorInput.h:45
mbs::GeneratorInput::fGenerTimeout
double fGenerTimeout
timeout used to avoid 100% CPU load
Definition:
GeneratorInput.h:52
mbs::GeneratorInput::fFirstProcId
uint16_t fFirstProcId
procid of first subevent
Definition:
GeneratorInput.h:46
mbs::GeneratorInput::fFullId
uint32_t fFullId
subevent id, if number subevents==1 and nonzero
Definition:
GeneratorInput.h:49
mbs::GeneratorInput::GeneratorInput
GeneratorInput(const dabc::Url &url)
Definition:
GeneratorInput.cxx:39
mbs::GeneratorInput::fTotalSizeLimit
uint64_t fTotalSizeLimit
limit of generated events size
Definition:
GeneratorInput.h:51
mbs::GeneratorInput::fTotalSize
uint64_t fTotalSize
total size of generated events
Definition:
GeneratorInput.h:50
mbs::GeneratorInput::Read_Timeout
virtual double Read_Timeout()
Provide timeout value.
Definition:
GeneratorInput.h:65
mbs::GeneratorInput::Read_Init
virtual bool Read_Init(const dabc::WorkerRef &wrk, const dabc::Command &cmd)
Initialize data input, using port and command.
Definition:
GeneratorInput.cxx:63
mbs::GeneratorInput::fTimeoutSwitch
bool fTimeoutSwitch
boolean used to generate timeouts
Definition:
GeneratorInput.h:53
mbs
Support for MBS - standard GSI DAQ.
Definition:
api.h:36
Generated by
1.9.1