17#include <daq/slc/readout/RunInfoBuffer.h>
18#include <daq/rawdata/CprErrorMessage.h>
19#include <daq/rawdata/modules/DAQConsts.h>
20#include <rawdata/dataobjects/PreRawCOPPERFormat_v2.h>
21#include <rawdata/switch_basf2_standalone.h>
23#include <daq/dataobjects/SendHeader.h>
24#include <daq/dataobjects/SendTrailer.h>
26#define BUF_SIZE_WORD 4800
52 void initialize(
bool close_listen =
true);
96 double m_recvd_totbytes;
97 double m_recvd_prev_totbytes;
98 double m_sent_totbytes;
99 double m_sent_prev_totbytes;
121 void clearNumUsedBuf()
162 void shmOpen(
char* path_cfg,
char* path_sta);
209 void Accept(
bool close_listen =
true);
217 int Send(
int socket,
char* buf,
int size_bytes);
248 std::vector<int> m_socket_recv;
258 unsigned int m_prev_copper_ctr;
260 unsigned int m_prev_evenum;
301 int checkRunRecovery();
304 void openRunPauseNshm();
316 void callCheckRunPause(
const std::string& err_str);
319 int CheckConnection(
int socket);
A class definition of an input module for Sequential ROOT I/O.
unsigned int calcSimpleChecksum(int *buf, int nwords)
calculate checksum
void shmOpen(char *path_cfg, char *path_sta)
open shared memory
int m_port_to
Destination port.
RunInfoBuffer m_status
Run info buffer.
std::string m_hostname_local
Destination Host.
void beginRun()
Module functions to be called from event process.
void initializeNode()
Module functions to be called from main process.
unsigned int m_prev_exprunsubrun_no
run no.
unsigned int calcXORChecksum(int *buf, int nwords)
calculate checksum
std::string m_nodename
Node Name for SLC.
int * getPreAllocBuf()
Getbuffer.
int * shmGet(int fd, int size_words)
Get shared memory.
int m_start_flag
start flag
int m_shmfd_cfg
file descripter for shm
RawHeader_v2 tmp_header
which format is used
int * m_cfg_buf
buffer for shared memory
std::vector< int > m_port_from
port # to connect data sources
DesSer()
Constructor / Destructor.
int n_basf2evt
No. of sent events.
void RateMonitor(unsigned int nevt)
monitor rate
int m_trunc_mask
trunc mask
int m_socket_send
Reciever Socket.
PreRawCOPPERFormat_v2 m_pre_rawcpr
report status to SLC
CprErrorMessage print_err
wrapper for B2LOG system
int m_shmfd_sta
file descripter for shm
int m_run_pause
flag to show that run-controller pauses a run
void printData(int *buf, int nwords)
dump error data
int m_run_error
flag to show that there is some errors with which DAQ cannot continue.
int * getNewBuffer(int nwords, int *delete_flag)
Getbuffer.
double cur_time
for time monitoring
std::string m_dump_fname
dump filename
int m_shmflag
Use shared memory.
int monitor_numeve
buffer for shared memory
virtual void DataAcquisition()=0
Module functions to be called from event process.
int m_prev_nevt
No. of prev sent events.
void recordTime(int event, double *array)
store time info.
int * m_cfg_sta
buffer for shared memory
int m_num_connections
check data contents
int m_compressionLevel
Compression Level.
int * m_bufary[NUM_PREALLOC_BUF]
buffer
unsigned int m_exprunsubrun_no
run no.
std::string p_method
EvtSocket.
double max_seconds
time to stop a run
FILE * m_fp_dump
dump file descripter
int m_nodeid
Node ID for SLC.
int Send(int socket, char *buf, int size_bytes)
send buffer
double getTimeSec()
store time info.
std::vector< std::string > m_hostname_from
Reciever basf2 Socket.
Abstract base class for different kinds of events.