 |
Belle II Software
release-05-01-25
|
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_latest.h>
22 #include <daq/dataobjects/SendHeader.h>
23 #include <daq/dataobjects/SendTrailer.h>
25 #define BUF_SIZE_WORD 4800
51 void initialize(
bool close_listen =
true);
95 double m_recvd_totbytes;
96 double m_recvd_prev_totbytes;
97 double m_sent_totbytes;
98 double m_sent_prev_totbytes;
120 void clearNumUsedBuf()
161 void shmOpen(
char* path_cfg,
char* path_sta);
164 int*
shmGet(
int fd,
int size_words);
207 void Accept(
bool close_listen =
true);
215 int Send(
int socket,
char* buf,
int size_bytes);
246 std::vector<int> m_socket_recv;
256 unsigned int m_prev_copper_ctr;
258 unsigned int m_prev_evenum;
299 int checkRunRecovery();
302 void openRunPauseNshm();
314 void callCheckRunPause(std::string& err_str);
317 int CheckConnection(
int socket);
328 #endif // DESSERCOPPER_H
double max_seconds
time to stop a run
DesSer()
Constructor / Destructor.
virtual void DataAcquisition()=0
Module functions to be called from event process.
std::vector< std::string > m_hostname_from
Reciever basf2 Socket.
int Send(int socket, char *buf, int size_bytes)
send buffer
int m_trunc_mask
trunc mask
int m_start_flag
start flag
unsigned int calcSimpleChecksum(int *buf, int nwords)
calculate checksum
unsigned int m_prev_exprunsubrun_no
run no.
double cur_time
for time monitoring
CprErrorMessage print_err
wrapper for B2LOG system
FILE * m_fp_dump
dump file descripter
int n_basf2evt
No. of sent events.
int m_run_pause
flag to show that run-controller pauses a run
int m_shmfd_cfg
file descripter for shm
int * m_cfg_buf
buffer for shared memory
int m_run_error
flag to show that there is some errors with which DAQ cannot continue.
std::vector< int > m_port_from
port # to connect data sources
int * m_cfg_sta
buffer for shared memory
int m_prev_nevt
No. of prev sent events.
std::string m_hostname_local
Destination Host.
void beginRun()
Module functions to be called from event process.
std::string p_method
EvtSocket.
A class definition of an input module for Sequential ROOT I/O.
int m_port_to
Destination port.
int * shmGet(int fd, int size_words)
Get shared memory.
void recordTime(int event, double *array)
store time info.
Abstract base class for different kinds of events.
std::string m_nodename
Node Name for SLC.
int * getNewBuffer(int nwords, int *delete_flag)
Getbuffer.
int m_shmflag
Use shared memory.
void initializeNode()
Module functions to be called from main process.
int m_compressionLevel
Compression Level.
int m_nodeid
Node ID for SLC.
PreRawCOPPERFormat_latest m_pre_rawcpr
report status to SLC
int monitor_numeve
buffer for shared memory
RawHeader_latest tmp_header
which format is used
int m_socket_send
Reciever Socket.
int m_num_connections
check data contents
void RateMonitor(unsigned int nevt)
monitor rate
double getTimeSec()
store time info.
RunInfoBuffer m_status
Run info buffer.
std::string m_dump_fname
dump filename
void printData(int *buf, int nwords)
dump error data
int m_shmfd_sta
file descripter for shm
unsigned int calcXORChecksum(int *buf, int nwords)
calculate checksum
unsigned int m_exprunsubrun_no
run no.
int * getPreAllocBuf()
Getbuffer.
void shmOpen(char *path_cfg, char *path_sta)
open shared memory
int * m_bufary[NUM_PREALLOC_BUF]
buffer