14#include <framework/core/Module.h>
16#include <daq/dataflow/EvtSocket.h>
18#include <daq/rawdata/CprErrorMessage.h>
19#include <daq/dataobjects/SendHeader.h>
20#include <daq/dataobjects/SendTrailer.h>
21#include <rawdata/dataobjects/RawDataBlock.h>
23#include <rawdata/dataobjects/RawHeader_latest.h>
49 void event()
override;
55 virtual void Accept();
67 void shmOpen(
char* path_cfg,
char* path_sta);
70 int*
shmGet(
int fd,
int size_words);
73 int Send(
int socket,
char* buf,
int size_bytes);
130 unsigned int m_prev_nevt;
132 double m_prev_totbytes;
134 double time_array0[1000];
135 double time_array1[1000];
136 double time_array2[1000];
162 virtual void openRunPauseNshm();
165 virtual int checkRunPause();
168 virtual void resumeRun();
171 void callCheckRunPause(std::string& err_str);
The RawDataBlock class Base class for rawdata handling.
A class definition of an input module for Sequential ROOT I/O.
void shmOpen(char *path_cfg, char *path_sta)
open shared memory
int CheckConnection(int socket)
Check socket status.
unsigned long long m_totbytes
sent data size
int m_port_to
Destination port.
std::string m_hostname_local
Destination Host.
SerializerModule()
Constructor / Destructor.
void initialize() override
Module functions to be called from main process.
unsigned int calcXORChecksum(int *buf, int nwords)
calculate checksum
int * shmGet(int fd, int size_words)
Get shared memory.
void event() override
This method is the core of the module.
int m_start_flag
start flag
int BUF_SIZE_WORD
size of buffer for one event (word)
int m_shmfd_cfg
file descripter for shm
int * m_cfg_buf
buffer for shared memory
void endRun() override
This method is called if the current run ends.
EvtSocketSend * m_sock
EvtSocket.
void terminate() override
This method is called at the end of the event processing.
int n_basf2evt
No. of sent events.
CprErrorMessage print_err
error message program
int m_shmfd_sta
file descripter for shm
void printData(int *buf, int nwords)
print data contents
void beginRun() override
Module functions to be called from event process.
int m_shmflag
Use shared memory.
void recordTime(int event, double *array)
store time info.
int * m_cfg_sta
buffer for shared memory
int m_compressionLevel
Compression parameter.
std::string p_method
How to handle data.
int Send(int socket, char *buf, int size_bytes)
send buffer
double getTimeSec()
store time info.
RawHeader_latest tmp_header
which format is used
Abstract base class for different kinds of events.